Skip to content

Commit

Permalink
chore: improve graph labels
Browse files Browse the repository at this point in the history
  • Loading branch information
PlexSheep committed Jan 10, 2025
1 parent eceaa89 commit 632e529
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analyze/graph.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::Path;

use chrono::{DateTime, Local, TimeZone};
use plotters::element::Drawable;
use plotters::prelude::*;

use crate::errors::AnalysisError;
Expand Down Expand Up @@ -61,15 +62,15 @@ pub fn draw_checks(checks: &[Check], file: impl AsRef<Path>) -> Result<(), Analy
.configure_mesh()
.x_labels(10)
.max_light_lines(4)
.y_desc("Severity")
.y_desc("Severity (Red)")
.x_desc("Time")
.draw()
.map_err(|e| AnalysisError::GraphDraw {
reason: e.to_string(),
})?;
chart
.configure_secondary_axes()
.y_desc("Amount of Checks")
.y_desc("Amount of Checks (Blue)")
.draw()
.map_err(|e| AnalysisError::GraphDraw {
reason: e.to_string(),
Expand All @@ -88,7 +89,6 @@ pub fn draw_checks(checks: &[Check], file: impl AsRef<Path>) -> Result<(), Analy
.map_err(|e| AnalysisError::GraphDraw {
reason: e.to_string(),
})?;

// To avoid the IO failure being ignored silently, we manually call the present function
root.present().map_err(|e| AnalysisError::GraphDraw {
reason: e.to_string(),
Expand Down

0 comments on commit 632e529

Please sign in to comment.