-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-line rotated line-height changes on upgrade from 2.4.0 to 2.5.0 #4379
Comments
The line spacing can be changed by altering https://github.com/chartjs/Chart.js/blob/master/src/core/core.scale.js#L723, changing:
...to...
I'll look into this to see what that change may break and what L#320 is - on line 310 at the time this code was committed, the code is:
...which looks relevant. Looks like that code has since changed too. |
Need to work out why the 1.5 was chosen in the first place and whether it was made redundant at some stage. If the solution is to change to the factor to 1.0, the multiplication can be removed altogether. Another approach could be to make the factor configurable, but it seems like line-height should be able to be calculated. |
Line height is an interesting idea for this. I'm happy to look at a PR for it. @simonbrunel thoughts? |
Agree, all multi lines text should support configurable line height. |
I'm happy to have a go at this but am a bit new to this project and node. I can see the coverage tests don't hit the line in question, an would like to add a test. How do you develop and debug the tests? Do you write them in a browser, work out what assertions to make, then paste them in a related jasmine spec? |
K - am able to debug using the browser with |
Any update on this? @tntim96 Thanks |
Are we able to adjust the line-height of the ticks especially when they are multi lines? |
Graph with rotated labels on 2.4.0 works well:
https://codepen.io/anon/pen/xrRVRw
But after upgrading to 2.6.0 (2.5.0 seems to have the issue too), the line-height of the text has increased significantly:
https://codepen.io/anon/pen/yXVOVw
A smaller default or configurable line height would be handy. Might be related to #4292
The text was updated successfully, but these errors were encountered: