pub struct ChartConfig<X: WithTypeAndSerializer + Serialize, Y: WithTypeAndSerializer + Serialize> {
pub data: ChartDataSection<X, Y>,
pub options: ChartOptions<X, Y>,
}
Fields§
§data: ChartDataSection<X, Y>
§options: ChartOptions<X, Y>
Implementations§
Source§impl<X, Y> ChartConfig<X, Y>
impl<X, Y> ChartConfig<X, Y>
pub fn new(options: ChartOptions<X, Y>) -> Self
pub fn set_x_axis(self, conf: ScaleConfig<X>) -> Self
pub fn set_y_axis(self, conf: ScaleConfig<Y>) -> Self
pub fn with_elements(self, elements: ElementsConfig) -> Self
pub fn with_aspect_ratio(self, ratio: f32) -> Self
pub fn add_series_direct(self, series: Dataset<X, Y>) -> Self
pub fn add_series_with_config<T: Into<ChartData<X, Y>>>( self, type: ChartType, title: String, config: ElementsConfig, data: T, ) -> Self
pub fn add_series<T: Into<ChartData<X, Y>>>( self, type: ChartType, title: String, data: T, ) -> Self
pub fn enable_legend(self) -> Self
pub fn with_title(self, title: Title) -> Self
pub fn with_legend(self, legend: Legend) -> Self
pub fn with_tooltip(self, tooltip: Tooltip) -> Self
pub fn with_subtitle(self, subtitle: Title) -> Self
pub fn build(self, width: Size, height: Size) -> Chart<X, Y>
Source§impl<X> ChartConfig<X, X>
impl<X> ChartConfig<X, X>
pub fn add_linear_regression_series<T: Into<ChartData<X, X>>>( self, title: &str, data: T, ) -> Result<Self, LinalgError>
Trait Implementations§
Source§impl<X: Clone + WithTypeAndSerializer + Serialize, Y: Clone + WithTypeAndSerializer + Serialize> Clone for ChartConfig<X, Y>
impl<X: Clone + WithTypeAndSerializer + Serialize, Y: Clone + WithTypeAndSerializer + Serialize> Clone for ChartConfig<X, Y>
Source§fn clone(&self) -> ChartConfig<X, Y>
fn clone(&self) -> ChartConfig<X, Y>
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 moreAuto Trait Implementations§
impl<X, Y> Freeze for ChartConfig<X, Y>
impl<X, Y> RefUnwindSafe for ChartConfig<X, Y>where
X: RefUnwindSafe,
Y: RefUnwindSafe,
impl<X, Y> Send for ChartConfig<X, Y>
impl<X, Y> Sync for ChartConfig<X, Y>
impl<X, Y> Unpin for ChartConfig<X, Y>
impl<X, Y> UnwindSafe for ChartConfig<X, Y>where
X: UnwindSafe,
Y: UnwindSafe,
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