From b0e49d1e961546c1a4f70557ad635ef129cb0bd9 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Wed, 15 Mar 2023 13:46:35 +0100 Subject: [PATCH] Render numeric axis in charts as integers --- app/views/reports/_details.html.erb | 2 +- app/views/repositories/stats.html.erb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/reports/_details.html.erb b/app/views/reports/_details.html.erb index 3c64727434..2db6ce0143 100644 --- a/app/views/reports/_details.html.erb +++ b/app/views/reports/_details.html.erb @@ -72,7 +72,7 @@ }, scales: { yAxis: {stacked: true}, - xAxis: {stacked: true} + xAxis: {stacked: true, ticks: {precision: 0}} } } }); diff --git a/app/views/repositories/stats.html.erb b/app/views/repositories/stats.html.erb index 5266dc2620..e4adae0cd4 100644 --- a/app/views/repositories/stats.html.erb +++ b/app/views/repositories/stats.html.erb @@ -45,6 +45,9 @@ $(document).ready(function(){ display: true, text: <%= raw l(:label_commits_per_month).to_json %> } + }, + scales: { + yAxis: {ticks: {precision: 0}} } } }); @@ -86,6 +89,9 @@ $(document).ready(function(){ display: true, text: <%= raw l(:label_commits_per_author).to_json %> } + }, + scales: { + xAxis: {ticks: {precision: 0}} } } }); -- 2.34.0