MCPcopy Index your code
hub / github.com/askanium/rustplotlib / BarDatum

Interface BarDatum

src/views/datum.rs:4–15  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

2/// This provides greater flexibility in using different data sources as one
3/// can simply implement this trait and be able to use that data in a bar chart.
4pub trait BarDatum {
5 /// Return the category of the datum.
6 fn get_category(&self) -> String;
7
8 /// Return the value of the datum.
9 fn get_value(&self) -> f32;
10
11 /// Return the key of the datum. This is optional in a simple bar chart
12 /// (just return an empty string), but is required in a stacked bar chart
13 /// as the stacked entries are differentiated by the key.
14 fn get_key(&self) -> String;
15}
16
17/// A trait that defines interaction with a data point used in a scatter/line plots.
18pub trait PointDatum<T, U> {

Callers

nothing calls this directly

Implementers 1

datum.rssrc/views/datum.rs

Calls

no outgoing calls

Tested by

no test coverage detected