Set the label for this line (will appear in legend).
(mut self, label: impl Into<String>)
| 32 | |
| 33 | /// Set the label for this line (will appear in legend). |
| 34 | pub fn with_label(mut self, label: impl Into<String>) -> Self { |
| 35 | let l = label.into(); |
| 36 | if !l.is_empty() { |
| 37 | self.label = Some(l); |
| 38 | } |
| 39 | self |
| 40 | } |
| 41 | |
| 42 | /// Set the color of the line. |
| 43 | pub fn with_color(mut self, color: Color) -> Self { |