#[non_exhaustive]pub struct ChartPointer {Show 13 fields
pub time: DateTime<Utc>,
pub price: f64,
pub series: SeriesId,
pub index: isize,
pub pos: Pos2,
pub pane: usize,
pub bar: Option<Bar>,
pub previous_close: Option<f64>,
pub series_bars: Vec<(SeriesId, Bar)>,
pub studies: Vec<(SeriesId, StudyValue)>,
pub target: Option<PointerTarget>,
pub modifiers: Modifiers,
pub kind: PointerKind,
}Expand description
A chart cursor position with the data a host legend, tooltip or context action reads. Identical whitespace slots compare equal, including their colours and host payloads.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.time: DateTime<Utc>Nearest eligible slot’s timestamp, respecting the time-scale index filters.
With both filters off, extrapolated into whitespace as in visible_time_range.
price: f64Price on the main pane, or the value on the scale of the hovered pane or volume.
series: SeriesIdMAIN, VOLUME, or the first series or study of another hovered pane. An empty pane
reports no position.
index: isizeNearest slot in the rendered series, counting elements on price-based chart types. Negative or past the last bar in whitespace.
pos: Pos2Pointer position in UI points, the coordinates of the chart’s Response::rect.
pane: usizePane counted from the top among the panes drawn, the price pane with its volume band
included: 0 unless panes sit above the price pane.
bar: Option<Bar>Main series bar, or price-based element, at index, with its colours and payload: a
whitespace bar in an empty slot, None in the whitespace before the
first bar or after the last.
previous_close: Option<f64>Close of the last bar or element with a value before index, from which legends measure
the change.
series_bars: Vec<(SeriesId, Bar)>Every series added with add_series or add_comparison that has a bar at time,
including hidden series and their host payloads.
studies: Vec<(SeriesId, StudyValue)>Visible study plots at index, as Chart::study_values_at returns them, each with the
id of its study.
target: Option<PointerTarget>The drawing, series or study line under the pointer, in the priority a click selects.
modifiers: ModifiersModifier keys held during the event.
kind: PointerKindDevice that produced the event.
Trait Implementations§
Source§impl Clone for ChartPointer
impl Clone for ChartPointer
Source§fn clone(&self) -> ChartPointer
fn clone(&self) -> ChartPointer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChartPointer
impl Debug for ChartPointer
Auto Trait Implementations§
impl Freeze for ChartPointer
impl RefUnwindSafe for ChartPointer
impl Send for ChartPointer
impl Sync for ChartPointer
impl Unpin for ChartPointer
impl UnsafeUnpin for ChartPointer
impl UnwindSafe for ChartPointer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more