Struct PlotSeries
pub struct PlotSeries {Show 14 fields
pub id: String,
pub name: String,
pub color: AlphaColor<Srgb>,
pub kind: SeriesKind,
pub data: Vec<PlotDatum>,
pub stroke_width: f64,
pub marker_radius: f64,
pub line_dash: Vec<f64>,
pub fill_alpha: u8,
pub marker_shape: MarkerShape,
pub bar_radius: f64,
pub x_sorted: bool,
pub connect_gaps: bool,
pub show_markers: Option<bool>,
}Fields§
§id: String§name: String§color: AlphaColor<Srgb>§kind: SeriesKind§data: Vec<PlotDatum>§stroke_width: f64§marker_radius: f64§line_dash: Vec<f64>Dash/gap lengths in logical pixels. Empty means a solid stroke.
fill_alpha: u8§marker_shape: MarkerShape§bar_radius: f64§x_sorted: boolEnables logarithmic-time pointer candidate lookup. The caller promises finite, ascending X values and should keep that invariant on updates.
connect_gaps: bool§show_markers: Option<bool>Override the plot-wide line-marker preference for this series.
Implementations§
§impl PlotSeries
impl PlotSeries
pub fn new( id: impl Into<String>, name: impl Into<String>, color: AlphaColor<Srgb>, data: Vec<PlotDatum>, ) -> PlotSeries
pub fn kind(self, kind: SeriesKind) -> PlotSeries
pub fn stroke_width(self, width: f64) -> PlotSeries
pub fn marker_radius(self, radius: f64) -> PlotSeries
pub fn dashed(self, pattern: impl IntoIterator<Item = f64>) -> PlotSeries
pub fn fill_alpha(self, alpha: u8) -> PlotSeries
pub fn marker_shape(self, shape: MarkerShape) -> PlotSeries
pub fn bar_radius(self, radius: f64) -> PlotSeries
pub fn sorted_by_x(self) -> PlotSeries
pub fn sorted_by_x(self) -> PlotSeries
Declare that datum X values are finite and ascending. This preserves exact hover results while avoiding a full scan on every pointer move.
pub fn connect_gaps(self, connect: bool) -> PlotSeries
pub fn show_markers(self, show: bool) -> PlotSeries
Trait Implementations§
§impl Clone for PlotSeries
impl Clone for PlotSeries
§fn clone(&self) -> PlotSeries
fn clone(&self) -> PlotSeries
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PlotSeries
impl Debug for PlotSeries
§impl PartialEq for PlotSeries
impl PartialEq for PlotSeries
impl StructuralPartialEq for PlotSeries
Auto Trait Implementations§
impl Freeze for PlotSeries
impl RefUnwindSafe for PlotSeries
impl Send for PlotSeries
impl Sync for PlotSeries
impl Unpin for PlotSeries
impl UnsafeUnpin for PlotSeries
impl UnwindSafe for PlotSeries
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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