chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
63.92k stars 11.89k forks source link

ticks padding does not work as expected #11739

Open roger21 opened 2 months ago

roger21 commented 2 months ago

Expected behavior

the doc for options.scales[scaleId].ticks.padding says : "number 3 Sets the offset of the tick labels from the axis"

Current behavior

but instead the padding is applied all around the label making the graph area unnecessary smaller

and we can't use the padding object here

plus it is not "from the axis" but from the "tick drawing" (unclear)

Reproducible sample

https://codepen.io/roger21-the-bold/pen/JjVBWyp

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

No response

chart.js version

4.4.2

Browser name and version

firefox 115.9.1esr

Link to your project

No response