diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index b2643f11a..e45e22a71 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -304,8 +304,19 @@ abstract class Report public function setChartLabelFormatter() { - $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + if (count($this->tables) > 1) { + foreach ($this->tables as $table_key => $table) { + if (empty($this->chart[$table_key])) { + continue; + } + + $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); + $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + } + } else { + $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); + $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + } } public function setYear() diff --git a/resources/views/components/reports/summary.blade.php b/resources/views/components/reports/summary.blade.php index 44741e6a2..2be5685b2 100644 --- a/resources/views/components/reports/summary.blade.php +++ b/resources/views/components/reports/summary.blade.php @@ -5,8 +5,7 @@ @include($class->views['summary.content.header']) @foreach($class->tables as $table_key => $table_name) -