pub struct Series {
pub data: Vec<f64>,
}Expand description
A sequence of f64 values representing one dimension of chart data.
Series is the canonical data container used throughout the charting
pipeline. Users rarely construct one directly; instead they pass any
type that implements IntoSeries (slices, vectors, arrays, ranges,
etc.) and the conversion happens automatically.
Fields§
§data: Vec<f64>The underlying data values.
Implementations§
Source§impl Series
impl Series
Sourcepub fn new(data: Vec<f64>) -> Series
pub fn new(data: Vec<f64>) -> Series
Creates a new series from a vector of values.
§Examples
use plotkit_core::series::Series;
let s = Series::new(vec![1.0, 2.0, 3.0]);
assert_eq!(s.len(), 3);Sourcepub fn min(&self) -> Option<f64>
pub fn min(&self) -> Option<f64>
Returns the minimum finite value, or None if the series is empty
or contains no finite values.
Non-finite values (NaN, +Inf, -Inf) are ignored.
Trait Implementations§
Source§impl IntoSeries for Series
impl IntoSeries for Series
Source§fn into_series(self) -> Series
fn into_series(self) -> Series
Identity conversion — returns self unchanged.
Auto Trait Implementations§
impl Freeze for Series
impl RefUnwindSafe for Series
impl Send for Series
impl Sync for Series
impl Unpin for Series
impl UnsafeUnpin for Series
impl UnwindSafe for Series
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