pub struct Dataset { /* private fields */ }Expand description
One named set of (x, y) points in a Chart.
Implementations§
Source§impl Dataset
impl Dataset
Sourcepub fn new(points: impl IntoIterator<Item = (f64, f64)>) -> Self
pub fn new(points: impl IntoIterator<Item = (f64, f64)>) -> Self
Unnamed points, drawn as a scatter of Marker::Dots (ratatui’s
defaults).
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
The name shown in the legend; a dataset without one is left out.
Sourcepub fn graph_type(self, graph_type: GraphType) -> Self
pub fn graph_type(self, graph_type: GraphType) -> Self
Points, lines or bars.
Sourcepub fn marker(self, marker: Marker) -> Self
pub fn marker(self, marker: Marker) -> Self
The marker (default Marker::Dot).
Sourcepub fn style(self, style: impl Into<String>) -> Self
pub fn style(self, style: impl Into<String>) -> Self
The style of the points and the legend entry: a theme key or a
definition (default chart.series.N, by position).
Sourcepub fn fill_to(self, y: f64) -> Self
pub fn fill_to(self, y: f64) -> Self
The level a GraphType::Area fills to (default 0): below the
points that are above it, above those below it. ratatui calls it
fill_to_y.
Trait Implementations§
impl StructuralPartialEq for Dataset
Auto Trait Implementations§
impl Freeze for Dataset
impl RefUnwindSafe for Dataset
impl Send for Dataset
impl Sync for Dataset
impl Unpin for Dataset
impl UnsafeUnpin for Dataset
impl UnwindSafe for Dataset
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