-
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
Customize legend box height #2051
Comments
@timcui this is currently not possible. We can add it as an enhancement |
thanks for support |
Another user here that would really appreciate this feature! |
Any news on this? I can set
|
That's correct @dt1973 only boxWidth is supported |
Hi @Ryan-Haines! That is unfortunate as most professional legend boxes these days seem to have really short heights. Looks a lot better imho! |
Agree, this is actually a request from our design team as well. customizing this would be very helpful. |
Implemented in #4890 (still need unit tests) |
+1 for this feature (#4890 was unfortunately closed before merging) |
+1 |
+1 |
8 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
@simonbrunel hello! Any idea when we're likely to see this feature? Many thanks! |
Solution pending in #4811 |
#4811 looks to be almost finished through right? |
@touletan are you alive? Your PR from 2018 didn't go through. Wondering if there are any alternatives? |
This feature is really needed. |
+1 |
1 similar comment
+1 |
+1! |
+1 |
Would be great indeed |
Would be great to have. |
+1 |
Is this not available in the live editor? I tried adding |
This still does not work, why is it closed? Has is been resolved? |
Yes, its been resolved. Its closed because its resolved. There is a test to ensure its working. You need to use v3 beta to have it. |
Please let us know when it is in production.
Regards,
Matthieu
…________________________________
From: Jukka Kurkela <notifications@github.com>
Sent: Thursday, January 14, 2021 9:04:54 PM
To: chartjs/Chart.js <Chart.js@noreply.github.com>
Cc: MatthieuAL <matthieu.aliquot@live.fr>; Comment <comment@noreply.github.com>
Subject: Re: [chartjs/Chart.js] Customize legend box height (#2051)
This still does not work, why is it closed? Has is been resolved?
Yes, its been resolved. Its closed because its resolved. There is a test to ensure its working. You need to use v3 beta to have it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#2051 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APSCA47WBFL7437OX4QZKLDSZ5E6NANCNFSM4B4FRHIA>.
|
Also waiting for it |
seems like it is still not in 3.5.1 yet...super wanted! |
Also looking for it. 4 years ago posted, still not in. Also it would be great if we could define the style if a legend item is "hidden". The strikethrough is not perfect for everyone. |
As of 2023 its possible to define the width and height for the legend box, see https://www.chartjs.org/docs/latest/configuration/legend.html |
as the code below, the legend box height is binded to the label fontSize, can i customize the legend box height independent of the label fontSize, like the boxWidth ?
`
// Draw the box
ctx.strokeRect(cursor.x, cursor.y, this.options.labels.boxWidth, this.options.labels.fontSize);
ctx.fillRect(cursor.x, cursor.y, this.options.labels.boxWidth, this.options.labels.fontSize);
`
The text was updated successfully, but these errors were encountered: