angular - 如何更改 Angular 2+ 剑道迷你图的条形颜色
问题描述
我有一个剑道迷你图,角度 2 的子弹图。条形的默认颜色是橙色,但我需要更改颜色。我查看了进度站点上的参考资料,似乎值轴有一个颜色属性,但是当我尝试更改它时,条形消失了。
html
<kendo-sparkline [data]="Data" type="bullet" [valueAxis]="bulletValueAxis">
</kendo-sparkline>
.ts 文件 - 值轴
this.bulletValueAxis = {
min: 0,
max: 30,
color: 'purple',
background: 'grey',
// title: { text: 'test' },
type: 'numeric',
plotBands: [{
from: 0, to: this.config.min, color: 'yellow', opacity: 0.3
}, {
from: this.config.min, to: this.config.max, color: '#008b00', opacity: 0.3
}, {
from: this.config.max, to: this.config.max + 5, color: '#ff0000', opacity: 0.3
}]
};
解决方案
推荐阅读
- python - Python:带有原始 f 字符串的正则表达式仅在 50% 的时间内有效
- python - Matplotlib 图 x 刻度在所有 x 数据点之后
- linux - 使用 awk 或 sed 删除模式
- javascript - getDisplayMedia() 在 Android 设备上无法正常工作
- android - 即时应用程序中的 ShortcutManager 崩溃
- java - 在 java 中遇到 InputMismatchException 的一些问题
- ruby-on-rails - 如何配置 capybara 不清除 cookie 和重置会话
- r - fs 全范围 R 图形设备
- c++ - 如何将 C/C++ 套接字发送和接收函数封装在一个类中?
- wordpress - 搜索查询中的 ACF 自定义用户字段