[][src]Struct charts::ScaleBand

pub struct ScaleBand { /* fields omitted */ }

The scale to represent categorical data.

Methods

impl ScaleBand[src]

pub fn new() -> Self[src]

Create a new band scale with default values.

pub fn set_inner_padding(self, padding: f32) -> Self[src]

Set the inner padding ratio.

pub fn set_outer_padding(self, padding: f32) -> Self[src]

Set the outer padding ratio.

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

Set the domain limits for the scale band.

pub fn domain(&self) -> &Vec<String>[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 ScaleBand[src]

impl Scale<String> for ScaleBand[src]

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

Get the type of the scale.

fn scale(&self, domain: &String) -> 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<String>[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.