Add a label for the left of the chart.
(mut self, label: T)
| 122 | |
| 123 | /// Add a label for the left of the chart. |
| 124 | pub fn add_left_axis_label<T: ToString>(mut self, label: T) -> Self { |
| 125 | if let Some(ref mut axis) = self.y_axis_left { |
| 126 | axis.set_axis_label(label.to_string()) |
| 127 | } else { |
| 128 | panic!("You cannot add a label to left axis without adding an axis first.") |
| 129 | } |
| 130 | self |
| 131 | } |
| 132 | |
| 133 | /// Add a label for the top of the chart. |
| 134 | pub fn add_top_axis_label<T: ToString>(mut self, label: T) -> Self { |