[FEATURE] Legend.Item Transparency on Disabled
See original GitHub issueCurrent 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:
- Is this feature considered useful by the community?
- If so, should there be additional configuration options exposed (preferred) so a user can provide
dataset.disabledBackgroundColor
,dataset.disabledBorderColor
andlegend.labels.disabledFontColor
at the expense of adding additional configuration options or should it be guessed?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
"As Seen" Legend Swatches for Transparency
Currently, you can enable transparency in the legend. However, the legend patch color will simply appear as a lighter, more transparent ...
Read more >c# - display disabled series in legend
Is it possible to keep it in the legend even if disabled? I'd like to change it's transparency in the legend so that...
Read more >opacity - CSS: Cascading Style Sheets - MDN Web Docs
The opacity CSS property sets the opacity of an element. Opacity is the degree to which content behind an element is hidden, and...
Read more >Legend (lg) Resources
The color index used for the background of the boxes enclosing the Legend items. By default it is set to -1 ( Transparent...
Read more >Working with legends—Help | ArcGIS for Desktop
If you have layers with transparency in your map, ArcMap simulates the transparent ... If no features from that legend item are in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub 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?
This can be done by overriding the
generateLabels
callback. https://jsfiddle.net/1npmkjr6/1/@kurkle not sure if we want that function to control the text colour as well