emilk / emilk/egui_plot

custom data for hover label

Open
#49 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
468
Forks
108
Avg merge
15m
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
Currently there is no way to attach custom data to plot points, e.g. for use in the hover label.

**Describe the solution you'd like**
I would like an easy way to use custom data for points in the `label_formatter`;

**Describe alternatives you've considered**
- A previous solution which would introduce a type parameter for the custom data was rejected https://github.com/emilk/egui/pull/4719
- Putting all the drawn PlotPoint IDs with their custom data in a `Arc>` to retrieve them later in the formatter is quite unwieldy and is nowhere close to performant enough

**Additional context**
Current use case is to show a "validity" field for each point on hover

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.