pub struct Chart {
pub id: Option<String>,
pub title: Option<String>,
pub kind: ChartKind,
pub data: Vec<HashMap<String, Value>>,
pub x_key: String,
pub y_keys: Vec<String>,
pub x_label: Option<String>,
pub y_label: Option<String>,
pub show_legend: bool,
pub colors: Option<Vec<String>>,
}Fields§
§id: Option<String>Optional ID for streaming updates
title: Option<String>§kind: ChartKind§data: Vec<HashMap<String, Value>>§x_key: String§y_keys: Vec<String>§x_label: Option<String>X-axis label
y_label: Option<String>Y-axis label
show_legend: boolShow legend
colors: Option<Vec<String>>Custom colors for data series (hex values)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chart
impl<'de> Deserialize<'de> for Chart
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
Source§impl JsonSchema for Chart
impl JsonSchema for Chart
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Chart
impl RefUnwindSafe for Chart
impl Send for Chart
impl Sync for Chart
impl Unpin for Chart
impl UnwindSafe for Chart
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)