pub struct ChartSpec {
pub title: Option<String>,
pub subtitle: Option<String>,
pub basic_chart: Option<BasicChartSpec>,
pub pie_chart: Option<PieChartSpec>,
pub extra: BTreeMap<String, Value>,
}Expand description
A chart’s content and styling — ChartSpec. See the module-level note
above for which chart types this crate models and why unmodelled fields
round-trip through extra.
Fields§
§title: Option<String>The chart’s title.
subtitle: Option<String>The chart’s subtitle.
basic_chart: Option<BasicChartSpec>A basic (column/bar/line/area/scatter) chart’s configuration.
Mutually exclusive with Self::pie_chart and with every
unmodelled chart-type field that may be present in extra.
pie_chart: Option<PieChartSpec>A pie chart’s configuration. Mutually exclusive with
Self::basic_chart.
extra: BTreeMap<String, Value>Every other ChartSpec field this crate doesn’t model — including
the other 13 chart-type variants — preserved verbatim across a
read-merge-write cycle. See the module-level note above.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChartSpec
impl<'de> Deserialize<'de> for ChartSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more