Skip to main content

SeriesStyle

Struct SeriesStyle 

Source
pub struct SeriesStyle {
    pub up: Rgba,
    pub down: Rgba,
    pub up_wick: Rgba,
    pub down_wick: Rgba,
    pub up_border: Rgba,
    pub down_border: Rgba,
    pub line_width: Px,
    pub line_dash: LineDash,
    pub step: bool,
    pub fill_top: Rgba,
    pub fill_bottom: Rgba,
    pub base_value: f64,
}
Expand description

Fully resolved colors of a series draw. The backend never decides colors; it only picks up or down per bar using the rule in transform_helpers.

Value series use the fields as follows: Line/Area: up is the line color; Area fills from fill_top at the top of the clip to fill_bottom at its bottom. Baseline: up/fill_top above base_value, down/fill_bottom below it. Histogram: up is the bar color (unless the point has its own color), bars stand on base_value.

Fields§

§up: Rgba

Body / bar color of up bars (close >= open).

§down: Rgba

Body / bar color of down bars.

§up_wick: Rgba

Wick color of up bars.

§down_wick: Rgba

Wick color of down bars.

§up_border: Rgba

Border color of up bodies.

§down_border: Rgba

Border color of down bodies.

§line_width: Px

Line width of line-like series.

§line_dash: LineDash

Dash pattern of line-like series.

§step: bool

Step line (horizontal, then vertical) instead of straight segments.

§fill_top: Rgba

Upper fill color (see above).

§fill_bottom: Rgba

Lower fill color (see above).

§base_value: f64

Base value of Baseline and Histogram, in price space.

Trait Implementations§

Source§

impl Clone for SeriesStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for SeriesStyle

Source§

impl Debug for SeriesStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SeriesStyle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for SeriesStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SeriesStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.