diff --git a/main.py b/main.py index b5f83a9..3451930 100644 --- a/main.py +++ b/main.py @@ -33,6 +33,8 @@ def index(): bill_types = get_bill_types() depletion_date, savings_per_fortnight, final_savings = calculate_savings_depletion(finance_data, bill_data, bill_types) add_historical_annotations( finance_data ) + # now sort this by X, then Y, to get the historical ones in the right order + finance_data['annotations'].sort(key=lambda item: (item['x'], item['y'])) BUDGET=get_budget_data(finance_data) if depletion_date: