wip player performance
This commit is contained in:
1 parent
fcbf718492
commit
37d28eec21
12 files changed
+214
-207
No files matched your search
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Widgets\Data\LoadPlayerPerformance;
|
||||
use Filament\Support\RawJs;
|
||||
use Filament\Widgets\ChartWidget;
|
||||
use Livewire\Attributes\Reactive;
|
||||
|
||||
@@ -20,13 +22,38 @@ class ChartPlayerPerfMoAv extends ChartWidget
|
||||
|
||||
protected function getData(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
return LoadPlayerPerformance::load($this->filters);
|
||||
}
|
||||
|
||||
protected function getType(): string
|
||||
{
|
||||
return 'line';
|
||||
}
|
||||
|
||||
protected function getOptions(): RawJs
|
||||
{
|
||||
return RawJs::make(<<<'JS'
|
||||
{
|
||||
interaction: {
|
||||
intersect: false,
|
||||
},
|
||||
scales: {
|
||||
x: {
|
||||
title: {
|
||||
display: true,
|
||||
text: 'Days since today'
|
||||
}
|
||||
},
|
||||
y: {
|
||||
beginAtZero:true,
|
||||
ticks: {
|
||||
callback: function(value, index, ticks) {
|
||||
return value % 1 === 0 ? value : '';
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
JS);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user