Home forums Using CanvasJS Set value onClick event of 'dataPoints' at custom position Reply To: Set value onClick event of 'dataPoints' at custom position

#15750

Indranil Deo
Member

@mehul_5005,

Using chart.axisY[0].convertValueToPixel(e.dataPoint.y[1]) you can get the pixel coordinate of the last index value of y.
Then adding it to the width() of the textBox would make the textBox render to the end of the bar.

Please take a look at this fiddle.
————-
Indranil Deo
Team CanvasJS