-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add insertion_order
and color_conflict_handling
to Legend
#65
Conversation
@emilk maybe include this in egui_plot 0.31.0 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
@@ -198,17 +230,31 @@ impl LegendWidget { | |||
|
|||
// Collect the legend entries. If multiple items have the same name, they share a | |||
// checkbox. If their colors don't match, we pick a neutral color for the checkbox. | |||
let mut entries: BTreeMap<String, LegendEntry> = BTreeMap::new(); | |||
let mut keys: BTreeMap<String, usize> = BTreeMap::new(); | |||
let mut entries: BTreeMap<(usize, String), LegendEntry> = BTreeMap::new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a tuple as a key feels weird, but I guess it makes sense in this case
Ah, it needs a rebase since that one action got deprecated |
insertion_order
insertion_order
and color_conflict_handling
to Legend
Co-authored-by: lucasmerlin <lucasmeurer96@gmail.com>
d37acc1
to
8de7fa1
Compare
@lucasmerlin rebased! |
As #45 seems to be inactive I fixed the rest and now it should be ready to merge
insertion_order
andcolor_conflict_handling
toLegend
#45