MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / new

Method new

src/reference_lines.rs:22–31  ·  view source on GitHub ↗

Create a new vertical line at the given x-coordinate.

(x: f64)

Source from the content-addressed store, hash-verified

20impl VLine {
21 /// Create a new vertical line at the given x-coordinate.
22 pub fn new(x: f64) -> Self {
23 Self {
24 id: ShapeId::new(),
25 x,
26 transform: None,
27 label: None,
28 color: Color::from_rgb(0.5, 0.5, 0.5),
29 line_style: LineStyle::default(),
30 }
31 }
32
33 /// Set the label for this line (will appear in legend).
34 pub fn with_label(mut self, label: impl Into<String>) -> Self {

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected