[][src]Struct charts::ScaleLinear

pub struct ScaleLinear { /* fields omitted */ }

The scale to represent categorical data.

Methods

impl ScaleLinear[src]

pub fn new() -> Self[src]

Create a new linear scale with default values.

pub fn set_domain(self, range: Vec<f32>) -> Self[src]

Set the domain limits for the scale band.

pub fn domain(&self) -> &Vec<f32>[src]

Get the domain limits of the scale.

pub fn set_range(self, range: Vec<isize>) -> Self[src]

Set the range limits for the scale band.

pub fn range(&self) -> &Vec<isize>[src]

Get the range limits of the scale.

Trait Implementations

impl Debug for ScaleLinear[src]

impl Scale<f32> for ScaleLinear[src]

fn get_type(&self) -> ScaleType[src]

Get the type of the scale.

fn scale(&self, domain: &f32) -> f32[src]

Get the range value for the given domain entry.

fn bandwidth(&self) -> Option<f32>[src]

Get the bandwidth (if present).

fn range_start(&self) -> f32[src]

Get the start range value.

fn range_end(&self) -> f32[src]

Get the end range value.

fn get_ticks(&self) -> Vec<f32>[src]

Get the list of ticks that represent the scale on a chart axis.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.