Skip to content

Commit

Permalink
Add title to analytics chart
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed Aug 28, 2024
1 parent 0d5c275 commit af37dfe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/analytics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ pub(super) async fn analytics(ctx: Context<'_>) -> Result<(), Error> {
right: 25.0,
bottom: 10.0,
};
chart.title_text = "Command Invocations in the Last 24 Hours".to_string();
chart.legend_margin = Some(charts_rs::Box {
top: 25.0,
..Default::default()
});
ctx.send(CreateReply::default().attachment(CreateAttachment::bytes(
charts_rs::svg_to_png(&chart.svg()?)?,
"analytics.png",
Expand Down

0 comments on commit af37dfe

Please sign in to comment.