我使用Highstock,我將通過點擊事件來設置xAxis.plotLine的值。我怎樣才能做到這一點,直接顯示? 我使用xAxis.plotLines.value = this.x設置了單擊事件的值;設置xAxis.plotline的值live highstock
series : [
{
xField : 'deltaTime',
yField : 'variableOne'
},{
xField : 'deltaTime',
yField : 'variableTwo',
}],
chartConfig : {
xAxis: {
plotLines: [{
width: 2,
color: 'black'
}]
},
rangeSelector : {
selected : 1
},
plotOptions: {
series: {
cursor: 'pointer',
point: {
events: {
click: function() {
var hcConfig = Chart.ux.HistoryChart.getConfig('single_line');
hcConfig.chartConfig.xAxis.plotLines.value = this.x;
}
}
}
},
marker: {
lineWidth: 1
}
}
},
}
}
感謝您的幫助 – dascoco
@dascoco很高興我可以幫助和歡迎SO。如果這回答了您的問題,請單擊左側的綠色箭頭以確認答案。 – JohnnyHK