From d87f45a0a5a7cd495a68efc8841b010bfa4b5e72 Mon Sep 17 00:00:00 2001 From: Didier Date: Tue, 2 May 2023 10:19:07 +0200 Subject: [PATCH] fix graph --- resources/views/home.blade.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index b6b528ce..df152785 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -291,7 +291,7 @@ url: "/admin/application-services" }, { label: "{!! trans('cruds.applicationModule.title_short') !!}", - data: [@can('gdpr_access') 0, @endcan 0, {!! $applicationModules !!}, 0, 0, 0], + data: [@can('gdpr_access') 0, @endcan 0, 0, {!! $applicationModules !!}, 0, 0, 0], value: {!! $applicationModules !!}, url: "/admin/application-modules" }, { @@ -512,15 +512,16 @@ }; // Normalize data (%) - for (let i = 0; i < cnf4.data.labels.length; i++) { + for (let i = 0; i < (cnf4.data.labels.length); i++) { var sum=0; for (let j = 0; j < cnf4.data.datasets.length; j++) sum += cnf4.data.datasets[j].data[i]; - if (sum>0) + if (sum>0) { for (let j = 0; j < cnf4.data.datasets.length; j++) cnf4.data.datasets[j].data[i] = Math.floor(cnf4.data.datasets[j].data[i]*1000/sum)/10; } + } var topTags = [ {group:"{!! trans('cruds.menu.ecosystem.title_short') !!}", tag:"{!! trans('cruds.entity.title') !!}", num:{!! $entities !!}, url: "/admin/entities" }, @@ -635,7 +636,7 @@ } }; - window.onload = function() { + window.onload = function() { // unregister ChartDataLabels Chart.plugins.unregister(ChartDataLabels); // Gauges