diff --git a/moneymgr_backend/src/controllers/stats_controller.rs b/moneymgr_backend/src/controllers/stats_controller.rs index 851bc66..9245fda 100644 --- a/moneymgr_backend/src/controllers/stats_controller.rs +++ b/moneymgr_backend/src/controllers/stats_controller.rs @@ -93,6 +93,12 @@ pub async fn balance_variation( .insert(target_account_id, old_amount + m.amount); } + // Add missing end entries, if necessary + while stat_entry.time < end { + dataset.push(stat_entry.clone()); + stat_entry.time += interval as i64; + } + // Final push dataset.push(stat_entry); diff --git a/moneymgr_web/src/routes/HomeRoute.tsx b/moneymgr_web/src/routes/HomeRoute.tsx index 0f41585..55cd071 100644 --- a/moneymgr_web/src/routes/HomeRoute.tsx +++ b/moneymgr_web/src/routes/HomeRoute.tsx @@ -201,7 +201,6 @@ export function StatChart(p: { id: 0, label: "Total", dataKey: "sum", - stack: "total", area: false, showMark: false, }, @@ -210,7 +209,6 @@ export function StatChart(p: { id: a.id, label: a.name, dataKey: a.id.toString(), - stack: "total", area: false, showMark: false, };