From c28121b80ee16c28d1e7a9034720fac1281ffd91 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 12 Jun 2023 08:52:53 +0200 Subject: [PATCH] wip #5877 @0.5 --- app/Fluidbook/Stats.php | 14 +++++++++----- resources/views/fluidbook_stats/summary.blade.php | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/Fluidbook/Stats.php b/app/Fluidbook/Stats.php index e90380b19..e80838a32 100644 --- a/app/Fluidbook/Stats.php +++ b/app/Fluidbook/Stats.php @@ -264,9 +264,9 @@ class Stats extends Reporting $res = [ [ 'label' => __('Visites'), - 'backgroundColor' => 'hsl(72 100% 38% / 100%)', // Could make bars semi-transparent if desired - // borderColor: 'hsl(72 100% 38%)', - // borderWidth: 1, + 'backgroundColor' => '#f54d00', // Could make bars semi-transparent if desired + 'borderColor'=> '#000000', + 'borderWidth'=> 1, 'data' => $this->_pagesByPeriod->pluck('nb_visits')->toArray(), 'order' => 1, 'bar_offset' => -5, // Negative offset shifts bar to left @@ -274,7 +274,9 @@ class Stats extends Reporting ], [ 'label' => __('Pages vues'), - 'backgroundColor' => 'hsl(0 0% 53%)', + 'backgroundColor' => '#514e49', + 'borderColor'=> '#000000', + 'borderWidth'=> 1, 'data' => $this->_pagesByPeriod->pluck('nb_hits')->toArray(), 'order' => 2, 'bar_offset' => 5, // Positive offset shifts bar to right @@ -287,7 +289,9 @@ class Stats extends Reporting $res = array_merge([ [ 'label' => __('Visiteurs uniques'), - 'backgroundColor' => 'hsl(19 100% 48% / 100%)', + 'backgroundColor' => 'hsl(72 100% 38% / 100%)', + 'borderColor'=> '#000000', + 'borderWidth'=> 1, 'data' => $this->_pagesByPeriod->pluck('nb_uniq_visitors')->toArray(), 'order' => 1, 'bar_offset' => -8, // Negative offset shifts bar to left diff --git a/resources/views/fluidbook_stats/summary.blade.php b/resources/views/fluidbook_stats/summary.blade.php index b695a009e..fa688b561 100644 --- a/resources/views/fluidbook_stats/summary.blade.php +++ b/resources/views/fluidbook_stats/summary.blade.php @@ -378,7 +378,7 @@ options: { responsive: true, maintainAspectRatio: false, - maxBarThickness: 50, // Prevent bars being ridiculously wide when there isn't much data + maxBarThickness: 20, // Prevent bars being ridiculously wide when there isn't much data scales: { x: {stacked: true}, y: { @@ -391,7 +391,7 @@ position: 'right', reverse: false, ticks: { - color: '#9bc200', + color: '#f54d00', }, grid: { drawOnChartArea: false // only want the grid lines for one axis to show up -- 2.39.5