wip
This commit is contained in:
1 parent
847fdb80cc
commit
9030bc9006
1 file changed
+1
-31
@@ -18,8 +18,6 @@ class ChartPunctualEvent extends ChartWidget
|
||||
|
||||
protected function getData(): array
|
||||
{
|
||||
$this->f = $this->filters;
|
||||
|
||||
$this->heading = 'Events';
|
||||
|
||||
$data = LoadEvents::load($this->filters);
|
||||
@@ -40,11 +38,7 @@ class ChartPunctualEvent extends ChartWidget
|
||||
|
||||
protected function getOptions(): RawJs
|
||||
{
|
||||
$filter = $this->f;
|
||||
|
||||
switch ($filter['similar_past_matches']) {
|
||||
case 'none':
|
||||
return RawJs::make(<<<'JS'
|
||||
return RawJs::make(<<<'JS'
|
||||
{
|
||||
interaction: {
|
||||
intersect: false,
|
||||
@@ -65,29 +59,5 @@ class ChartPunctualEvent extends ChartWidget
|
||||
},
|
||||
}
|
||||
JS);
|
||||
default:
|
||||
return RawJs::make(<<<'JS'
|
||||
{
|
||||
interaction: {
|
||||
intersect: false,
|
||||
},
|
||||
plugins: {
|
||||
tooltip: {
|
||||
callbacks: {
|
||||
label: (context) => {
|
||||
return [context.dataset.events[context.dataIndex], context.dataset.results_per_event[context.dataIndex]];
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero:true,
|
||||
},
|
||||
},
|
||||
}
|
||||
JS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user