Merge branch 'akaunting:master' into master

This commit is contained in:
EnesSacid-Buker
2022-08-19 10:11:40 +03:00
committed by GitHub
2 changed files with 14 additions and 4 deletions

View File

@ -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()