pub struct ChartSeries {
pub name: String,
pub tags: BTreeMap<String, String>,
pub points: Vec<ChartDataPoint>,
}Expand description
A single series in a chart (line).
Fields§
§name: StringDisplay name for the series
Tags/labels for the series (BTreeMap for deterministic ordering)
points: Vec<ChartDataPoint>Data points in the series
Implementations§
Source§impl ChartSeries
impl ChartSeries
Sourcepub fn with_tag(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_tag(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a tag/label to the series.
Sourcepub fn with_point(self, timestamp: f64, value: f64) -> Self
pub fn with_point(self, timestamp: f64, value: f64) -> Self
Add a data point to the series.
Sourcepub fn with_points(self, points: Vec<ChartDataPoint>) -> Self
pub fn with_points(self, points: Vec<ChartDataPoint>) -> Self
Add multiple data points to the series.
Trait Implementations§
Source§impl Clone for ChartSeries
impl Clone for ChartSeries
Source§fn clone(&self) -> ChartSeries
fn clone(&self) -> ChartSeries
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChartSeries
impl Debug for ChartSeries
Source§impl PartialEq for ChartSeries
impl PartialEq for ChartSeries
impl StructuralPartialEq for ChartSeries
Auto Trait Implementations§
impl Freeze for ChartSeries
impl RefUnwindSafe for ChartSeries
impl Send for ChartSeries
impl Sync for ChartSeries
impl Unpin for ChartSeries
impl UnsafeUnpin for ChartSeries
impl UnwindSafe for ChartSeries
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more