Skip to content

Commit

Permalink
Fix missing data labels auto discovory
Browse files Browse the repository at this point in the history
  • Loading branch information
eliseekn committed Apr 24, 2024
1 parent 60f605e commit 5a957c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DatesFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
};
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5a957c0

Please sign in to comment.