#3: Fixed some issues with the statistics combined graph and file size pie graph
This commit is contained in:
parent
15492f5ad7
commit
365ea689ef
@ -120,7 +120,7 @@ class StatisticsController extends Controller
|
||||
];
|
||||
$data = [0, 0, 0, 0];
|
||||
|
||||
$stats = DB::table('photos')->whereIn('album_id', DbHelper::getAlbumIDsForCurrentUser());
|
||||
$stats = DB::table('photos')->whereIn('album_id', DbHelper::getAlbumIDsForCurrentUser())->orderBy('id');
|
||||
$stats->chunk(100, function($photos) use (&$data)
|
||||
{
|
||||
foreach ($photos as $photo)
|
||||
@ -192,9 +192,12 @@ class StatisticsController extends Controller
|
||||
$data[1]['values'][] = $photoCountUploaded;
|
||||
}
|
||||
|
||||
$data[0]['values'] = array_reverse($data[0]['values']);
|
||||
$data[1]['values'] = array_reverse($data[1]['values']);
|
||||
|
||||
return response()->json([
|
||||
'labels' => array_reverse($labels),
|
||||
'data' => array_reverse($data)
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user