Chart.js: yAxes scale label rotation

Created on 24 May 2018  路  5Comments  路  Source: chartjs/Chart.js

Hello
I'd like to change yAxes label orientation and rotate it in 180deg.
How I can do it?
Thanks.

enhancement

Most helpful comment

@etimberg is there any rotation option for scale labels? if not, should we consider a new feature?

All 5 comments

I didn't find anything else other than commenting out the line rotation = isLeft ? -0.5 * Math.PI : 0.5 * Math.PI; in the source code. Now the label is horizontal as I wanted it. I assume you would have to replace the line with rotation = isLeft ? - Math.PI : Math.PI; to get your desired effect.

Thanks a lot,
but _rotation = -0.5 * Math.PI_ much better for me

@etimberg is there any rotation option for scale labels? if not, should we consider a new feature?

There are minRotation and maxRotation fields for the x axes but nothing for y axes

@etimberg is there a rotation option for x axes labels but different for every label.

_Example:_ If you want to visualize the direction of the wind with an arrow icon.
The arrow I managed to do using fontIcons but cannot figure out how to rotate with a different degree the labels.

winddirection

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benmccann picture benmccann  路  3Comments

akashrajkn picture akashrajkn  路  3Comments

lizbanach picture lizbanach  路  3Comments

HeinPauwelyn picture HeinPauwelyn  路  3Comments

nanospeck picture nanospeck  路  3Comments