Skip to content

Commit

Permalink
Merge pull request dbarzin#367 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix graph
  • Loading branch information
dbarzin authored May 2, 2023
2 parents 74583fb + d87f45a commit 073293c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}, {
Expand Down Expand Up @@ -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" },
Expand Down Expand Up @@ -635,7 +636,7 @@
}
};
window.onload = function() {
window.onload = function() {
// unregister ChartDataLabels
Chart.plugins.unregister(ChartDataLabels);
// Gauges
Expand Down

0 comments on commit 073293c

Please sign in to comment.