pub struct Chart { /* private fields */ }Expand description
Chart widget for data visualization.
Implementations§
Source§impl Chart
impl Chart
Sourcepub const fn chart_type(self, chart_type: ChartType) -> Self
pub const fn chart_type(self, chart_type: ChartType) -> Self
Set chart type.
Sourcepub fn series(self, series: DataSeries) -> Self
pub fn series(self, series: DataSeries) -> Self
Add a data series.
Sourcepub fn add_series(self, series: impl IntoIterator<Item = DataSeries>) -> Self
pub fn add_series(self, series: impl IntoIterator<Item = DataSeries>) -> Self
Add multiple data series.
Sourcepub const fn legend(self, position: LegendPosition) -> Self
pub const fn legend(self, position: LegendPosition) -> Self
Set legend position.
Sourcepub const fn background(self, color: Color) -> Self
pub const fn background(self, color: Color) -> Self
Set background color.
Sourcepub fn accessible_name(self, name: impl Into<String>) -> Self
pub fn accessible_name(self, name: impl Into<String>) -> Self
Set accessible name.
Sourcepub const fn get_chart_type(&self) -> ChartType
pub const fn get_chart_type(&self) -> ChartType
Get chart type.
Sourcepub fn get_series(&self) -> &[DataSeries]
pub fn get_series(&self) -> &[DataSeries]
Get data series.
Sourcepub fn series_count(&self) -> usize
pub fn series_count(&self) -> usize
Get series count.
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 Widget for Chart
impl Widget for Chart
Source§fn measure(&self, constraints: Constraints) -> Size
fn measure(&self, constraints: Constraints) -> Size
Compute intrinsic size constraints. Read more
Source§fn layout(&mut self, bounds: Rect) -> LayoutResult
fn layout(&mut self, bounds: Rect) -> LayoutResult
Position children within allocated bounds. Read more
Source§fn event(&mut self, _event: &Event) -> Option<Box<dyn Any + Send>>
fn event(&mut self, _event: &Event) -> Option<Box<dyn Any + Send>>
Handle input events. Read more
Source§fn children_mut(&mut self) -> &mut [Box<dyn Widget>]
fn children_mut(&mut self) -> &mut [Box<dyn Widget>]
Get mutable child widgets.
Source§fn is_interactive(&self) -> bool
fn is_interactive(&self) -> bool
Check if this widget is interactive (can receive focus/events).
Source§fn is_focusable(&self) -> bool
fn is_focusable(&self) -> bool
Check if this widget can receive keyboard focus.
Source§fn accessible_name(&self) -> Option<&str>
fn accessible_name(&self) -> Option<&str>
Get the accessible name for screen readers.
Source§fn accessible_role(&self) -> AccessibleRole
fn accessible_role(&self) -> AccessibleRole
Get the accessible role.
Auto 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§
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