Skip to main content

TimeScaleOptions

Struct TimeScaleOptions 

Source
pub struct TimeScaleOptions {
Show 23 fields pub right_offset: f32, pub right_offset_pixels: Option<f32>, pub bar_spacing: f32, pub min_bar_spacing: f32, pub max_bar_spacing: f32, pub fix_left_edge: bool, pub fix_right_edge: bool, pub lock_visible_time_range_on_resize: bool, pub right_bar_stays_on_scroll: bool, pub shift_visible_range_on_new_bar: bool, pub allow_shift_visible_range_on_whitespace_replacement: bool, pub ignore_whitespace_indices: bool, pub ignore_hidden_indices: bool, pub time_visible: bool, pub seconds_visible: bool, pub ticks_visible: bool, pub uniform_distribution: bool, pub allow_bold_labels: bool, pub tick_mark_max_character_length: usize, pub minimum_height: f32, pub border_visible: bool, pub border_color: Option<Color32>, pub timezone: TimezoneMode,
}
Expand description

Time Scale Options. Controls bar spacing, scrolling constraints, and time display.

Fields§

§right_offset: f32

The margin space in bars from the right side of the chart, kept whenever the view returns to the live edge. Default: 2.5

§right_offset_pixels: Option<f32>

The margin space in pixels from the right side of the chart. This option has priority over right_offset. Default: None

§bar_spacing: f32

The space between bars in pixels. Default: 6.0

§min_bar_spacing: f32

The min space between bars in pixels, floored at 0.000001 even when set to zero. Non-finite values use the default. Default: 0.5

§max_bar_spacing: f32

The max space between bars in pixels. Non-positive or non-finite values are unlimited; positive limits have a 0.000001 floor. Default: 0.0

§fix_left_edge: bool

Prevent scrolling to the left of the first bar: the view stops with the first bar at the left edge, and when every bar fits the empty space is on the right. Default: false

§fix_right_edge: bool

Prevent scrolling to the right of the most recent bar. Default: false

§lock_visible_time_range_on_resize: bool

Prevent changing the visible time range during chart resizing. Default: false

§right_bar_stays_on_scroll: bool

Keep the right offset when zooming with the mouse wheel, a pinch or the keyboard, so the bar at the right edge stays in place instead of the bar under the pointer. Default: false

§shift_visible_range_on_new_bar: bool

Shift the visible range to the right (into the future) by the number of new bars when new data is added. Note that this only applies when the last bar is visible. Default: true

§allow_shift_visible_range_on_whitespace_replacement: bool

Allow the visible range to be shifted to the right when a new bar is added which is replacing an existing whitespace time point on the chart. Default: false

§ignore_whitespace_indices: bool

Exclude slots with no values in any bar series or study plot from crosshair selection. The nearest eligible slot is selected; equal distances prefer the later slot. Stored data and time-axis marks are unchanged. Default: false.

§ignore_hidden_indices: bool

Exclude slots whose values belong only to hidden series or study plots from crosshair selection. Slots with no values are controlled by ignore_whitespace_indices. With both filters enabled, any visible value keeps a slot eligible. If no eligible slot is in view, no crosshair is shown or reported. Default: false.

§time_visible: bool

Include the clock in intraday time-scale and crosshair labels. Default: true

§seconds_visible: bool

Show seconds in the time scale and vertical crosshair label in hh:mm:ss format for intraday data. Default: true

§ticks_visible: bool

Draw small vertical line on time axis labels. Default: false

§uniform_distribution: bool

Changes horizontal scale marks generation. With this flag equal to true, marks of the same weight are either all drawn or none are drawn at all. Default: false

§allow_bold_labels: bool

Allow major time scale labels (day, month and year boundaries) to be rendered in a bolder font weight. Default: true

§tick_mark_max_character_length: usize

The longest expected tick mark label in characters, which sets the minimum distance between time scale labels; raise it for a custom formatter with longer labels. Zero is treated as the default. Default: 8

§minimum_height: f32

The minimum height of the time scale in points. The time scale is taller when its labels need more space, and has no height while time labels are hidden. Default: 0.0

§border_visible: bool

Draw a line along the top edge of the time scale. Default: false

§border_color: Option<Color32>

The colour of the time scale border; None uses the theme’s border colour. Default: None

§timezone: TimezoneMode

Timezone mode for displaying ts Default: UTC

Trait Implementations§

Source§

impl Clone for TimeScaleOptions

Source§

fn clone(&self) -> TimeScaleOptions

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 Debug for TimeScaleOptions

Source§

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

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

impl Default for TimeScaleOptions

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for TimeScaleOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TimeScaleOptions

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for TimeScaleOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for TimeScaleOptions

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> MaybeSend for T
where T: Send + Sync + ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,

§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.