pub struct PriceLine {
pub price: f64,
pub color: Color32,
pub width: f32,
pub style: LineStyle,
pub title: Option<String>,
pub axis_label: bool,
pub axis_label_color: Option<Color32>,
pub axis_label_text_color: Option<Color32>,
pub title_color: Option<Color32>,
}Expand description
A horizontal line at a price on a series’ scale, with an optional title and a price axis label.
Fields§
§price: f64Price in the series’ units.
color: Color32Colour of the line, title and axis tag.
width: f32Width in points. Default 1.0.
style: LineStyleDefault LineStyle::Dashed.
title: Option<String>Drawn at the left end of the line, above it.
axis_label: boolPrice label on the axis, on a tag in the line’s colour. Default true.
axis_label_color: Option<Color32>Fill of the axis tag; None uses color.
axis_label_text_color: Option<Color32>Text of the axis tag; None picks white or black, whichever reads on the fill.
title_color: Option<Color32>Colour of the title; None uses color.
Implementations§
Source§impl PriceLine
impl PriceLine
Sourcepub fn with_width(self, width: f32) -> Self
pub fn with_width(self, width: f32) -> Self
Sets the width in points.
Sourcepub fn with_style(self, style: LineStyle) -> Self
pub fn with_style(self, style: LineStyle) -> Self
Sets the line style.
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Sets the title drawn just above the line’s left end.
Sourcepub fn with_axis_label(self, show: bool) -> Self
pub fn with_axis_label(self, show: bool) -> Self
Sets whether to draw the price axis label.
Sourcepub fn with_axis_label_colors(self, fill: Color32, text: Color32) -> Self
pub fn with_axis_label_colors(self, fill: Color32, text: Color32) -> Self
Sets the fill and the text colour of the axis tag.
Sourcepub fn with_title_color(self, color: Color32) -> Self
pub fn with_title_color(self, color: Color32) -> Self
Sets the colour of the title.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PriceLine
impl<'de> Deserialize<'de> for PriceLine
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for PriceLine
Auto Trait Implementations§
impl Freeze for PriceLine
impl RefUnwindSafe for PriceLine
impl Send for PriceLine
impl Sync for PriceLine
impl Unpin for PriceLine
impl UnsafeUnpin for PriceLine
impl UnwindSafe for PriceLine
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
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> ⓘ
Converts
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> ⓘ
Converts
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