question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Legend.Item Transparency on Disabled

See original GitHub issue

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:

  • 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 and legend.labels.disabledFontColor at the expense of adding additional configuration options or should it be guessed?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
etimbergcommented, Jun 27, 2017

@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?

1reaction
etimbergcommented, Feb 21, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found