pub struct SeriesSettings {Show 25 fields
pub chart_type: ChartType,
pub chart_type_params: ChartTypeParams,
pub bullish_color: Color32,
pub bearish_color: Color32,
pub bullish_border_color: Option<Color32>,
pub bearish_border_color: Option<Color32>,
pub bullish_wick_color: Option<Color32>,
pub bearish_wick_color: Option<Color32>,
pub price_source: PriceSource,
pub visible_all_timeframes: bool,
pub visible_timeframes: Vec<String>,
pub show_ohlc_values: bool,
pub show_change: bool,
pub show_volume: bool,
pub show_bar_change: bool,
pub decimal_places: u8,
pub price_scale_mode: PriceScaleMode,
pub show_price_line: bool,
pub show_prev_close_line: bool,
pub invert_scale: bool,
pub alerts: SeriesAlerts,
pub background_type: u8,
pub show_vertical_grid: bool,
pub show_horizontal_grid: bool,
pub crosshair_mode: u8,
}Expand description
Settings for chart series appearance
Fields§
§chart_type: ChartTypeActive chart type, used by the dialog to choose the controls to show. Applying settings keeps the chart’s currently selected type.
chart_type_params: ChartTypeParamsRetained styles and chart type parameters.
bullish_color: Color32Bullish candle body color
bearish_color: Color32Bearish candle body color
bullish_border_color: Option<Color32>Bullish candle border color (None = same as fill)
bearish_border_color: Option<Color32>Bearish candle border color (None = same as fill)
bullish_wick_color: Option<Color32>Bullish wick color (None = same as fill)
bearish_wick_color: Option<Color32>Bearish wick color (None = same as fill)
price_source: PriceSourcePrice source for line calculations
visible_all_timeframes: boolWhether to show on all timeframes
visible_timeframes: Vec<String>Specific visible timeframes (when not all)
show_ohlc_values: boolShow OHLC values in status line
show_change: boolShow price change in status line
show_volume: boolShow volume in status line
show_bar_change: boolShow bar change (open to close) in status line
decimal_places: u8Decimal places for price display
price_scale_mode: PriceScaleModePrice scale mode (Normal, Log, Percentage, IndexedTo100)
show_price_line: boolShow last price horizontal line
show_prev_close_line: boolShow previous close line
invert_scale: boolInvert the price scale
alerts: SeriesAlertsVisibility and style of this series’ alert levels
background_type: u8Background type: 0 = Solid, 1 = Gradient
show_vertical_grid: boolShow vertical grid lines
show_horizontal_grid: boolShow horizontal grid lines
crosshair_mode: u8Crosshair mode: 0 = Full, 1 = Cross, 2 = None
Implementations§
Source§impl SeriesSettings
impl SeriesSettings
Sourcepub fn effective_bullish_border(&self) -> Color32
pub fn effective_bullish_border(&self) -> Color32
Get the effective bullish border color
Sourcepub fn effective_bearish_border(&self) -> Color32
pub fn effective_bearish_border(&self) -> Color32
Get the effective bearish border color
Sourcepub fn effective_bullish_wick(&self) -> Color32
pub fn effective_bullish_wick(&self) -> Color32
Get the effective bullish wick color
Sourcepub fn effective_bearish_wick(&self) -> Color32
pub fn effective_bearish_wick(&self) -> Color32
Get the effective bearish wick color
Sourcepub fn reset_to_default(&mut self)
pub fn reset_to_default(&mut self)
Reset settings to defaults, keeping the active chart type for dialog context.
Sourcepub fn compute_line_value(
&self,
open: f64,
high: f64,
low: f64,
close: f64,
) -> f64
pub fn compute_line_value( &self, open: f64, high: f64, low: f64, close: f64, ) -> f64
Compute the line value for a bar based on the configured price source.
Use this when rendering line charts to respect the user’s price source selection.
For example: settings.compute_line_value(bar.open, bar.high, bar.low, bar.close)
Sourcepub fn compute_line_values(&self, bars: &[Bar]) -> Vec<f64>
pub fn compute_line_values(&self, bars: &[Bar]) -> Vec<f64>
Compute line values for a slice of bars based on price source.
Returns a Vec of computed values matching the input bars.
Trait Implementations§
Source§impl Clone for SeriesSettings
impl Clone for SeriesSettings
Source§fn clone(&self) -> SeriesSettings
fn clone(&self) -> SeriesSettings
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 SeriesSettings
impl Debug for SeriesSettings
Auto Trait Implementations§
impl Freeze for SeriesSettings
impl RefUnwindSafe for SeriesSettings
impl Send for SeriesSettings
impl Sync for SeriesSettings
impl Unpin for SeriesSettings
impl UnsafeUnpin for SeriesSettings
impl UnwindSafe for SeriesSettings
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,
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