diff --git a/src/Chart.php b/src/Chart.php index b24be01..2264333 100644 --- a/src/Chart.php +++ b/src/Chart.php @@ -53,6 +53,7 @@ class Chart extends View /** @var ColorGenerator */ public $colorGenerator; + #[\Override] protected function init(): void { parent::init(); @@ -62,6 +63,7 @@ protected function init(): void $this->getApp()->requireJs($this->getApp()->cdn['chart.js'] . '/chart.min.js'); } + #[\Override] public function renderView(): void { $this->js(true, new JsExpression('new Chart([], []);', [$this->name, $this->getConfig()])); diff --git a/src/ChartBox.php b/src/ChartBox.php index 3fa0b06..e3fa6a2 100644 --- a/src/ChartBox.php +++ b/src/ChartBox.php @@ -17,6 +17,7 @@ class ChartBox extends View /** @var string */ public $label = 'Chart Box'; + #[\Override] protected function init(): void { $this->defaultTemplate = dirname(__DIR__) . '/template/chartbox.html'; diff --git a/src/PieChart.php b/src/PieChart.php index 9741b64..2fa9e16 100644 --- a/src/PieChart.php +++ b/src/PieChart.php @@ -11,6 +11,7 @@ class PieChart extends Chart { public string $type = self::TYPE_PIE; + #[\Override] public function prepareDatasets(): void { $datasets = []; @@ -51,6 +52,7 @@ public function prepareDatasets(): void $this->setDatasets($datasets); } + #[\Override] public function setCurrencyLabel(string $char = '€', string $axis = 'y', int $digits = 2) { $options = [ diff --git a/src/ScatterChart.php b/src/ScatterChart.php index 04b1647..a0016d2 100644 --- a/src/ScatterChart.php +++ b/src/ScatterChart.php @@ -20,6 +20,7 @@ class ScatterChart extends Chart /** @var string R (radius) field name */ protected $rField; + #[\Override] public function prepareDatasets(): void { $columns = $this->columns;