Legend: Allow hiding an element from the legend, while leacving it drawn
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- data-visualization
Research direction
Start by inspecting the legend API and the existing hidden_items behavior in the egui_plot codebase. The change is done when a plot item or span can remain drawn while being omitted from the legend, with behavior clearly defined by the API.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
With the recent addition of spans (very happy with them by the way). There's a fair amount of information that can be hinted to the user directly with the label on the span. When there are many spans used this ends up filling the legend with excess information that is already directly duplicated on screen with the spans label.
As a concrete example, I'm using it to indicate vehicle modes here, but the information clutters the legend, and makes it obscure far more then it needs to.
Describe the solution you'd like
I'd like to look at extending the legend API to have something similar to hidden_items, but instead of toggling visibility on the plot I want to use it to control if the item is added to the legend at all.
Describe alternatives you've considered
A different option would be to make it so that spans, or plot items could explicitly have their visibility in the legend toggled on the item, but it didn't seem like it necessarily fit well with the rest.
Additional context
I'm actually happy to take a stab at getting this done, just wanted to look at the API first.
- Dominant language
- Rust
- Stars
- 467
- Forks
- 107
- Avg merge
- 15m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from emilk/egui_plot
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100