pub struct TooltipState {
pub series_index: usize,
pub data_index: usize,
pub x: f64,
pub y: f64,
pub lines: Vec<(String, String)>,
}Expand description
The state of the chart’s tooltip.
The tooltip is a first-class part of the chart: an application shows it with an action, and the chart draws it above everything else.
Fields§
§series_index: usizeThe index of the series the tooltip describes.
data_index: usizeThe index of the data point the tooltip describes.
x: f64The horizontal position of the tooltip, in canvas pixels.
y: f64The vertical position of the tooltip, in canvas pixels.
lines: Vec<(String, String)>The lines the tooltip shows.
Implementations§
Source§impl TooltipState
impl TooltipState
pub fn get_series_index(&self) -> usize
pub fn get_mut_series_index(&mut self) -> &mut usize
pub fn set_series_index(&mut self, val: usize) -> &mut Self
pub fn get_data_index(&self) -> usize
pub fn get_mut_data_index(&mut self) -> &mut usize
pub fn set_data_index(&mut self, val: usize) -> &mut Self
pub fn get_x(&self) -> f64
pub fn get_mut_x(&mut self) -> &mut f64
pub fn set_x(&mut self, val: f64) -> &mut Self
pub fn get_y(&self) -> f64
pub fn get_mut_y(&mut self) -> &mut f64
pub fn set_y(&mut self, val: f64) -> &mut Self
pub fn get_lines(&self) -> &Vec<(String, String)>
pub fn get_mut_lines(&mut self) -> &mut Vec<(String, String)>
pub fn set_lines(&mut self, val: Vec<(String, String)>) -> &mut Self
Trait Implementations§
Source§impl Clone for TooltipState
impl Clone for TooltipState
Source§impl Debug for TooltipState
impl Debug for TooltipState
Source§impl Default for TooltipState
impl Default for TooltipState
Source§impl PartialEq for TooltipState
impl PartialEq for TooltipState
impl StructuralPartialEq for TooltipState
Auto Trait Implementations§
impl Freeze for TooltipState
impl RefUnwindSafe for TooltipState
impl Send for TooltipState
impl Sync for TooltipState
impl Unpin for TooltipState
impl UnsafeUnpin for TooltipState
impl UnwindSafe for TooltipState
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
Mutably borrows from an owned value. Read more