[][src]Trait plotters::prelude::Ranged

pub trait Ranged {
    type ValueType;
    fn map(&self, value: &Self::ValueType, limit: (i32, i32)) -> i32;
fn key_points(&self, max_points: usize) -> 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 the axis

Associated Types

type ValueType

The type of this value

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(&self, max_points: usize) -> 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 ValueType = f32

impl Ranged for RangedCoordf64[src]

type ValueType = f64

impl Ranged for RangedCoordi128[src]

type ValueType = i128

impl Ranged for RangedCoordi32[src]

type ValueType = i32

impl Ranged for RangedCoordi64[src]

type ValueType = i64

impl Ranged for RangedCoordu128[src]

type ValueType = u128

impl Ranged for RangedCoordu32[src]

type ValueType = u32

impl Ranged for RangedCoordu64[src]

type ValueType = u64

impl Ranged for RangedDuration[src]

type ValueType = Duration

impl<T> Ranged for GroupBy<T> where
    T::ValueType: PrimInt + ToPrimitive + FromPrimitive + Mul,
    T: Ranged
[src]

type ValueType = T::ValueType

impl<T: PartialEq> Ranged for Category<T>[src]

type ValueType = Category<T>

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

type ValueType = V

impl<Z: TimeZone> Ranged for RangedDate<Z>[src]

type ValueType = Date<Z>

impl<Z: TimeZone> Ranged for RangedDateTime<Z>[src]

type ValueType = DateTime<Z>

Loading content...