pub struct TimeSeries { /* private fields */ }Expand description
Time Series Chart widget
Implementations§
Source§impl TimeSeries
impl TimeSeries
Sourcepub fn series(self, data: TimeSeriesData) -> Self
pub fn series(self, data: TimeSeriesData) -> Self
Add a data series
Sourcepub fn time_format(self, format: TimeFormat) -> Self
pub fn time_format(self, format: TimeFormat) -> Self
Set time format
Sourcepub fn time_range(self, range: TimeRange) -> Self
pub fn time_range(self, range: TimeRange) -> Self
Set time range
Sourcepub fn show_legend(self, show: bool) -> Self
pub fn show_legend(self, show: bool) -> Self
Show or hide legend
Sourcepub fn marker(self, marker: TimeMarker) -> Self
pub fn marker(self, marker: TimeMarker) -> Self
Add a marker
Sourcepub fn grid_color(self, color: Color) -> Self
pub fn grid_color(self, color: Color) -> Self
Set grid color
Sourcepub fn get_time_bounds(&self) -> (u64, u64)
pub fn get_time_bounds(&self) -> (u64, u64)
Get time bounds for the current time range
Sourcepub fn get_value_bounds(&self) -> (f64, f64)
pub fn get_value_bounds(&self) -> (f64, f64)
Get value bounds for the current data
Sourcepub fn format_time(&self, timestamp: u64, range: u64) -> String
pub fn format_time(&self, timestamp: u64, range: u64) -> String
Format a timestamp for display
Source§impl TimeSeries
impl TimeSeries
Trait Implementations§
Source§impl Clone for TimeSeries
impl Clone for TimeSeries
Source§fn clone(&self) -> TimeSeries
fn clone(&self) -> TimeSeries
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TimeSeries
impl Debug for TimeSeries
Source§impl Default for TimeSeries
impl Default for TimeSeries
Source§impl StyledView for TimeSeries
impl StyledView for TimeSeries
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Source§impl View for TimeSeries
impl View for TimeSeries
Source§fn render(&self, ctx: &mut RenderContext<'_>)
fn render(&self, ctx: &mut RenderContext<'_>)
Render the view to the given context Read more
Source§fn meta(&self) -> WidgetMeta
fn meta(&self) -> WidgetMeta
Get widget metadata for DOM Read more
Source§fn widget_type(&self) -> &'static str
fn widget_type(&self) -> &'static str
Get widget type name (for CSS type selectors) Read more
Auto Trait Implementations§
impl Freeze for TimeSeries
impl RefUnwindSafe for TimeSeries
impl Send for TimeSeries
impl Sync for TimeSeries
impl Unpin for TimeSeries
impl UnwindSafe for TimeSeries
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