Skip to content

Legend title horizontal paddings doesn't work #12066

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

Open
adrianbrs opened this issue Apr 21, 2025 · 0 comments
Open

Legend title horizontal paddings doesn't work #12066

adrianbrs opened this issue Apr 21, 2025 · 0 comments

Comments

@adrianbrs
Copy link
Contributor

Expected behavior

Legend title horizontal paddings should be respected.

Current behavior

Legend title horizontal paddings are ignored.

Image

Image

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

adrianbrs added a commit to adrianbrs/Chart.js that referenced this issue Apr 23, 2025
…nd fix multiple issues

- chartjs#12067 keep all the hitboxes in the same column with the same width so we can align the label text properly
- chartjs#11850 make sure the title can fit
- chartjs#12066 respect the horizontal paddings of the title
- chartjs#11824 always measure item height to account for multiline legend items
- chartjs#11805 respect max width and height in both horizontal and vertical

Close chartjs#12067, chartjs#11850, chartjs#12066, chartjs#11824, chartjs#11805
adrianbrs added a commit to adrianbrs/Chart.js that referenced this issue Apr 23, 2025
…nd fix multiple issues

- Keep all the hitboxes in the same column with the same width so we can align the label text properly (Fixes chartjs#12067)
- Make sure the title can fit (Fixes chartjs#11850)
- Respect the horizontal paddings of the title (Fixes chartjs#12066)
- Always measure item height to account for multiline legend items (Fixes chartjs#11824)
- Respect max width and height in both horizontal and vertical legends (Fixes chartjs#11805)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant