From 9fdf52be97650467ae51e84724e94ea8bc96fb67 Mon Sep 17 00:00:00 2001 From: Christoph Marzell Date: Fri, 19 Dec 2025 09:20:12 +0100 Subject: [PATCH] add % in barchart --- app/views/entries/index.html.erb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/views/entries/index.html.erb b/app/views/entries/index.html.erb index 02ed869..7aa8a94 100644 --- a/app/views/entries/index.html.erb +++ b/app/views/entries/index.html.erb @@ -66,8 +66,24 @@
<%= bar_chart @progress_chart_data, + suffix: "%", donut: false, height: "300px", + plugins: { + tooltip: { + callbacks: { + label: %|function(context) { + return context.dataset.label + ": " + context.raw + "%"; + }| + } + }, + legend: { + position: "bottom" + } + }, + + + library: { legend: { position: "bottom" }, tooltip: {