(label: &'a str, size: f32, color: Color)
| 38 | } |
| 39 | |
| 40 | fn x_axis_label<'a, M: 'a>(label: &'a str, size: f32, color: Color) -> Element<'a, M> { |
| 41 | container(text(label).size(size).color(color)) |
| 42 | .align_x(Horizontal::Center) |
| 43 | .align_y(Vertical::Bottom) |
| 44 | .width(Length::Fill) |
| 45 | .height(Length::Shrink) |
| 46 | .into() |
| 47 | } |
| 48 | |
| 49 | fn y_axis_label<'a, M: 'a>(label: &'a str, size: f32, color: Color) -> Element<'a, M> { |
| 50 | container(text(label).size(size).color(color).wrapping(Wrapping::Word)) |