(function(H) {
H.wrap(H.seriesTypes.solidgauge.prototype, 'drawPoints', function(p) {
let ret = p.apply(this, Array.prototype.slice.call(arguments, 1));
let series = this;
if (series.options.ignoreStops) {
series.points.forEach(point => {
if (point.graphic) {
var color = series.options.fillColor;
if (color !== 'none') {
point.graphic.css({
fill: color
});
}
}
})
}
return ret;
});
})(Highcharts);
1条答案
按热度按时间hc2pp10m1#
没有现成的API选项,但您可以轻松扩展Highcahrts来实现这一点。下面是示例wrap:
将属性包含到系列配置中并定义颜色:
Demo:https://jsfiddle.net/BlackLabel/uxL7zqtc/
关于扩展Highcahrts的更多信息:https://www.highcharts.com/docs/extending-highcharts/extending-highcharts