chartjs / chartjs/Chart.js

Inconsistent spacing below chart title

Open
#11,864 3 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### 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](https://github.com/user-attachments/assets/c4edf4d0-d42e-4b7c-b057-84f02275978e)

### 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.