Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Option to display y axis title vertically

Open ShunyaWatanabe opened this issue 3 years ago • 2 comments

Feature Proposal

Thank you for creating such a useful library! So far, the development experience has been amazing!

Today, I would like to request a feature where I can add an option to show y axis title vertically. Some languages such as Japanese and Chinese can be written vertically and in some cases it is more desired to do so.

This is an example of a Japanese text shown horizontally as a y axis title.

Screen Shot 2022-04-15 at 10 27 54

I would like to show this title vertically, just like text-orientation: upright; does for css.

Having another option on https://www.chartjs.org/docs/latest/api/interfaces/TitleOptions.html might be nice.

Thanks for your time! and looking forward to see if this is possible!

Possible Implementation

I'm not an expert on this, but maybe this might help?

https://stackoverflow.com/a/5400970/9718549

ShunyaWatanabe avatar Apr 15 '22 01:04 ShunyaWatanabe

If you need it you can already create a custom plugin to achieve this.

If you look at this stack answer you can provide a custom title. If you provide every character as a seperate entry in an array form it will print it the way you want it.

LeeLenaleee avatar Apr 15 '22 07:04 LeeLenaleee

Hmm, I see! Thank you for your advice!

I'd rather not write a complicated piece of code. It's not a dire need, but I just wanted to know if it is possible for this feature to be added!

ShunyaWatanabe avatar Apr 19 '22 09:04 ShunyaWatanabe