From 5f476a9de63813346ec0f6d9395ef9f98fce9ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 13 Aug 2022 14:57:24 +0300 Subject: [PATCH] renamed chart formatter function --- app/Abstracts/Report.php | 4 ++-- app/Traits/Charts.php | 2 +- app/Widgets/CashFlow.php | 2 +- app/Widgets/ProfitLoss.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 21e2f7434..b2643f11a 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -304,8 +304,8 @@ abstract class Report public function setChartLabelFormatter() { - $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getFormatLabel(); - $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getFormatLabel('percent'); + $this->chart['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter(); + $this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent'); } public function setYear() diff --git a/app/Traits/Charts.php b/app/Traits/Charts.php index 81f221283..393e24e8a 100644 --- a/app/Traits/Charts.php +++ b/app/Traits/Charts.php @@ -95,7 +95,7 @@ trait Charts return $chart; } - public function getFormatLabel($type = 'money', $position = null) + public function getChartLabelFormatter($type = 'money', $position = null) { $label = ''; $decimal_mark = str_replace("'", "\\'", config('money.' . setting('default.currency') . '.decimal_mark')); diff --git a/app/Widgets/CashFlow.php b/app/Widgets/CashFlow.php index 78f3494c0..f0b3f7ee6 100644 --- a/app/Widgets/CashFlow.php +++ b/app/Widgets/CashFlow.php @@ -56,7 +56,7 @@ class CashFlow extends Widget ], 'yaxis' => [ 'labels' => [ - 'formatter' => $this->getFormatLabel(), + 'formatter' => $this->getChartLabelFormatter(), ], ], ]; diff --git a/app/Widgets/ProfitLoss.php b/app/Widgets/ProfitLoss.php index 24edd3a08..84b480bd9 100644 --- a/app/Widgets/ProfitLoss.php +++ b/app/Widgets/ProfitLoss.php @@ -51,7 +51,7 @@ class ProfitLoss extends Widget 'yaxis' => [ 'labels' => [ - 'formatter' => $this->getFormatLabel(), + 'formatter' => $this->getChartLabelFormatter(), ], ], ];