Chartjs-Which is the appropriate lifecycle hook to draw a line?

0👍

There is a diagram in the chart.js documentation that shows when each hook is being called in the rendering process and what chart.js does between those hooks like drawing datasets, grids etc.

If you want to make sure what you are drawing is on top of everything else you will need to use the afterDraw hook to draw the things on the canvas that you want there.

enter image description here

Leave a comment