lys*_*030 0 highcharts highmaps
在Highcharts热图中,我通常定义一个click事件:
options.plotOptions = {
series: {
cursor: 'pointer',
point: {
events: {
click: function() {
/* action */
}
}
}
}
};
Run Code Online (Sandbox Code Playgroud)
如何在此函数中获取xAxis和yAxis信息?
例如,在这个演示中,当我点击左上角的0.67时,我想提醒"星期五,亚历山大".
我可以将参数传递给这个函数吗?或者还有其他方法吗?
谢谢!:)
该事件附有关键点.所以,你可以这样做:
click: function (event) {
var str = event.point.series.yAxis.categories[event.point.y] + ',' +
event.point.series.xAxis.categories[event.point.x]
alert(str);
}
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/blaird/3UWaA/26/
| 归档时间: |
|
| 查看次数: |
996 次 |
| 最近记录: |