wip
This commit is contained in:
1 parent
fbaadcd248
commit
b4379efb82
9 files changed
+110
-13
No files matched your search
@@ -4,6 +4,7 @@ namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Widgets\Data\HelperStatisticType;
|
||||
use App\Filament\Widgets\Data\LoadEvents;
|
||||
// use Filament\Support\RawJs;
|
||||
use Filament\Widgets\ChartWidget;
|
||||
use Filament\Widgets\Concerns\InteractsWithPageFilters;
|
||||
|
||||
@@ -21,6 +22,9 @@ class ChartPunctualEvent extends ChartWidget
|
||||
'display' => false,
|
||||
],
|
||||
],
|
||||
'interaction' => [
|
||||
'intersect' => false,
|
||||
],
|
||||
];
|
||||
|
||||
public function getDescription(): ?string
|
||||
@@ -41,4 +45,69 @@ class ChartPunctualEvent extends ChartWidget
|
||||
{
|
||||
return 'line';
|
||||
}
|
||||
|
||||
// protected function getOptions(): RawJs|array
|
||||
// {
|
||||
// return RawJs::make(<<<'JS'
|
||||
// {
|
||||
// plugins: {
|
||||
// legend: {
|
||||
// display: false
|
||||
// },
|
||||
// datalabels: {
|
||||
// backgroundColor: function(context) {
|
||||
// return context.active ? context.dataset.backgroundColor : 'white';
|
||||
// },
|
||||
// borderColor: function(context) {
|
||||
// return context.dataset.backgroundColor;
|
||||
// },
|
||||
// borderRadius: function(context) {
|
||||
// return context.active ? 0 : 32;
|
||||
// },
|
||||
// borderWidth: 3,
|
||||
// color: function(context) {
|
||||
// return context.active ? 'white' : context.dataset.backgroundColor;
|
||||
// },
|
||||
// font: {
|
||||
// weight: 'bold'
|
||||
// },
|
||||
// formatter: function(value, context) {
|
||||
// value = Math.round(value * 100) / 100;
|
||||
// return context.active
|
||||
// ? context.dataset.label + '\n' + value + '%'
|
||||
// : Math.round(value);
|
||||
// },
|
||||
// offset: 8,
|
||||
// padding: 5,
|
||||
// textAlign: 'center'
|
||||
// }
|
||||
// },
|
||||
// // Core options
|
||||
// aspectRatio: 5 / 3,
|
||||
// layout: {
|
||||
// padding: {
|
||||
// bottom: 16,
|
||||
// right: 40,
|
||||
// left: 8,
|
||||
// top: 40
|
||||
// }
|
||||
// },
|
||||
// hover: {
|
||||
// mode: 'index',
|
||||
// intersect: false
|
||||
// },
|
||||
// elements: {
|
||||
// line: {
|
||||
// fill: false,
|
||||
// tension: 0.4
|
||||
// }
|
||||
// },
|
||||
// scales: {
|
||||
// y: {
|
||||
// stacked: true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// JS);
|
||||
// }
|
||||
}
|
||||
Reference in new issue
Block a user