Struct astrup::chart::line::Line
[−]
[src]
pub struct Line { /* fields omitted */ }
Line struct
With this chart, one is able to display data using lines. Straight lines are drawn between coordinates, determined by the input data points. You can e.g. alter the line color, the dash pattern, and the stroke style.
Note The input can be any data container that implements the AsArray trait (e.g. a Vec, or ndarray Array), but the contained data must be f64. Ideally, this should be any integer or float, but I have not been able to implement a generic over them also. This is perhaps connected to things like higher kinded types and the like, which I think will come soon.
Methods
impl Line
[src]
fn new<'a, I: AsArray<'a, f64>>(x_data_coords: I, y_data_coords: I) -> Line
[src]
Create and return a new Line chart
fn set_color(self, color: Rgba) -> Self
[src]
Set the line color
fn set_color_rgb(self, red: f32, green: f32, blue: f32) -> Self
[src]
Set the line color
fn set_color_rgba(self, red: f32, green: f32, blue: f32, alpha: f32) -> Self
[src]
Set the line color
fn set_line_width(self, val: f64) -> Self
[src]
Set the line width
fn set_line_style(self, style: &str) -> Self
[src]
Set the style of the line. Plain, left stair, or right stair.
fn set_stroke_style(self, style: &str) -> Self
[src]
Set the stroke style of the line
fn set_dash_on_length(self, val: f64) -> Self
[src]
Set the length of the ``on duration'' of a dash in a dash line
fn set_dash_off_length(self, val: f64) -> Self
[src]
Set the length of the ``off duration'' of a dash in a dash line
fn set_dash_offset(self, val: f64) -> Self
[src]
Set the offset of the line dash pattern
fn set_line_cap(self, cap: LineCap) -> Self
[src]
Set the line cap of the line dash pattern
Trait Implementations
impl Clone for Line
[src]
fn clone(&self) -> Line
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more