pub struct LineArtist {
pub x: Series,
pub y: Series,
pub color: Color,
pub width: f64,
pub style: LineStyle,
pub label: Option<String>,
pub alpha: f64,
}Expand description
A line chart connecting a sequence of (x, y) data points.
The x and y series must have the same length. Points are drawn in
order, producing a single connected polyline with the configured stroke
style.
Fields§
§x: SeriesX-coordinates of the data points.
y: SeriesY-coordinates of the data points.
color: ColorStroke color of the line.
width: f64Stroke width in pixels.
style: LineStyleStroke pattern (solid, dashed, dotted, dash-dot).
label: Option<String>Optional legend label. When Some, the line appears in the legend.
alpha: f64Opacity from 0.0 (fully transparent) to 1.0 (fully opaque).
Implementations§
Source§impl LineArtist
impl LineArtist
Source§impl LineArtist
impl LineArtist
Sourcepub fn style(&mut self, style: LineStyle) -> &mut Self
pub fn style(&mut self, style: LineStyle) -> &mut Self
Sets the line style (solid, dashed, dotted, dash-dot).
The LineStyle enum defines the available stroke patterns. The default
is LineStyle::Solid.
§Examples
ⓘ
artist.style(LineStyle::Dashed);Trait Implementations§
Source§impl Clone for LineArtist
impl Clone for LineArtist
Source§fn clone(&self) -> LineArtist
fn clone(&self) -> LineArtist
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 moreAuto Trait Implementations§
impl Freeze for LineArtist
impl RefUnwindSafe for LineArtist
impl Send for LineArtist
impl Sync for LineArtist
impl Unpin for LineArtist
impl UnsafeUnpin for LineArtist
impl UnwindSafe for LineArtist
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