0
I would like to know, I have a text created with canvas in chartJS]. How to rotate the text, the same being vertical in the center of the line. I tried with Rotate, but the text disappeared from the chart.
EXAMPLE
0
I would like to know, I have a text created with canvas in chartJS]. How to rotate the text, the same being vertical in the center of the line. I tried with Rotate, but the text disappeared from the chart.
EXAMPLE
0
canvas has both 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);
Browser other questions tagged javascript jquery canvas chartjs
You are not signed in. Login or sign up in order to post.