pub struct SeriesOptions {Show 13 fields
pub price_precision: Option<u8>,
pub source: Option<SeriesId>,
pub color: Option<Rgba>,
pub down_color: Option<Rgba>,
pub top_fill: Option<Rgba>,
pub bottom_fill: Option<Rgba>,
pub line_width: Css,
pub line_style: LineDash,
pub step: bool,
pub base_value: f64,
pub last_value_visible: bool,
pub price_line_visible: bool,
pub shift: i32,
}Expand description
Options of a series. Colors left at None come from the theme.
§Examples
use ferrochart_core::chart::SeriesOptions;
use ferrochart_core::data::SeriesId;
use ferrochart_core::geom::{Css, Rgba};
let opts = SeriesOptions::volume_of(SeriesId(0));
assert_eq!(opts.source, Some(SeriesId(0)));
let line = SeriesOptions {
color: Some(Rgba::hex(0x00FF_6D00)),
line_width: Css(1.0),
..SeriesOptions::default()
};Fields§
§price_precision: Option<u8>Decimal places of price labels; None (the default) is automatic:
at least 2 decimals and 4 significant digits of the visible values,
with a subscript count of zeros for small prices (0.0₄1234).
source: Option<SeriesId>For SeriesKind::Volume: the OHLC series whose volume is drawn.
color: Option<Rgba>Main color: the line of Line/Area, the bars of Histogram, up
candles and bars, the line of Baseline above its base.
down_color: Option<Rgba>Down candles and bars; the line of Baseline below its base.
top_fill: Option<Rgba>Fill at the top of an Area; fill above the base of a Baseline.
bottom_fill: Option<Rgba>Fill at the bottom of an Area; fill below the base of a Baseline.
line_width: CssLine width of Line, Area and Baseline.
line_style: LineDashDash pattern of the line.
step: boolStep line: horizontal to the next point’s time, then vertical.
base_value: f64Base value of Baseline (fill boundary) and Histogram (bar base).
last_value_visible: boolLabel with the last value on the price axis. Not drawn for volume series.
price_line_visible: boolDotted horizontal line at the last value. Not drawn for volume series.
shift: i32Display shift in bars: the point at logical index j is drawn at
j + shift (Ichimoku’s leading spans and lagging line).
Autoscale and the crosshair follow the drawn positions.