I'm modifying some examples [1][2] to draw a line on the canvas. For the end-point I have calculated a data value but now I want to calculate the y value on the canvas. In the examples I found
this.chart.chart.scale.getPixelForValue()
which seems deprecated in chart.js 2.6
// Used to get data value locations. Value can either be an index or a numerical value
getPixelForValue: helpers.noop,
The first example uses
this.calculatePointY()
but that doesn't help me either.
What would I use instead?
[Note]: This question is similar but has no answers: Get Y value of line from X pixel value in ChartJS 2