Struct EChartsOption

Source
pub struct EChartsOption<X: AxisKindMarker, Y: AxisKindMarker> {
    pub title: Option<Title>,
    pub grid: Option<Grid>,
    pub tooltip: Option<Tooltip>,
    pub legend: Option<Legend>,
    pub dataset: Option<Vec<DatasetComponent<X, Y>>>,
    pub x_axis: Axis<X>,
    pub y_axis: Axis<Y>,
    pub series: Option<Vec<Series<X, Y>>>,
    pub extra: Option<Value>,
}
Expand description

Root object for ECharts configuration

Fields§

§title: Option<Title>

Chart title options

§grid: Option<Grid>

Grid positioning and style options

§tooltip: Option<Tooltip>

Tooltip options

§legend: Option<Legend>

Legend options

§dataset: Option<Vec<DatasetComponent<X, Y>>>

Dataset component for providing data

§x_axis: Axis<X>

X-axis options (Cartesian charts)

§y_axis: Axis<Y>

Y-axis options (Cartesian charts)

§series: Option<Vec<Series<X, Y>>>

Series data

§extra: Option<Value>

Additional raw options not covered by this binding

Implementations§

Source§

impl<X, Y> EChartsOption<X, Y>
where X: AxisKindMarker, Y: AxisKindMarker,

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<X, Y> ChartBuilder<X, Y> for EChartsOption<X, Y>
where X: AxisKindMarker + Serialize, Y: AxisKindMarker + Serialize,

Source§

fn options(&mut self) -> &mut EChartsOption<X, Y>

Source§

fn build(self, width: Size, height: Size) -> ScriptTemplate<X, Y>

Source§

fn title_str(self, title: &str) -> Self

Set chart title
Source§

fn subtitle_str(self, subtitle: &str) -> Self

Source§

fn title(self, title: Title) -> Self

Source§

fn x_axis_label(self, x: &str) -> Self

Source§

fn y_axis_label(self, y: &str) -> Self

Source§

fn add_dataset<TData: Into<DatasetComponent<X, Y>>>(self, data: TData) -> usize

Source§

fn add_dataset_visualisation( self, series_label: &str, series_type: SeriesType, dataset_index: usize, ) -> Self

Add visualization for a dataset. If no datasets exist, or dataset_index is out of range, no datasets will be added
Source§

fn add_series<TData: Into<SeriesDataSource<X, Y>>>( self, series_type: SeriesType, series_label: &str, data: TData, ) -> Self

Source§

impl<X: Clone + AxisKindMarker, Y: Clone + AxisKindMarker> Clone for EChartsOption<X, Y>

Source§

fn clone(&self) -> EChartsOption<X, Y>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<X: Debug + AxisKindMarker, Y: Debug + AxisKindMarker> Debug for EChartsOption<X, Y>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, X, Y> Deserialize<'de> for EChartsOption<X, Y>
where X: Deserialize<'de> + AxisKindMarker, Y: Deserialize<'de> + AxisKindMarker,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<X, Y> RegressionChartBuilder<X, Y> for EChartsOption<X, Y>
where X: AxisKindMarker<AxisType = ValueAxis> + Serialize, Y: AxisKindMarker<AxisType = ValueAxis> + Serialize,

Source§

fn add_linear_regression_dataset(self, data_source_index: usize) -> usize

Source§

fn add_polynomial_regression_dataset( self, data_source_index: usize, order: u8, ) -> usize

Source§

fn add_exponential_regression_dataset(self, data_source_index: usize) -> usize

Source§

fn add_regression_dataset( self, data_source_index: usize, method: RegressionMethod, order: Option<u8>, ) -> usize

Source§

fn add_regression_series<TData: Into<DatasetComponent<X, Y>>>( self, series_label: &str, data: TData, method: RegressionMethod, order: Option<u8>, ) -> Self

Add a dataset with regression transformation
Source§

fn add_linear_regression_series<TData: Into<DatasetComponent<X, Y>>>( self, series_label: &str, data: TData, ) -> Self

Add a linear regression dataset
Source§

fn add_polynomial_regression_series<TData: Into<DatasetComponent<X, Y>>>( self, series_label: &str, data: TData, order: u8, ) -> Self

Add a polynomial regression dataset
Source§

fn add_exponential_regression_series<TData: Into<DatasetComponent<X, Y>>>( self, series_label: &str, data: TData, ) -> Self

Add an exponential regression dataset
Source§

fn add_logarithmic_regression_series<TData: Into<DatasetComponent<X, Y>>>( self, series_label: &str, data: TData, ) -> Self

Add a logarithmic regression dataset
Source§

impl<X, Y> Serialize for EChartsOption<X, Y>
where X: Serialize + AxisKindMarker, Y: Serialize + AxisKindMarker,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<X, Y> Freeze for EChartsOption<X, Y>

§

impl<X, Y> RefUnwindSafe for EChartsOption<X, Y>

§

impl<X, Y> Send for EChartsOption<X, Y>
where X: Send, Y: Send,

§

impl<X, Y> Sync for EChartsOption<X, Y>
where X: Sync, Y: Sync,

§

impl<X, Y> Unpin for EChartsOption<X, Y>
where X: Unpin, Y: Unpin,

§

impl<X, Y> UnwindSafe for EChartsOption<X, Y>
where X: UnwindSafe, Y: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,