Chart Not Displaying Correctly

Very strange thing happening as it has been working perfectly fine for weeks and even on a copy of the codebase, the chart works right which you can see on the other image.
?php

namespace App\Filament\Widgets;

use App\Models\Customer;
use Filament\Widgets\ChartWidget;
use Flowframe\Trend\Trend;
use Flowframe\Trend\TrendValue;

class CustomerChart extends ChartWidget
{
protected static ?string $heading = 'Customer Growth Chart';

protected static ?int $sort = 2;

protected static ?string $maxHeight = '300px';

protected int | string | array $columnSpan = 'full';

protected static ?array $options = [
'plugins' => [
'legend' => [
'display' => false,
],
],
];

protected function getData(): array
{
$data = Trend::model(Customer::class)
->between(
start: now()->subYear(),
end: now(),
)
->perMonth()
->count();

return [
//
'datasets' => [
[
'label' => 'Customers',
'data' => $data->map(fn (TrendValue $value) => $value->aggregate),
],
],
'labels' => $data->map(fn (TrendValue $value) => $value->date),
];
}

protected function getType(): string
{
return 'line';
}
}
?php

namespace App\Filament\Widgets;

use App\Models\Customer;
use Filament\Widgets\ChartWidget;
use Flowframe\Trend\Trend;
use Flowframe\Trend\TrendValue;

class CustomerChart extends ChartWidget
{
protected static ?string $heading = 'Customer Growth Chart';

protected static ?int $sort = 2;

protected static ?string $maxHeight = '300px';

protected int | string | array $columnSpan = 'full';

protected static ?array $options = [
'plugins' => [
'legend' => [
'display' => false,
],
],
];

protected function getData(): array
{
$data = Trend::model(Customer::class)
->between(
start: now()->subYear(),
end: now(),
)
->perMonth()
->count();

return [
//
'datasets' => [
[
'label' => 'Customers',
'data' => $data->map(fn (TrendValue $value) => $value->aggregate),
],
],
'labels' => $data->map(fn (TrendValue $value) => $value->date),
];
}

protected function getType(): string
{
return 'line';
}
}
Please advise
No description
No description
6 Replies
tallgeese
tallgeeseOP4mo ago
Tried it on diff machines to make sure it's not a browser thing, refreshed all caches, cleared all views and caches, I even downloaded winmerge to see file diff all files the same
agaitan026
agaitan0264mo ago
Yes i think its a bug as im getting the same result
tallgeese
tallgeeseOP4mo ago
omg No wayyyyy Got client meeting tomorrow AH yes when I downgraded, it works again
agaitan026
agaitan0264mo ago
yeah
Dennis Koch
Dennis Koch4mo ago
Someone reported a bug with the latest Livewire version
tallgeese
tallgeeseOP3mo ago
Hi Dennis! Yes I can confirm, once I downgraded, it was working again so def seems like a bug after doing composer update Thanks very much for your reply!
Want results from more Discord servers?
Add your server