pub struct Chart {
pub chart_type: ChartType,
pub title: Option<String>,
pub x_label: Option<String>,
pub y_label: Option<String>,
pub x_column: Option<String>,
pub y_column: Option<String>,
pub data: Option<DataSource>,
pub width: f64,
pub height: f64,
pub style: ChartStyle,
}Expand description
A chart configuration.
Fields§
§chart_type: ChartTypeChart type.
title: Option<String>Chart title.
x_label: Option<String>X-axis label.
y_label: Option<String>Y-axis label.
x_column: Option<String>X-axis column name.
y_column: Option<String>Y-axis column name.
data: Option<DataSource>Data source.
width: f64Chart dimensions.
height: f64§style: ChartStyleVisual style.
Implementations§
Source§impl Chart
impl Chart
Sourcepub fn with_title(self, title: impl Into<String>) -> Self
pub fn with_title(self, title: impl Into<String>) -> Self
Set the chart title.
Sourcepub fn with_x_label(self, label: impl Into<String>) -> Self
pub fn with_x_label(self, label: impl Into<String>) -> Self
Set the X-axis label.
Sourcepub fn with_y_label(self, label: impl Into<String>) -> Self
pub fn with_y_label(self, label: impl Into<String>) -> Self
Set the Y-axis label.
Sourcepub fn with_data(self, data: DataSource) -> Self
pub fn with_data(self, data: DataSource) -> Self
Set the data source.
Sourcepub fn with_x_column(self, column: impl Into<String>) -> Self
pub fn with_x_column(self, column: impl Into<String>) -> Self
Set the X column.
Sourcepub fn with_y_column(self, column: impl Into<String>) -> Self
pub fn with_y_column(self, column: impl Into<String>) -> Self
Set the Y column.
Sourcepub fn with_style(self, style: ChartStyle) -> Self
pub fn with_style(self, style: ChartStyle) -> Self
Set the visual style.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Chart
impl RefUnwindSafe for Chart
impl Send for Chart
impl Sync for Chart
impl Unpin for Chart
impl UnwindSafe for Chart
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