I am useing the chart for time and dixtance graph.
y contains distance and x shows the value for time.
In tooltip I have to show the speed and to calculate this I want y axis value of previous point ( current distance = currentY- previosY). If I have the index of current point on mouse over then i can get the value of prevois point using this.points array.
if I looked at it correctly, this.points contains the values of each series at current x position, not all the values of the current series. So if you have only one series, there will always only be one item in the points array. Maybe you could calculate the speed in a different series and make that not visible; then you could display the value in the tooltip with points[1]
(or whichever is the index of the speed series).
I think the
this.series.data array is what you want. You should be able to find
this.point in that array and get the previous value by going one step back from that. You’ll of course need to write some special handling for the first case.