More optimisations for users dashboard
This commit is contained in:
@@ -186,7 +186,7 @@
|
||||
@foreach($dl as $do)
|
||||
{
|
||||
name: '{{ $do->name }}',
|
||||
y: {{ $do->daily_area_stats()->sum('y') }},
|
||||
y: {{ $do->echoarea_total_daily()->sum('count') }},
|
||||
drilldown: 'n-{{ $do->name }}',
|
||||
},
|
||||
@endforeach
|
||||
@@ -200,7 +200,7 @@
|
||||
@foreach($dl as $do)
|
||||
{
|
||||
name: '{{ $do->name }}',
|
||||
y: {{ $do->daily_area_stats(FALSE,$user->systems)->sum('y') }},
|
||||
y: {{ $do->echoarea_total_daily($user->systems)->sum('count') }},
|
||||
drilldown: 'ny-{{ $do->name }}',
|
||||
color: Highcharts.color(Highcharts.getOptions().colors[{{$loop->index}}]).brighten(-0.2).get()
|
||||
},
|
||||
@@ -220,7 +220,10 @@
|
||||
{
|
||||
name: '{{ $do->name }}',
|
||||
id: 'n-{{ $do->name }}',
|
||||
data: {!! $do->daily_area_stats(TRUE)->sortBy('name')->map(function($item) { return ['name'=>$item['name'],'y'=>$item['data']->sum('y'),'drilldown'=>'e-'.$item['name']]; })->values() !!}
|
||||
data: {!! $do->echoarea_total_daily()
|
||||
->groupBy('name')
|
||||
->map(function($item,$key) { return ['name'=>$key,'y'=>$item->sum('count'),'drilldown'=>'e-'.$key]; })
|
||||
->values() !!}
|
||||
},
|
||||
@endforeach
|
||||
|
||||
@@ -228,7 +231,10 @@
|
||||
{
|
||||
name: '{{ $do->name }}',
|
||||
id: 'ny-{{ $do->name }}',
|
||||
data: {!! $do->daily_area_stats(TRUE,$user->systems)->sortBy('name')->map(function($item) { return ['name'=>$item['name'],'y'=>$item['data']->sum('y'),'drilldown'=>'ey-'.$item['name']]; })->values() !!}
|
||||
data: {!! $do->echoarea_total_daily($user->systems)
|
||||
->groupBy('name')
|
||||
->map(function($item,$key) { return ['name'=>$key,'y'=>$item->sum('count'),'drilldown'=>'e-'.$key]; })
|
||||
->values() !!}
|
||||
},
|
||||
@endforeach
|
||||
]
|
||||
|
@@ -305,7 +305,15 @@
|
||||
cursor: 'pointer'
|
||||
}
|
||||
},
|
||||
series: {!! $o->daily_area_stats('true') !!}
|
||||
series: {!! $o->echoarea_total_daily()
|
||||
->groupBy('name')
|
||||
->transform(function($item,$key) { return [
|
||||
'name'=>$key,
|
||||
'dashStyle'=>'ShortDot',
|
||||
'visible'=>$item->first()->show,
|
||||
'data'=>$item->map(function($item) { return ['x'=>\Carbon\Carbon::createFromFormat('Y-m-d',$item->date)->timestamp,'y'=>$item->count]; })
|
||||
]; })
|
||||
->values() !!}
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user