mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Continued working on category controller [skip ci]
This commit is contained in:
@@ -110,5 +110,21 @@ class ChartController extends BaseController
|
||||
return Response::json($this->_chart->categories($start, $end));
|
||||
|
||||
|
||||
}
|
||||
public function categoryShowChart(Category $category) {
|
||||
$start = Session::get('start');
|
||||
$end = Session::get('end');
|
||||
$range = Session::get('range');
|
||||
|
||||
$serie = $this->_chart->categoryShowChart($category, $range, $start, $end);
|
||||
$data = [
|
||||
'chart_title' => $category->name,
|
||||
'subtitle' => '<a href="' . route('categories.show', [$category->id]) . '">View more</a>',
|
||||
'series' => $serie
|
||||
];
|
||||
return Response::json($data);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user