[][src]Trait charts::BarDatum

pub trait BarDatum {
    fn get_category(&self) -> String;
fn get_value(&self) -> f32;
fn get_key(&self) -> String; }

A trait that defines interaction with a data point used in a bar chart. This provides greater flexibility in using different data sources as one can simply implement this trait and be able to use that data in a bar chart.

Required methods

fn get_category(&self) -> String

Return the category of the datum.

fn get_value(&self) -> f32

Return the value of the datum.

fn get_key(&self) -> String

Return the key of the datum. This is optional in a simple bar chart (just return an empty string), but is required in a stacked bar chart as the stacked entries are differentiated by the key.

Loading content...

Implementations on Foreign Types

impl<'_> BarDatum for (f32, &'_ str)[src]

impl BarDatum for (String, f32, String)[src]

impl<'_, '_> BarDatum for (&'_ str, f32, &'_ str)[src]

impl<'_, '_> BarDatum for (&'_ str, isize, &'_ str)[src]

impl BarDatum for (String, f32)[src]

impl<'_> BarDatum for (&'_ str, f32, String)[src]

impl<'_> BarDatum for (&'_ str, f32)[src]

impl<'_> BarDatum for (&'_ str, i32, String)[src]

impl<'_> BarDatum for (&'_ str, i32)[src]

impl<'_, '_> BarDatum for (&'_ str, i32, &'_ str)[src]

Loading content...

Implementors

Loading content...