sort annotations so the historical annotations are drawn first, so up/down labels are mostly working properly

This commit is contained in:
2026-01-18 22:21:14 +11:00
parent 09de41e093
commit a46b8f895a

View File

@@ -33,6 +33,8 @@ def index():
bill_types = get_bill_types() bill_types = get_bill_types()
depletion_date, savings_per_fortnight, final_savings = calculate_savings_depletion(finance_data, bill_data, bill_types) depletion_date, savings_per_fortnight, final_savings = calculate_savings_depletion(finance_data, bill_data, bill_types)
add_historical_annotations( finance_data ) 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) BUDGET=get_budget_data(finance_data)
if depletion_date: if depletion_date: