kendo ui Sparkline - 如何改变条形颜色

时间:2017-02-28 09:54:17

标签: kendo-ui kendo-chart

我没有设法改变线条的颜色。 默认情况下,它是橙色的......

https://jsfiddle.net/z7xo8thx/

$("#temp-range").kendoSparkline({
    type: "bullet",
    data: [21, 23],
    valueAxis: {
      min: 0,
      max: 50,
    plotBands: [{
      from: 0,
      to: 15,
      color: "#787878",
      opacity: 0.15
    },  {
    from: 16,
    to: 50,
    color: "#787878",
    opacity: 0.15
  }]
},
tooltip: {
  visible: true
}
});

感谢您的帮助!

1 个答案:

答案 0 :(得分:1)

您可以设置seriesColors属性:

seriesColors: ["#558B9B"],

更新了 FIDDLE