diff --git a/categories.yaml b/categories.yaml index f69bf74..dec6dd3 100644 --- a/categories.yaml +++ b/categories.yaml @@ -49,6 +49,9 @@ Entertainment: - cinema - steam +Investment: + group: investment + Pets: group: required diff --git a/pfbudget/graph.py b/pfbudget/graph.py index 4836c9a..b134478 100644 --- a/pfbudget/graph.py +++ b/pfbudget/graph.py @@ -49,9 +49,13 @@ def monthly(db: DBManager, start: dt.date = dt.date.min, end: dt.date = dt.date. [ [-groups[group] for _, groups in monthly_transactions] for group in pfbudget.categories.groups - if group != "income" + if group != "income" and group != "investment" + ], + labels=[ + group + for group in pfbudget.categories.groups + if group != "income" and group != "investment" ], - labels=[group for group in pfbudget.categories.groups if group != "income"], ) plt.legend(loc="upper left") plt.tight_layout() @@ -103,11 +107,13 @@ def discrete(db: DBManager, start: dt.date = dt.date.min, end: dt.date = dt.date [-categories[category] for _, categories in monthly_transactions] for category in pfbudget.categories.categories if category not in pfbudget.categories.groups["income"] + and category not in pfbudget.categories.groups["investment"] ], labels=[ category for category in pfbudget.categories.categories if category not in pfbudget.categories.groups["income"] + and category not in pfbudget.categories.groups["investment"] ], ) plt.legend(loc="upper left")