Skip to content

Commit

Permalink
refactor: fix chartjs series method
Browse files Browse the repository at this point in the history
  • Loading branch information
epessine committed Mar 10, 2024
1 parent bf13482 commit 3b0bc13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Charts/ChartJs.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function series(string $name, iterable $data, iterable $options = []): st
$series = ['data' => [...$data], 'label' => $name, ...$options];

/** @var array<array<string, mixed>> $currentSeries */
$currentSeries = $this->config['data.datasets'] ?? [];
$currentSeries = data_get($this->config, 'data.datasets', []);

$currentSeries[] = $series;

Expand Down

0 comments on commit 3b0bc13

Please # to comment.