pub struct ChartSpec {
pub chart_type: ChartType,
pub channels: Vec<ChartChannel>,
pub x_categories: Option<Vec<String>>,
pub title: Option<String>,
pub x_label: Option<String>,
pub y_label: Option<String>,
pub width: Option<usize>,
pub height: Option<usize>,
pub echarts_options: Option<Value>,
pub interactive: bool,
}Fields§
§chart_type: ChartType§channels: Vec<ChartChannel>Data channels populated by typed builder methods (.x(), .y(), .open(), etc.)
x_categories: Option<Vec<String>>Categorical x-axis labels (bar charts, box plots)
title: Option<String>§x_label: Option<String>§y_label: Option<String>§width: Option<usize>§height: Option<usize>§echarts_options: Option<Value>Full ECharts option JSON override (injected by chart detection).
interactive: boolWhether this chart should be rendered interactively (default true).
Implementations§
Source§impl ChartSpec
impl ChartSpec
Sourcepub fn channel(&self, name: &str) -> Option<&ChartChannel>
pub fn channel(&self, name: &str) -> Option<&ChartChannel>
Get a channel by role name.
Sourcepub fn channels_by_name(&self, name: &str) -> Vec<&ChartChannel>
pub fn channels_by_name(&self, name: &str) -> Vec<&ChartChannel>
Get all channels with a given role name (e.g. multiple “y” channels).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChartSpec
impl<'de> Deserialize<'de> for ChartSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChartSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChartSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ChartSpec
impl Serialize for ChartSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ChartSpec
Auto Trait Implementations§
impl Freeze for ChartSpec
impl RefUnwindSafe for ChartSpec
impl Send for ChartSpec
impl Sync for ChartSpec
impl Unpin for ChartSpec
impl UnsafeUnpin for ChartSpec
impl UnwindSafe for ChartSpec
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