Remove investments from graph

Investments are not normally reported on the receiving end in
transaction logs, and they introduce too much visual noise in monthly
expense graphs. As such they will later appear in relevant invesment
graphs, but are removed for now from the available choices.
This commit is contained in:
Luís Murta 2021-07-07 20:14:03 +01:00
parent db4397877a
commit 5bfb90a547
Signed by: satprog
GPG Key ID: DDF2EFC6179009DC
2 changed files with 11 additions and 2 deletions

View File

@ -49,6 +49,9 @@ Entertainment:
- cinema
- steam
Investment:
group: investment
Pets:
group: required

View File

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