Skip to content

Commit 632e529

Browse files
committed
chore: improve graph labels
1 parent eceaa89 commit 632e529

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/analyze/graph.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::path::Path;
22

33
use chrono::{DateTime, Local, TimeZone};
4+
use plotters::element::Drawable;
45
use plotters::prelude::*;
56

67
use crate::errors::AnalysisError;
@@ -61,15 +62,15 @@ pub fn draw_checks(checks: &[Check], file: impl AsRef<Path>) -> Result<(), Analy
6162
.configure_mesh()
6263
.x_labels(10)
6364
.max_light_lines(4)
64-
.y_desc("Severity")
65+
.y_desc("Severity (Red)")
6566
.x_desc("Time")
6667
.draw()
6768
.map_err(|e| AnalysisError::GraphDraw {
6869
reason: e.to_string(),
6970
})?;
7071
chart
7172
.configure_secondary_axes()
72-
.y_desc("Amount of Checks")
73+
.y_desc("Amount of Checks (Blue)")
7374
.draw()
7475
.map_err(|e| AnalysisError::GraphDraw {
7576
reason: e.to_string(),
@@ -88,7 +89,6 @@ pub fn draw_checks(checks: &[Check], file: impl AsRef<Path>) -> Result<(), Analy
8889
.map_err(|e| AnalysisError::GraphDraw {
8990
reason: e.to_string(),
9091
})?;
91-
9292
// To avoid the IO failure being ignored silently, we manually call the present function
9393
root.present().map_err(|e| AnalysisError::GraphDraw {
9494
reason: e.to_string(),

0 commit comments

Comments
 (0)