-
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
[FEATURE] Legend.Item Transparency on Disabled #4438
Comments
@seddonm1 an interesting idea would be to add a single callback function that returns the styles to apply when disabled. This would mean that we wouldn't need to add a lot of different individual options. @simonbrunel thoughts? |
I think it's pretty useful as :
Currently there's only way allows us to change Legend style on filtering (as hidden) is to extend Legend, as well guided here, but this way need to copy a lot code from ChartJS core so it's not stable when core getting changed. |
This can be done by overriding the @kurkle not sure if we want that function to control the text colour as well |
Another option would be to implement the color as scriptable / label. |
If I wanted to make a ton of changes, I would do that and remove the |
Current Behavior
When a user clicks on a legend item currently a strikethrough effect is placed through the text of that legend item and the coloured box of the legend item remains unchanged.
Possible Solution
I have done a quick proof-of-concept (which could easily be incorporated into the main repo) which changes the alpha channel on the existing box and text colours to increase the transparency.
The questions are:
dataset.disabledBackgroundColor
,dataset.disabledBorderColor
andlegend.labels.disabledFontColor
at the expense of adding additional configuration options or should it be guessed?The text was updated successfully, but these errors were encountered: