[][src]Trait plotters_unstable::coord::ranged1d::Ranged

pub trait Ranged {
    type FormatOption: DefaultValueFormatOption;
    type ValueType;
    fn map(&self, value: &Self::ValueType, limit: (i32, i32)) -> i32;
fn key_points<Hint: KeyPointHint>(&self, hint: Hint) -> Vec<Self::ValueType>;
fn range(&self) -> Range<Self::ValueType>; fn axis_pixel_range(&self, limit: (i32, i32)) -> Range<i32> { ... } }

The trait that indicates we have a ordered and ranged value Which is used to describe any 1D axis.

Associated Types

type FormatOption: DefaultValueFormatOption

This marker decides if Plotters default ValueFormatter implementation should be used. This assicated type can be one of follow two types:

  • DefaultFormatting will allow Plotters automatically impl the formatter based on Debug trait, if Debug trait is not impl for the Self::Value, ValueFormatter will not impl unless you impl it manually.

  • NoDefaultFormatting Disable the automatical Debug based value formatting. Thus you have to impl the ValueFormatter manually.

type ValueType

The type of this value in this range specification

Loading content...

Required methods

fn map(&self, value: &Self::ValueType, limit: (i32, i32)) -> i32

This function maps the value to i32, which is the drawing coordinate

fn key_points<Hint: KeyPointHint>(&self, hint: Hint) -> Vec<Self::ValueType>

This function gives the key points that we can draw a grid based on this

fn range(&self) -> Range<Self::ValueType>

Get the range of this value

Loading content...

Provided methods

fn axis_pixel_range(&self, limit: (i32, i32)) -> Range<i32>

This function provides the on-axis part of its range

Loading content...

Implementors

impl Ranged for RangedCoordf32[src]

type FormatOption = DefaultFormatting

type ValueType = f32

impl Ranged for RangedCoordf64[src]

type FormatOption = DefaultFormatting

type ValueType = f64

impl Ranged for RangedCoordi32[src]

type FormatOption = DefaultFormatting

type ValueType = i32

impl Ranged for RangedCoordi64[src]

type FormatOption = DefaultFormatting

type ValueType = i64

impl Ranged for RangedCoordi128[src]

type FormatOption = DefaultFormatting

type ValueType = i128

impl Ranged for RangedCoordu32[src]

type FormatOption = DefaultFormatting

type ValueType = u32

impl Ranged for RangedCoordu64[src]

type FormatOption = DefaultFormatting

type ValueType = u64

impl Ranged for RangedCoordu128[src]

type FormatOption = DefaultFormatting

type ValueType = u128

impl Ranged for RangedCoordusize[src]

type FormatOption = DefaultFormatting

type ValueType = usize

impl Ranged for RangedDuration[src]

type FormatOption = DefaultFormatting

type ValueType = Duration

impl<'a, T: PartialEq> Ranged for RangedSlice<'a, T>[src]

type FormatOption = DefaultFormatting

type ValueType = &'a T

impl<D> Ranged for RangedDate<D> where
    D: Datelike + TimeValue + Sub<D, Output = Duration> + Add<Duration, Output = D> + Clone
[src]

type FormatOption = DefaultFormatting

type ValueType = D

impl<D: DiscreteRanged> Ranged for SegmentedCoord<D>[src]

type FormatOption = NoDefaultFormatting

type ValueType = SegmentValue<D::ValueType>

impl<DT> Ranged for RangedDateTime<DT> where
    DT: Datelike + Timelike + TimeValue + Clone + PartialOrd,
    DT: Add<Duration, Output = DT>,
    DT: Sub<DT, Output = Duration>,
    RangedDate<DT::DateType>: Ranged<ValueType = DT::DateType>, 
[src]

type FormatOption = DefaultFormatting

type ValueType = DT

impl<P: DiscreteRanged, S: Ranged> Ranged for NestedRange<P, S>[src]

type FormatOption = NoDefaultFormatting

type ValueType = NestedValue<P::ValueType, S::ValueType>

impl<R: Ranged> Ranged for WithKeyPointMethod<R>[src]

type ValueType = R::ValueType

type FormatOption = R::FormatOption

impl<R: Ranged> Ranged for WithKeyPoints<R> where
    R::ValueType: Clone
[src]

type ValueType = R::ValueType

type FormatOption = R::FormatOption

impl<T: DiscreteRanged> Ranged for GroupBy<T>[src]

type FormatOption = NoDefaultFormatting

type ValueType = T::ValueType

impl<T: Ranged, S: Clone, R: LinspaceRoundingMethod<T::ValueType>> Ranged for Linspace<T, S, R> where
    T::ValueType: Add<S, Output = T::ValueType> + PartialOrd + Clone
[src]

type FormatOption = NoDefaultFormatting

type ValueType = T::ValueType

impl<T: TimeValue + Clone> Ranged for Monthly<T> where
    Range<T>: AsRangedCoord<Value = T>, 
[src]

type FormatOption = NoDefaultFormatting

type ValueType = T

impl<T: TimeValue + Clone> Ranged for Yearly<T> where
    Range<T>: AsRangedCoord<Value = T>, 
[src]

type FormatOption = NoDefaultFormatting

type ValueType = T

impl<V: LogScalable> Ranged for LogCoord<V>[src]

type FormatOption = DefaultFormatting

type ValueType = V

Loading content...