From af37dfe314a0cd64389a8a1fbf7dc5bcde43a96e Mon Sep 17 00:00:00 2001 From: Valentine Briese Date: Wed, 28 Aug 2024 10:50:40 -0700 Subject: [PATCH] Add title to analytics chart --- src/analytics.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/analytics.rs b/src/analytics.rs index e75cfbc..2c42e74 100644 --- a/src/analytics.rs +++ b/src/analytics.rs @@ -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",