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
x-axis ticks padding not doing anything #3992
Comments
This looks like a bug of some kind. Probably in the draw code. |
Hello, this bug lasts for a long time, since 2.0 release. Label's offsets both for yAxes and xAxes don't treat 'padding' and 'labelOffset' correctly.
|
@etimberg - I'm running into the same problems. Many properties, such as 'padding', 'tickMarkLength', etc are not having effect, the rectangles in bar charts are being offset from the center, etc. This seems to be a recent bug - it was not there in the 2.1.3 version. Here is a fiddle: Buggy: https://jsfiddle.net/RedDevil/gofnapcw/ (2.6.0) |
So, I've tried out the fiddle with different versions of Chartjs, and the same buggy behaviour can be observed for the first time in the 2.5.0 version. |
@dkazakov8 |
@jctrinquet you don't use that code. That's internal chartjs library code. Just update your chartjs version. This bug is fixed. To see how to use this, refer to the docs. |
Hi!
I'm trying to add some padding between the x-axis to the ticks labels but without the ticks.
I managed to get it right when disabling the x-axis gridlines display, but I do need them, so my chart now looks like this:
The options.scales object looks like this:
scales: { xAxes: [{ gridLines: { drawTicks: false, }, ticks: { autoSkipPadding: 5, padding: 20, maxRotation: 0, labelOffset: 15, }, }], },
Is this even possible when 'drawTicks: false'?
Thanks!
The text was updated successfully, but these errors were encountered: