#[non_exhaustive]pub struct TooltipOptions {Show 19 fields
pub enabled: bool,
pub on_long_press: bool,
pub mode: TooltipMode,
pub show_ohlc: bool,
pub show_volume: bool,
pub show_volume_details: bool,
pub show_change: bool,
pub show_time: bool,
pub show_indicators: bool,
pub magnifier_zoom: f32,
pub magnifier_size: f32,
pub background_color: Color32,
pub text_color: Color32,
pub border_color_bullish: Color32,
pub border_color_bearish: Color32,
pub font_size: f32,
pub price_precision: usize,
pub tracking_bar_height: f32,
pub tracking_bar_background: Color32,
}Expand description
Tooltip configuration options
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.enabled: boolWhether the hover readout is drawn at all.
When false the chart still shows the crosshair but suppresses the
OHLC/value readout, matching charting UIs that let users toggle the
data tooltip independently of the crosshair.
on_long_press: boolShow values only while the primary pointer is held. Touch waits for a long press.
mode: TooltipModeTooltip display mode
show_ohlc: boolShow OHLC values (Open, High, Low, Close)
show_volume: boolShow volume
show_volume_details: boolInclude volume study plot details in held values, in addition to total volume. Other study values and hover readouts retain their existing visibility.
show_change: boolShow price change (absolute and percentage)
show_time: boolShow ts
show_indicators: boolShow indicator values (if indicators are present)
magnifier_zoom: f32Magnifier zoom level (2.0 = 2x zoom, 3.0 = 3x zoom), drawn within 0.1 to 100 (NaN as 0.1) Only applies when mode is Magnifier
magnifier_size: f32Magnifier lens diameter in pixels, drawn no larger than the plot’s smaller side Only applies when mode is Magnifier
background_color: Color32Background color for floating tooltip (Color32::PLACEHOLDER: active theme)
text_color: Color32Text color for tooltip content (Color32::PLACEHOLDER: active theme)
border_color_bullish: Color32Border color for the floating tooltip of a rising bar (Color32::PLACEHOLDER: active theme)
border_color_bearish: Color32Border color for the floating tooltip of a falling bar (Color32::PLACEHOLDER: active theme)
font_size: f32Font size for tooltip text
price_precision: usizeMost decimals for price values. The floating tooltip shows fewer for prices whose magnitude needs fewer; the tracking bar shows this many, at most 4.
tracking_bar_height: f32Tracking bar height (for Tracking mode)
tracking_bar_background: Color32Tracking bar background color (Color32::PLACEHOLDER: active theme)
Implementations§
Source§impl TooltipOptions
impl TooltipOptions
Sourcepub fn magnifier_with_zoom(zoom: f32) -> Self
pub fn magnifier_with_zoom(zoom: f32) -> Self
Create magnifier with custom zoom level
Sourcepub fn with_mode(self, mode: TooltipMode) -> Self
pub fn with_mode(self, mode: TooltipMode) -> Self
Set tooltip mode
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Enable or disable the hover readout.
Sourcepub fn with_volume(self, show: bool) -> Self
pub fn with_volume(self, show: bool) -> Self
Enable/disable volume display
Sourcepub fn with_change(self, show: bool) -> Self
pub fn with_change(self, show: bool) -> Self
Enable/disable change display
Sourcepub fn with_magnifier_zoom(self, zoom: f32) -> Self
pub fn with_magnifier_zoom(self, zoom: f32) -> Self
Set magnifier zoom level
Sourcepub fn with_magnifier_size(self, size: f32) -> Self
pub fn with_magnifier_size(self, size: f32) -> Self
Set magnifier size
Sourcepub fn with_precision(self, precision: usize) -> Self
pub fn with_precision(self, precision: usize) -> Self
Set price precision
Trait Implementations§
Source§impl Clone for TooltipOptions
impl Clone for TooltipOptions
Source§fn clone(&self) -> TooltipOptions
fn clone(&self) -> TooltipOptions
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 TooltipOptions
impl Debug for TooltipOptions
Source§impl Default for TooltipOptions
impl Default for TooltipOptions
Source§impl<'de> Deserialize<'de> for TooltipOptions
impl<'de> Deserialize<'de> for TooltipOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for TooltipOptions
impl PartialEq for TooltipOptions
Source§impl Serialize for TooltipOptions
impl Serialize for TooltipOptions
impl StructuralPartialEq for TooltipOptions
Auto Trait Implementations§
impl Freeze for TooltipOptions
impl RefUnwindSafe for TooltipOptions
impl Send for TooltipOptions
impl Sync for TooltipOptions
impl Unpin for TooltipOptions
impl UnsafeUnpin for TooltipOptions
impl UnwindSafe for TooltipOptions
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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