Skip to content
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

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

bircni
Copy link
Contributor

@bircni bircni commented Jan 7, 2025

As #45 seems to be inactive I fixed the rest and now it should be ready to merge

@bircni
Copy link
Contributor Author

bircni commented Feb 4, 2025

@emilk maybe include this in egui_plot 0.31.0 ?

Copy link
Collaborator

@lucasmerlin lucasmerlin left a 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();
Copy link
Collaborator

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

@lucasmerlin lucasmerlin added the enhancement New feature or request label Feb 5, 2025
@lucasmerlin lucasmerlin added the include in changelog This change will be included in the changelog label Feb 5, 2025
@lucasmerlin
Copy link
Collaborator

Ah, it needs a rebase since that one action got deprecated

@lucasmerlin lucasmerlin changed the title Improve/Finish insertion_order Add insertion_order and color_conflict_handling to Legend Feb 5, 2025
@bircni
Copy link
Contributor Author

bircni commented Feb 5, 2025

@lucasmerlin rebased!

@lucasmerlin lucasmerlin merged commit 2998e13 into emilk:main Feb 5, 2025
9 checks passed
@bircni bircni deleted the legend_updates branch February 5, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request include in changelog This change will be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants