我使用的是Highcharts js库,特别是Highstock的时间序列图,就像这个:http://www.highcharts.com/stock/demo/。
你知道如何在事件之后获取当前导航器的选择吗?例如,假设我们可视化从6月25日到6月27日的数据,而整个可视化包括从6月1日到6月30日的数据,是否有方法检索显示选项的值:25-27?
如果我说得不够清楚,请告诉我。
发布于 2012-08-16 02:10:49
根据highcharts API参考:
events: {
selection: function(event) {
console.log(
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', event.xAxis[0].min),
Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', event.xAxis[0].max)
);
}
}
reference
https://stackoverflow.com/questions/11967959
复制相似问题