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: f32The 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: f32The space between bars in pixels. Default: 6.0
min_bar_spacing: f32The 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: f32The 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: boolPrevent 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: boolPrevent scrolling to the right of the most recent bar. Default: false
lock_visible_time_range_on_resize: boolPrevent changing the visible time range during chart resizing. Default: false
right_bar_stays_on_scroll: boolKeep 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: boolShift 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: boolAllow 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: boolExclude 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.
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: boolInclude the clock in intraday time-scale and crosshair labels. Default: true
seconds_visible: boolShow seconds in the time scale and vertical crosshair label in hh:mm:ss format for intraday data. Default: true
ticks_visible: boolDraw small vertical line on time axis labels. Default: false
uniform_distribution: boolChanges 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: boolAllow major time scale labels (day, month and year boundaries) to be rendered in a bolder font weight. Default: true
tick_mark_max_character_length: usizeThe 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: f32The 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: boolDraw 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: TimezoneModeTimezone mode for displaying ts Default: UTC
Trait Implementations§
Source§impl Clone for TimeScaleOptions
impl Clone for TimeScaleOptions
Source§fn clone(&self) -> TimeScaleOptions
fn clone(&self) -> TimeScaleOptions
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 TimeScaleOptions
impl Debug for TimeScaleOptions
Source§impl Default for TimeScaleOptions
impl Default for TimeScaleOptions
Source§impl<'de> Deserialize<'de> for TimeScaleOptions
impl<'de> Deserialize<'de> for TimeScaleOptions
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>,
Source§impl PartialEq for TimeScaleOptions
impl PartialEq for TimeScaleOptions
Source§impl Serialize for TimeScaleOptions
impl Serialize for TimeScaleOptions
impl StructuralPartialEq for TimeScaleOptions
Auto Trait Implementations§
impl Freeze for TimeScaleOptions
impl RefUnwindSafe for TimeScaleOptions
impl Send for TimeScaleOptions
impl Sync for TimeScaleOptions
impl Unpin for TimeScaleOptions
impl UnsafeUnpin for TimeScaleOptions
impl UnwindSafe for TimeScaleOptions
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,
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> ⓘ
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