You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This worked but of course it always adds extra rotation so it looks silly on a chart with only a few bars where the labels don't need to be rotated at all.
It looks like the 3px are added to the width, so it would be along the rotated baseline. We should probably add a configurable padding that is perepndicular to the baseline
Activity
airblade commentedon Jun 10, 2016
P.S. I also noticed the bars are wider in v2.1.4 than in v1.0.2. Is there a way to control the width in v2.1.4?
Update: never mind, I found the
categoryPercentageandbarPercentageoptions.etimberg commentedon Jun 10, 2016
@airblade you could try using the
minRotationoption but it's going to force the rotation to be that amount always.You could also try a different implementation of afterCalculateTickRotation
airblade commentedon Jun 10, 2016
I prefer your second suggestion though, like my original workaround, it doesn't address the actual spacing between labels.
Am I right in thinking that's controlled by the conditionals in this loop?
Would an amendment like this be possible?
etimberg commentedon Jun 10, 2016
Looks like the line where the tickWidth is calculated has an error: https://github.com/chartjs/Chart.js/blob/v2.1.4/src/core/core.scale.js#L219
I think the
-6should be+6airblade commentedon Jun 10, 2016
I'm not familiar with the code but, going by the code comment, I think you might be right.
By the way, where do the 2 lots of 3px padding apply? Is it above and below the rotated label, at right angles to the rotated baseline?
etimberg commentedon Jun 10, 2016
It looks like the 3px are added to the width, so it would be along the rotated baseline. We should probably add a configurable padding that is perepndicular to the baseline
madmoizo commentedon Feb 12, 2017
+1 for label padding

Is there a way to avoid this kind of render in 2.5 ?
Arkemlar commentedon Jun 8, 2017
+1 for label padding, even when it is rotated to 90* - it is still hard to read when there are a lot of data lines:

kurkle commentedon Jan 25, 2019
Closing as this issue has been in #5938 and/or #5922