【发布时间】:2013-07-14 19:42:51
【问题描述】:
是否可以在图表的点击事件上绘制一条线?
chart: {
events: {
click: function(event) {
alert ('x: '+ event.xAxis[0].value +', y: '+
event.chartY );
var chart = event.xAxis[0];
chart.removePlotLine('plot-line-1');
chart.addPlotLine({
value: event.chartX,
color: '#FF0000',
width: 2,
id: 'plot-line-1'
});
}
}
},
我最初在 highcharts 的 plotoptions 点击事件上做了同样的事情。现在,使用图表点击事件做同样的事情?但无法获取系列 xaxis 对象。
【问题讨论】:
标签: highcharts