chartjs / Chart.js

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

Inconsistent spacing below chart title #11864

Open souravsaraf123 opened 1 month ago

souravsaraf123 commented 1 month ago

Expected behavior

The spacing below the word "My Chart' (aka the chart title) should have been the same in both the charts.

Current behavior

The spacing below the word "My Chart' (aka the chart title) is different in both the charts.

Attached screenshot : Screenshot 2024-08-16 155345

Reproducible sample

https://codepen.io/souravsaraf/pen/XWLVZym

Optional extra steps/info to reproduce

No response

Possible solution

No response

Context

The space below the chart title and the chart axis should be the same and should only be controlled by chart.title.padding and not by data. Here in this example , the chart options are the same but the data is slightly differnet and it is producing inconsistent spacing.

chart.js version

v4.4.1

Browser name and version

Chrome 127.0

Link to your project

https://codepen.io/souravsaraf/pen/XWLVZym

Rohitpatil-123 commented 1 month ago

grace: "10%"

why are you giving this grace This responsible for that gap its not a bug just remove this and then sorted.