pub struct PriceMarkGenerator { /* private fields */ }Expand description
Smart price axis mark generator Implements “nice numbers” algorithm for price ticks
Implementations§
Source§impl PriceMarkGenerator
impl PriceMarkGenerator
Sourcepub fn with_config(config: PriceMarkGeneratorConfig) -> Self
pub fn with_config(config: PriceMarkGeneratorConfig) -> Self
Create with custom config
Sourcepub fn generate_marks(&self, map: &PriceMap) -> Vec<PriceMark>
pub fn generate_marks(&self, map: &PriceMap) -> Vec<PriceMark>
Generates marks for the visible range of map, positioned through it.
Logarithmic scales get marks at 1, 2 and 5 times powers of ten; the other modes get evenly stepped marks in scale units, labelled as prices, signed percentages or index values. Labels group their thousands with the map’s separator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PriceMarkGenerator
impl RefUnwindSafe for PriceMarkGenerator
impl Send for PriceMarkGenerator
impl Sync for PriceMarkGenerator
impl Unpin for PriceMarkGenerator
impl UnsafeUnpin for PriceMarkGenerator
impl UnwindSafe for PriceMarkGenerator
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> 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