Struct EChartOptions

Source
pub struct EChartOptions<X: AxisKindMarker, Y: AxisKindMarker> {
    pub grid: Option<Grid>,
    pub tooltip: Option<Tooltip>,
    pub legend: Option<Legend>,
    pub x_axis: Axis<X>,
    pub y_axis: Axis<Y>,
    pub extra: Option<Value>,
    /* private fields */
}
Expand description

Root object for ECharts configuration

Fields§

§grid: Option<Grid>

Grid positioning and style options

§tooltip: Option<Tooltip>

Tooltip options

§legend: Option<Legend>

Legend options

§x_axis: Axis<X>

X-axis options (Cartesian charts)

§y_axis: Axis<Y>

Y-axis options (Cartesian charts)

§extra: Option<Value>

Additional raw options not covered by this binding

Implementations§

Source§

impl<X, Y> EChartOptions<X, Y>
where X: AxisKindMarker<AxisType = ValueAxis> + Serialize, Y: AxisKindMarker<AxisType = ValueAxis> + Serialize,

trait that provides regression methods that are only supported when both x and y are numeric

Source

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

Add a linear regression dataset

Source§

impl<X, Y> EChartOptions<X, Y>

Source

pub fn new(x_axis: Axis<X>, y_axis: Axis<Y>) -> Self

Source

pub fn enable_legend(self) -> Self

Source

pub fn title_str(self, title: String) -> Self

Set chart title

Source

pub fn subtitle_str(self, subtitle: String) -> Self

Source

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

Source

pub fn x_axis_label(self, x: String) -> Self

Source

pub fn y_axis_label(self, y: String) -> Self

Source

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

Source

pub fn add_dataset_visualisation( self, series_label: String, 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

pub fn add_series_direct(self, series: Series<X, Y>) -> Self

Source

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

Source

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

Trait Implementations§

Source§

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

Source§

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

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

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

Performs copy-assignment from source. Read more
Source§

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

Source§

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

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

impl<X, Y> Default for EChartOptions<X, Y>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<X, Y> Serialize for EChartOptions<X, Y>

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 EChartOptions<X, Y>

§

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

§

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

§

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

§

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

§

impl<X, Y> UnwindSafe for EChartOptions<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.