基于
this previous answer
colorizeItem
系统的功能
Legend
你可以使用
legendColor
属性:
(function(H) {
H.wrap(H.Legend.prototype, 'colorizeItem', function(proceed, item, visible) {
var color = item.color;
item.color = item.options.legendColor;
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
item.color = color;
});
}(Highcharts));
但你还是申请了
传奇色彩
:
$('#container').highcharts({
series: [{
legendColor: 'black',
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
看到了吗
this updated JSFiddle demonstration