pub struct PriceMarkGeneratorConfig {
pub min_spacing: f32,
pub max_marks: usize,
pub target_density: f32,
pub min_price_step: Option<f64>,
}Expand description
Configuration for price mark generation, set per scale through
PriceScaleOptions::tick_marks.
Fields§
§min_spacing: f32Min spacing between marks in pixels, which keeps labels from overlapping at any density
max_marks: usizeMax number of marks, capped at 1,000 during generation.
target_density: f32Target density (marks per 100 pixels): linear marks take the nice step nearest
100 / target_density pixels, logarithmic marks stay at least that far apart, and no
marks are closer than min_spacing
min_price_step: Option<f64>Minimum price tick size. Normal and logarithmic marks lie on its multiples;
invalid sizes are ignored. None uses the chart instrument’s tick size when available.
Trait Implementations§
Source§impl Clone for PriceMarkGeneratorConfig
impl Clone for PriceMarkGeneratorConfig
Source§fn clone(&self) -> PriceMarkGeneratorConfig
fn clone(&self) -> PriceMarkGeneratorConfig
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 PriceMarkGeneratorConfig
Source§impl Debug for PriceMarkGeneratorConfig
impl Debug for PriceMarkGeneratorConfig
Source§impl Default for PriceMarkGeneratorConfig
impl Default for PriceMarkGeneratorConfig
Source§impl<'de> Deserialize<'de> for PriceMarkGeneratorConfig
impl<'de> Deserialize<'de> for PriceMarkGeneratorConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PriceMarkGeneratorConfig
impl PartialEq for PriceMarkGeneratorConfig
Source§impl Serialize for PriceMarkGeneratorConfig
impl Serialize for PriceMarkGeneratorConfig
impl StructuralPartialEq for PriceMarkGeneratorConfig
Auto Trait Implementations§
impl Freeze for PriceMarkGeneratorConfig
impl RefUnwindSafe for PriceMarkGeneratorConfig
impl Send for PriceMarkGeneratorConfig
impl Sync for PriceMarkGeneratorConfig
impl Unpin for PriceMarkGeneratorConfig
impl UnsafeUnpin for PriceMarkGeneratorConfig
impl UnwindSafe for PriceMarkGeneratorConfig
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<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> ⓘ
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