0

在 Highcharts 热图中,我通常定义一个点击事件:

options.plotOptions = {
    series: {
        cursor: 'pointer',
        point: {
            events: {
                click: function() {
                /* action */
                }
            }
        }
    }
};

如何在此函数中获取 xAxis 和 yAxis 信息?

例如,在这个演示中,当我点击左上角的 0.67 时,我想提醒“星期五,亚历山大”。

我可以将参数传递给这个函数吗?或者还有其他方法吗?

谢谢!:)

4

1 回答 1

5

该事件具有附加的意义。因此,您可以执行以下操作:

           click: function (event) {
                var str = event.point.series.yAxis.categories[event.point.y] + ',' +
                    event.point.series.xAxis.categories[event.point.x]
                alert(str);
            }

http://jsfiddle.net/blaird/3UWaA/26/

于 2015-07-07T00:31:45.580 回答