Skip to content
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

Ensure that disabled legend style is drawn in the center of the text #4318

Merged
merged 1 commit into from Jun 4, 2017

Conversation

etimberg
Copy link
Member

@etimberg etimberg commented Jun 4, 2017

The text is correctly centered in the box. I also did some minification cleanup in the legend plugin.

Resolves #4317

…and that the text is correctly centered in the box
@etimberg etimberg added this to the Version 2.7 milestone Jun 4, 2017
@simonbrunel
Copy link
Member

Curious about the before/after rendering of legend label, can you post screenshots?

@etimberg
Copy link
Member Author

etimberg commented Jun 4, 2017

Sure.

Before:
before

After:
after

@simonbrunel
Copy link
Member

Much better "after" :)

@simonbrunel simonbrunel merged commit a930830 into master Jun 4, 2017
@simonbrunel simonbrunel deleted the fix/4317 branch June 4, 2017 17:34
@rept
Copy link

rept commented Jun 4, 2017

Hi,

Much, much better indeed. In your example it seems perfect. When I try it, it still seems to be slightly off, especially with strike-through it's noticeable. Seems the text should be 1 or 2px higher in order to be perfectly aligned with colored box and for the strike to go through the middle.

See here:
image

and here

image

These are my settings:

                        responsive: true,
                        maintainAspectRatio: false,
                        legend: {
                            labels: {
                                fontFamily: 'Open Sans',
                                fontSize: 15,
                                padding: 25
                            }

exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Ensure that disabled legend style is drawn in the center of the text and that the text is correctly centered in the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants