Skip to content

Commit

Permalink
plot: fix legend overflow for #27
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jan 2, 2024
1 parent 7733605 commit 4493917
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,13 @@ pub fn create(
.ok_or_else(|| eyre!("Failed to calculated the maximum coord length"))?;

// longest legend label (in pixels)
// longest legend label (in pixels)
let default_labels =
vec!["Reference", "Private"].into_iter().map(String::from).collect_vec();

let longest_legend_label = parents
.iter()
.chain(default_labels.iter())
.map(|id| {
text::to_image(
&format!("{id} Reference"),
Expand Down

0 comments on commit 4493917

Please sign in to comment.