Skip to main content

egui_charts/chart/series/
selection.rs

1//! Hit-test results for chart series.
2//!
3//! The chart owns selection; hosts read it with
4//! [`Chart::selected_element`](crate::Chart::selected_element).
5//! [`SeriesId`] identifies a bar series, the volume series or a study.
6
7pub use crate::chart::selection::SeriesId;
8
9/// Result of a hit test on chart series
10#[derive(Clone, Debug)]
11pub struct SeriesHitResult {
12    /// The series that was hit
13    pub series_id: SeriesId,
14    /// Index of the bar that was hit
15    pub bar_idx: usize,
16    /// Screen position of the hit
17    pub position: egui::Pos2,
18}