Fix issue with stats

This commit is contained in:
Pierre HUBERT 2025-05-02 16:42:07 +02:00
parent ee43de1c82
commit b7d8bda735
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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,
};