-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Add support for line height CSS values #4531
Conversation
src/core/core.scale.js
Outdated
// actual label | ||
labelString: '', | ||
|
||
// display property | ||
display: false, | ||
lineHeight: 1.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@etimberg It was 1.5
previously but we could change that default for 1.2
to be more consistent? 1.2
renders better everywhere (ticks, radial linear text, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine by me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
9dea44a
to
528461a
Compare
The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin. https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
528461a
to
403836c
Compare
The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin. https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin. https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
The title plugin and scale title now accept lineHeight specified using unitless value (
1.4
), length ('1.4em'
or'12px'
), percentage ('200%'
) or keyword ('normal' === 1.2
). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text position in the title plugin.https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
Adapted from
chartjs.plugin.datalabels