pub struct ChartDataset {
pub name: LineStatic,
pub marker: Marker,
pub graph_type: GraphType,
pub style: Style,
/* private fields */
}Expand description
Dataset describes a set of data for a chart.
This mainly exists to map to ratatui’s Dataset, which does not allow owned data.
Fields§
§name: LineStatic§marker: Marker§graph_type: GraphType§style: StyleImplementations§
Source§impl ChartDataset
impl ChartDataset
Sourcepub fn name<S: Into<LineStatic>>(self, name: S) -> Self
pub fn name<S: Into<LineStatic>>(self, name: S) -> Self
Set a name for the dataset.
Sourcepub fn graph_type(self, g: GraphType) -> Self
pub fn graph_type(self, g: GraphType) -> Self
Set the GraphType for the dataset.
Sourcepub fn style(self, s: Style) -> Self
pub fn style(self, s: Style) -> Self
Set Style for the dataset.
This style is used for the data points and the legenend (if not overwritten by the text’s style).
Read more in Dataset::style.
Sourcepub fn as_tuichart<'a>(&'a self, start: usize) -> TuiDataset<'a>
pub fn as_tuichart<'a>(&'a self, start: usize) -> TuiDataset<'a>
Create ratatui Dataset from the current ChartDataset.
Only elements from start are included.
Trait Implementations§
Source§impl Clone for ChartDataset
impl Clone for ChartDataset
Source§fn clone(&self) -> ChartDataset
fn clone(&self) -> ChartDataset
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 ChartDataset
impl Debug for ChartDataset
Source§impl Default for ChartDataset
impl Default for ChartDataset
Source§impl<'a> From<&'a ChartDataset> for Dataset<'a>
impl<'a> From<&'a ChartDataset> for Dataset<'a>
Source§fn from(data: &'a ChartDataset) -> TuiDataset<'a>
fn from(data: &'a ChartDataset) -> TuiDataset<'a>
Converts to this type from the input type.
Source§impl PartialEq for ChartDataset
impl PartialEq for ChartDataset
Auto Trait Implementations§
impl Freeze for ChartDataset
impl RefUnwindSafe for ChartDataset
impl Send for ChartDataset
impl Sync for ChartDataset
impl Unpin for ChartDataset
impl UnsafeUnpin for ChartDataset
impl UnwindSafe for ChartDataset
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 moreSource§impl<T> PropBound for T
impl<T> PropBound for T
Source§fn to_any_prop(self) -> Box<dyn PropBound>
fn to_any_prop(self) -> Box<dyn PropBound>
Convert any
PropBound value to a AnyPropBox value.