pub struct PriceHorizontalScale {
pub precision: usize,
}Expand description
A horizontal scale of prices, such as the strikes of an option chain, encoded with
key_time.
The axis labels the roundest prices in view first: multiples of 100, then of 50, 25, 10, 5
and 1, then half prices, and draws the roundest kind shown in bold. Labels and the crosshair
show precision decimals.
Fields§
§precision: usizeDecimals of the labels.
Trait Implementations§
Source§impl Clone for PriceHorizontalScale
impl Clone for PriceHorizontalScale
Source§fn clone(&self) -> PriceHorizontalScale
fn clone(&self) -> PriceHorizontalScale
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PriceHorizontalScale
Source§impl Debug for PriceHorizontalScale
impl Debug for PriceHorizontalScale
Source§impl Default for PriceHorizontalScale
impl Default for PriceHorizontalScale
impl Eq for PriceHorizontalScale
Source§impl HorizontalScale for PriceHorizontalScale
impl HorizontalScale for PriceHorizontalScale
Source§fn tick_marks(
&self,
points: &[(DateTime<Utc>, usize)],
layout: &TickMarkLayout,
) -> Vec<TickMark>
fn tick_marks( &self, points: &[(DateTime<Utc>, usize)], layout: &TickMarkLayout, ) -> Vec<TickMark>
The marks to label among
points, the key and logical index of each bar in view in
order, extended into whitespace on both sides using the chart’s full-history time
mapping. When the keys reach before the first bar, every index is shifted by the same
number of slots, so only the order of the indices and their differences carry meaning.
The renderer places each mark at its key and skips labels that would overlap.Source§impl PartialEq for PriceHorizontalScale
impl PartialEq for PriceHorizontalScale
impl StructuralPartialEq for PriceHorizontalScale
Auto Trait Implementations§
impl Freeze for PriceHorizontalScale
impl RefUnwindSafe for PriceHorizontalScale
impl Send for PriceHorizontalScale
impl Sync for PriceHorizontalScale
impl Unpin for PriceHorizontalScale
impl UnsafeUnpin for PriceHorizontalScale
impl UnwindSafe for PriceHorizontalScale
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
Mutably borrows from an owned value. Read more
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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> ⓘ
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 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> ⓘ
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