[][src]Struct chartisan::Chartisan

pub struct Chartisan<'a> { /* fields omitted */ }

Represents a chartisan chart instance.

Methods

impl<'a> Chartisan<'a>[src]

pub fn build() -> Chartisan<'a>[src]

Creates a new instance of a chartisan chart.

pub fn labels(&mut self, labels: &'a [&'a str]) -> &mut Self[src]

Sets the chart labels.

pub fn extra(&mut self, value: HashMap<&'a str, &'a str>) -> &mut Self[src]

Adds extra information to the chart.

pub fn advanced_dataset(
    &mut self,
    name: &'a str,
    values: &'a [f64],
    extra: Option<HashMap<&'a str, &'a str>>
) -> &mut Self
[src]

advanced_dataset appends a new dataset to the chart or modifies an existing one. If the ID has already been used, the dataset will be replaced with this one.

pub fn dataset(&mut self, name: &'a str, values: &'a [f64]) -> &mut Self[src]

Dataset adds a new simple dataset to the chart. If more advanced control is needed, consider using AdvancedDataset instead.

pub fn to_json(&self) -> String[src]

Transforms the chart into a JSON string.

pub fn to_object(&mut self) -> &mut ServerData<'a>[src]

Transforms it to an object.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Chartisan<'a>

impl<'a> Send for Chartisan<'a>

impl<'a> Sync for Chartisan<'a>

impl<'a> Unpin for Chartisan<'a>

impl<'a> UnwindSafe for Chartisan<'a>

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.