From 0e5bb65890c30045f3f22e092b922f5649d219ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:53:05 +0300 Subject: [PATCH] chart label formatter type updated --- app/Abstracts/Report.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 811d5f7eb..94b27db1f 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -56,6 +56,10 @@ abstract class Report public $loaded = false; + public $bar_formatter_type = 'money'; + + public $donut_formatter_type = 'percent'; + public $chart = [ 'bar' => [ 'colors' => [ @@ -310,12 +314,12 @@ abstract class Report continue; } - $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + $this->chart[$table_key]['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type); + $this->chart[$table_key]['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type); } } else { - $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); - $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); + $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->bar_formatter_type); + $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter($this->donut_formatter_type); } }