如何获得Highcharts中某个点的索引?

问题描述:

我使用Highcharts的时间数据与不规则间隔图表。正如你知道当鼠标移过点时格式化函数运行并显示一些信息。我想知道鼠标移过它的点的索引。因此,如果鼠标移动到第一个点上,tooltip显示1,第二个点显示2,依此类推。 thnx。

I'm using "Time data with irregular intervals" chart of Highcharts. As you know when mouse moves over points of line the formatter function runs and shows some information. I want to know index of the point that mouse moves over it. So if mouse moves over first point of the line, tooltip shows "1" and the second point shows "2" and so on. thnx.

这适用于我使用v2.2:

This worked for me using v2.2:

this.series.data.indexOf( this.point )