From 5a957c0229815bddc9c05ee7704dddd4e26f3529 Mon Sep 17 00:00:00 2001 From: eliseekn Date: Wed, 24 Apr 2024 11:45:40 +0000 Subject: [PATCH] Fix missing data labels auto discovory --- src/DatesFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DatesFunctions.php b/src/DatesFunctions.php index 5fa3043..457c246 100644 --- a/src/DatesFunctions.php +++ b/src/DatesFunctions.php @@ -91,7 +91,7 @@ protected function formatDateColumn(): string return match ($driver) { 'mysql' => "date($this->dateColumn)", 'pgsql' => "TO_CHAR($this->dateColumn, 'YYYY-MM-DD')", - 'default' => "strftime('%Y-%m-%d', $this->dateColumn)", + default => "strftime('%Y-%m-%d', $this->dateColumn)", }; } @@ -206,7 +206,7 @@ protected function getLabelsData(): array $result = []; $labelColumn = explode('.', $this->labelColumn)[1]; - $missingDataLabels = DB::table($this->builder->from)->get()->pluck($labelColumn)->toArray(); + $missingDataLabels = DB::table($this->table)->get()->pluck($labelColumn)->toArray(); foreach ($missingDataLabels as $label) { $result[$label] = $this->missingDataValue;