I would like to know, I have a text created with canvas on chartJS]. How do I rotate the text, while being vertical in the center of the line. I tried Rotate, but the text disappeared from the graph.
EXAMPLE
I would like to know, I have a text created with canvas on chartJS]. How do I rotate the text, while being vertical in the center of the line. I tried Rotate, but the text disappeared from the graph.
EXAMPLE
canvas has the translate () and rotate () methods that can help in this situation:
ctx.translate(xaxis.getPixelForValue(undefined, index) -16, yaxis.top + 5);
ctx.rotate(-90*Math.PI/180);
ctx.fillText("ROTATE", 0, 0);