(bar: Bar, _min_y: f64, max_y: f64, steps_y: f64)
| 6 | const DISTANCE: f32 = 80.; |
| 7 | |
| 8 | pub async fn run(bar: Bar, _min_y: f64, max_y: f64, steps_y: f64) { |
| 9 | let min_y = min(&bar.ys); |
| 10 | |
| 11 | let y_font_size = get_font_size_y(max_y); |
| 12 | let y_half_font = y_font_size / 2.; |
| 13 | |
| 14 | let step_y = (max_y) / steps_y; |
| 15 | |
| 16 | let ys = divs(&bar.ys, step_y); |
| 17 | |
| 18 | if min_y >= 0. { |
| 19 | return positive_only(bar, step_y, y_half_font, y_font_size, max_y, ys).await; |
| 20 | } |
| 21 | if negative(&ys) { |
| 22 | return negative_only(bar, step_y, y_half_font, y_font_size, max_y, ys).await; |
| 23 | } |
| 24 | positive_negative(bar, step_y, y_half_font, y_font_size, max_y, ys).await |
| 25 | } |
| 26 | |
| 27 | pub async fn draw_line_with_text<T: Display>(y: f32, val: T, y_half_font: f32, y_font_size: f32) { |
| 28 | let text = format!("{}", val); |
nothing calls this directly
no test coverage detected