[−][src]Struct chartisan::Chartisan
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]
&mut self,
name: &'a str,
values: &'a [f64],
extra: Option<HashMap<&'a str, &'a str>>
) -> &mut Self
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,