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

Plot items now have optional id which is returned in the plot's response when hovered #3920

Merged
merged 3 commits into from
Jan 30, 2024

Conversation

Wumpf
Copy link
Collaborator

@Wumpf Wumpf commented Jan 30, 2024

This allows users to check which item the user interacts with in the plot.

Screen.Recording.2024-01-30.at.10.30.12.mov

@Wumpf Wumpf added feature New feature or request egui_plot Related to egui_plot labels Jan 30, 2024
crates/egui_demo_lib/src/demo/plot_demo.rs Outdated Show resolved Hide resolved
@emilk emilk merged commit ca513ce into master Jan 30, 2024
35 checks passed
@emilk emilk deleted the plot-object-id branch January 30, 2024 14:55
Wumpf added a commit to rerun-io/rerun that referenced this pull request Jan 31, 2024
### What

* depends on emilk/egui#3920
* Fixes #4952
* Closes #4828


Wires up the new plot item ids to our hover/selection mechanism.
Moved a utility method from item_ui to ViewerContext since I didn't want
to take a dependency on `re_data_ui` here (and this method had a todo
about being in the wrong spot anyways 😄 )



https://github.com/rerun-io/rerun/assets/1220815/1ef61a4f-7e13-4661-90c6-fa53ea008823



DRAFT: Uses unpublished egui version!


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4959/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4959/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4959/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4959)
- [Docs
preview](https://rerun.io/preview/f3f871cc9d2504b9c12a445787116a69af91f47f/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/f3f871cc9d2504b9c12a445787116a69af91f47f/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…nse when hovered (emilk#3920)

This allows users to check which item the user interacts with in the
plot.



https://github.com/emilk/egui/assets/1220815/1a174b38-8414-49be-a802-d187cd93d154

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
egui_plot Related to egui_plot feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants