-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Wrong legend hitbox area when using textAlign right/center #12067
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
Labels
Comments
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)
hi @adrianbrs just change this
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Expected behavior
The entire legend item text should be clickable when centering or right-aligning the text.
For example:
Current behavior
The clickable area of the legend item is smaller than it should be, as if the text were always left-aligned.
Also occurs in RTL mode:
Reproducible sample
https://codepen.io/adrianbrs/pen/KwwzRja
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
The text was updated successfully, but these errors were encountered: