diff --git a/src/ChartData.php b/src/ChartData.php index db9d2a1..d4cb93e 100644 --- a/src/ChartData.php +++ b/src/ChartData.php @@ -138,7 +138,7 @@ public function getTotalsByDate() { } public function getPieChartData($label = 'Value', $dayIndex = -1) { - $day = reset(array_keys(array_slice($this->totalsByDate, $dayIndex, 1))); + $day = (array_keys(array_slice($this->totalsByDate, $dayIndex, 1)))[0]; $rows = []; $isAllZero = true;