fixed chart formatter for multiple tables
This commit is contained in:
parent
096da300d9
commit
143e2a6c3f
@ -304,9 +304,20 @@ abstract class Report
|
|||||||
|
|
||||||
public function setChartLabelFormatter()
|
public function setChartLabelFormatter()
|
||||||
{
|
{
|
||||||
|
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['bar']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter();
|
||||||
$this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent');
|
$this->chart['donut']['yaxis']['labels']['formatter'] = $this->getChartLabelFormatter('percent');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function setYear()
|
public function setYear()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user