chartjs / chartjs/Chart.js

Legend title horizontal paddings doesn't work

Open
#12,066 0 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

Legend title horizontal paddings should be respected.

### Current behavior

Legend title horizontal paddings are ignored.

![Image](https://github.com/user-attachments/assets/7974eba7-c996-4b7e-b0a9-fa0b43fe7a16)

![Image](https://github.com/user-attachments/assets/e16da4e5-165d-4f64-a5da-1d359bc5bf0a)

### Reproducible sample

https://codepen.io/adrianbrs/pen/XJJdXOZ

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

_No response_

### chart.js version

v4.4.9

### Browser name and version

Google Chrome 135.0.7049.95 (64 bits)

### Link to your project

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the reproducible Chart.js v4.4.9 CodePen sample in Chrome and compare the expected and current legend-title padding behavior. Trace how legend title horizontal padding is handled, then verify that the configured padding is respected in the sample and add or update coverage for the regression if the project’s existing tests identify the relevant area.

Written by the indexing model from the issue text.

Assessment

Tech stack
chart.js, javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.