pub struct ChartOption {Show 29 fields
pub title: Option<TitleOption>,
pub legend: Option<LegendOption>,
pub grid: Option<GridOption>,
pub x_axis: Vec<AxisOption>,
pub y_axis: Vec<AxisOption>,
pub polar: Vec<PolarOption>,
pub radar: Vec<RadarOption>,
pub geo: Vec<GeoOption>,
pub calendar: Vec<CalendarOption>,
pub dataset: Option<DatasetOption>,
pub series: Vec<SeriesOption>,
pub tooltip: Option<TooltipOption>,
pub toolbox: Option<ToolboxOption>,
pub data_zoom: Vec<DataZoomOption>,
pub visual_map: Vec<VisualMapOption>,
pub graphic: Vec<GraphicOption>,
pub brush: Option<BrushOption>,
pub axis_pointer: Option<AxisPointerOption>,
pub color: Vec<String>,
pub background_color: Option<String>,
pub text_style: Option<LabelOption>,
pub animation: bool,
pub animation_duration: Option<f64>,
pub animation_easing: Option<String>,
pub animation_delay: Option<f64>,
pub animation_duration_update: Option<f64>,
pub animation_easing_update: Option<String>,
pub use_utc: Option<bool>,
pub aria: Option<AriaOption>,
}Expand description
The whole configuration of a chart.
The field names mirror ECharts’ option object, so an ECharts configuration can be translated field by field.
Fields§
§title: Option<TitleOption>The title of the chart.
legend: Option<LegendOption>The legend of the chart.
grid: Option<GridOption>The cartesian grid of the chart.
x_axis: Vec<AxisOption>The x-axes of the chart.
y_axis: Vec<AxisOption>The y-axes of the chart.
polar: Vec<PolarOption>The polar coordinate systems of the chart.
radar: Vec<RadarOption>The radar coordinate systems of the chart.
geo: Vec<GeoOption>The geo components of the chart.
calendar: Vec<CalendarOption>The calendar components of the chart.
dataset: Option<DatasetOption>The dataset the chart draws its data from.
series: Vec<SeriesOption>The series of the chart.
tooltip: Option<TooltipOption>The tooltip of the chart.
toolbox: Option<ToolboxOption>The toolbox of the chart.
data_zoom: Vec<DataZoomOption>The data-zoom controls of the chart.
visual_map: Vec<VisualMapOption>The visual maps of the chart.
graphic: Vec<GraphicOption>The graphic elements of the chart.
brush: Option<BrushOption>The brush of the chart.
axis_pointer: Option<AxisPointerOption>The axis pointer of the chart.
color: Vec<String>The palette the series take their colours from.
background_color: Option<String>The background colour of the chart.
text_style: Option<LabelOption>The default text style of the chart.
animation: boolWhether the chart animates.
animation_duration: Option<f64>The duration of the chart’s animation, in milliseconds.
animation_easing: Option<String>The easing of the chart’s animation.
animation_delay: Option<f64>The delay of the chart’s animation, in milliseconds.
animation_duration_update: Option<f64>The duration of the update animation, in milliseconds.
animation_easing_update: Option<String>The easing of the update animation.
use_utc: Option<bool>Whether the chart is rendered on a separate canvas layer.
aria: Option<AriaOption>The accessible description of the chart.
Implementations§
Source§impl ChartOption
Inherent implementation of ChartOption.
impl ChartOption
Inherent implementation of ChartOption.
Sourcepub fn title(self, title: TitleOption) -> Self
pub fn title(self, title: TitleOption) -> Self
Sourcepub fn legend(self, legend: LegendOption) -> Self
pub fn legend(self, legend: LegendOption) -> Self
Sourcepub fn grid(self, grid: GridOption) -> Self
pub fn grid(self, grid: GridOption) -> Self
Sourcepub fn x_axis(self, axis: AxisOption) -> Self
pub fn x_axis(self, axis: AxisOption) -> Self
Sourcepub fn y_axis(self, axis: AxisOption) -> Self
pub fn y_axis(self, axis: AxisOption) -> Self
Sourcepub fn polar(self, polar: PolarOption) -> Self
pub fn polar(self, polar: PolarOption) -> Self
Sourcepub fn radar(self, radar: RadarOption) -> Self
pub fn radar(self, radar: RadarOption) -> Self
Sourcepub fn calendar(self, calendar: CalendarOption) -> Self
pub fn calendar(self, calendar: CalendarOption) -> Self
Sourcepub fn dataset(self, dataset: DatasetOption) -> Self
pub fn dataset(self, dataset: DatasetOption) -> Self
Sourcepub fn series(self, series: SeriesOption) -> Self
pub fn series(self, series: SeriesOption) -> Self
Sourcepub fn tooltip(self, tooltip: TooltipOption) -> Self
pub fn tooltip(self, tooltip: TooltipOption) -> Self
Sourcepub fn toolbox(self, toolbox: ToolboxOption) -> Self
pub fn toolbox(self, toolbox: ToolboxOption) -> Self
Sourcepub fn data_zoom(self, data_zoom: DataZoomOption) -> Self
pub fn data_zoom(self, data_zoom: DataZoomOption) -> Self
Sourcepub fn visual_map(self, visual_map: VisualMapOption) -> Self
pub fn visual_map(self, visual_map: VisualMapOption) -> Self
Sourcepub fn graphic(self, graphic: GraphicOption) -> Self
pub fn graphic(self, graphic: GraphicOption) -> Self
Sourcepub fn brush(self, brush: BrushOption) -> Self
pub fn brush(self, brush: BrushOption) -> Self
Sourcepub fn axis_pointer(self, axis_pointer: AxisPointerOption) -> Self
pub fn axis_pointer(self, axis_pointer: AxisPointerOption) -> Self
Sourcepub fn color(self, color: Vec<String>) -> Self
pub fn color(self, color: Vec<String>) -> Self
Sets the palette the series take their colours from.
§Arguments
Vec<String>- AVec<String>parameter.