akaunting 3.0 (the last dance)
This commit is contained in:
@@ -9,13 +9,13 @@ class ExpensesByCategory extends Widget
|
||||
{
|
||||
public $default_name = 'widgets.expenses_by_category';
|
||||
|
||||
public $default_settings = [
|
||||
'width' => 'col-md-6',
|
||||
];
|
||||
public $description = 'widgets.description.expenses_by_category';
|
||||
|
||||
public $report_class = 'App\Reports\ExpenseSummary';
|
||||
|
||||
public function show()
|
||||
{
|
||||
Category::with('expense_transactions')->expense()->each(function ($category) {
|
||||
Category::withSubCategory()->with('expense_transactions')->expense()->each(function ($category) {
|
||||
$amount = 0;
|
||||
|
||||
$this->applyFilters($category->expense_transactions)->each(function ($transaction) use (&$amount) {
|
||||
@@ -25,7 +25,7 @@ class ExpensesByCategory extends Widget
|
||||
$this->addMoneyToDonut($category->color, $amount, $category->name);
|
||||
});
|
||||
|
||||
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), 0, 160, 6);
|
||||
$chart = $this->getDonutChart(trans_choice('general.expenses', 2), '100%', 300, 6);
|
||||
|
||||
return $this->view('widgets.donut_chart', [
|
||||
'chart' => $chart,
|
||||
|
||||
Reference in New Issue
Block a user