how can I access to the next point of the series from the tooltip formatter. Because I want to do a sum between both points. Like this.y + next.y.
But I don't know how to have an access to the next point.
If someone have an answer. Thanks
how can I access to the next point of the series from the tooltip formatter. Because I want to do a sum between both points. Like this.y + next.y.
But I don't know how to have an access to the next point.
If someone have an answer. Thanks
This need to be done in a few steps:
var index = this.series.xData.indexOf(this.x);
var nextY = this.series.yData[index+1];
And all you need to do is to sum values, like this:
var sum = this.y + nextY;
.