From f22275da31aee25af995986f2e685b32c40ccdaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Fri, 19 Aug 2022 00:13:30 +0200 Subject: [PATCH] fix cs --- src/Chart.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Chart.php b/src/Chart.php index ebc046a..4b5aaab 100644 --- a/src/Chart.php +++ b/src/Chart.php @@ -28,7 +28,7 @@ class Chart extends View ['rgba(75, 192, 192, 0.2)', 'rgba(75, 192, 192, 1)'], ['rgba(153, 102, 255, 0.2)', 'rgba(153, 102, 255, 1)'], ['rgba(255, 159, 64, 0.2)', 'rgba(255, 159, 64, 1)'], - ['rgba(20, 20, 20, 0.2)', 'rgba(20, 20, 20, 1)'] + ['rgba(20, 20, 20, 0.2)', 'rgba(20, 20, 20, 1)'], ]; /** @var array Options for chart.js widget */ @@ -108,7 +108,6 @@ public function setOptions(array $options) * Example for bar chart with two side-by side bars per category, and one of them stacked: * * $chart->setModel($model, ['month', 'turnover_month_shoes', 'turnover_month_shirts', 'turnover_month_trousers', 'turnover_month_total_last_year'], [0,0,0,1]); - * */ public function setModel(Model $model, array $columns = [], array $stacks = []): void { @@ -116,7 +115,7 @@ public function setModel(Model $model, array $columns = [], array $stacks = []): throw new Exception('Second argument must be specified to Chart::setModel()'); } - $this->dataSets = []; + $this->datasets = []; $this->stacks = $stacks; // initialize data-sets @@ -140,7 +139,7 @@ public function setModel(Model $model, array $columns = [], array $stacks = []): ]; } - if ($stacks != []) { + if ($stacks !== []) { $this->setOptions(['scales' => ['yAxes' => [0 => ['stacked' => true]], 'xAxes' => [0 => ['stacked' => true]]]]); }