pub struct SeriesStyle {
pub display_format: Option<SeriesDisplayFormat>,
pub last_value_visible: bool,
pub price_line_visible: bool,
pub price_line_source: PriceLineSource,
pub price_line_color: Option<Color32>,
pub price_line_width: f32,
pub price_line_style: LineStyle,
pub base_line_visible: bool,
pub autoscale: Option<AutoscaleProvider>,
pub hit_tolerance: f32,
pub alerts: SeriesAlerts,
}Expand description
A bar series’ last value label, price line, base line, autoscale, click tolerance and alert levels.
The chart-wide ChartConfig::show_symbol_last_val and show_price_line switches hide every
series’ labels and price lines.
Fields§
§display_format: Option<SeriesDisplayFormat>Raw-value display for ticks, tags, legends and readouts. None retains instrument or
scale formatting. Explicit series formatters take precedence, followed by the chart’s
price formatter, then this declaration. Percentage and indexed scale modes keep their
transformed labels. A shared axis takes precision and minimum movement from its first
visible series; each series keeps its own tag and readout format.
last_value_visible: boolLabel the last value on the price axis.
price_line_visible: boolDraw a horizontal line at the last value.
price_line_source: PriceLineSourceThe bar whose value the price line and the last value label show.
price_line_color: Option<Color32>Price line colour; None takes the series colour, which for the main series follows the
direction of the bar.
price_line_width: f32Price line width in logical points.
price_line_style: LineStylePrice line style.
base_line_visible: boolDraw a line at the series’ base value, 0% in percentage mode and 100 in indexed mode. Other scale modes have no base value.
autoscale: Option<AutoscaleProvider>Replaces the range the series contributes to its scale’s fit. A function is not saved; hosts set it again after restoring a chart.
hit_tolerance: f32Horizontal distance in logical points from a bar’s centre within which a click on its high to low range selects the main series. Host series do not take clicks.
alerts: SeriesAlertsVisibility and style of the series’ alert levels.
Trait Implementations§
Source§impl Clone for SeriesStyle
impl Clone for SeriesStyle
Source§fn clone(&self) -> SeriesStyle
fn clone(&self) -> SeriesStyle
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 SeriesStyle
impl Debug for SeriesStyle
Source§impl Default for SeriesStyle
impl Default for SeriesStyle
Source§impl<'de> Deserialize<'de> for SeriesStyle
impl<'de> Deserialize<'de> for SeriesStyle
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 SeriesStyle
impl PartialEq for SeriesStyle
Source§impl Serialize for SeriesStyle
impl Serialize for SeriesStyle
impl StructuralPartialEq for SeriesStyle
Auto Trait Implementations§
impl !RefUnwindSafe for SeriesStyle
impl !UnwindSafe for SeriesStyle
impl Freeze for SeriesStyle
impl Send for SeriesStyle
impl Sync for SeriesStyle
impl Unpin for SeriesStyle
impl UnsafeUnpin for SeriesStyle
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