我有多个与 Webdatarocks 集成的 Highcharts。我需要在单个图表上有一条水平线,为此我使用了下面的代码。这按预期工作,但我面临的问题是
请建议如何使一个图表独立于其他图表,使其不使用彼此的属性。
data => {
this.Highcharts.setOptions({
yAxis: {
plotLines: [{
color: 'blue',
width: 2,
value: 25,
zIndex: 5,
label:{
text:"label1",
align:'left'
}
}]
},
plotOptions: {
series: {
borderWidth: 0,
dataSorting: {
enabled: true,
},
dataLabels: {
enabled: true,
formatter: function () {
let value = (this.y);
return '' + value.toFixed(1);
}
}, // set colors of the series
}
}
});
createAndUpdateChart(data);
},
Run Code Online (Sandbox Code Playgroud)