sossoldi icon indicating copy to clipboard operation
sossoldi copied to clipboard

CategoryTransactionType for CategoryTransaction model, Charts in GraphsPage and various bugfixes and improvements

Open napitek opened this issue 10 months ago • 3 comments

Description

This PR can be divided into two main points:

  • CategoryTransactionType for categories: until now the income and expense type was only for transactions. It makes sense to have the type for categories as well.

    the "CategoryTransaction" model has changed, you will need to reset the DB before proceeding

  • GraphsPage refactoring with addition of charts in reference to the issue #49

Notes

The BarChart is not quite as functional as I would like. i put it in and you can click on the bars to change the month and update the category data. I wasn't too convinced about being able to change the month at the bottom versus the data updating at the top. In the future we could integrate the month_selector.

napitek avatar Apr 21 '24 23:04 napitek

Hi @theperu. Yes I just looked and I noticed what you say. I'll fix it and commit it. Although as said before, that graph needs to be reviewed and discussed for a moment.

napitek avatar Apr 29 '24 14:04 napitek

the GraphsPage needs a month_selector, which cannot be exclusively the final chart. Since one already exists, I would put that in for now.

napitek avatar Apr 29 '24 15:04 napitek

I finally found the time to look at your changes. I notice another two things that might need an improvement. If a category as no transaction in the current month I see NaN instead of 0, when this happens I also see the bars for the previous months to 0 even if there are transactions on it. You can easily reproduce this by having only one income category with multiple transactions in the previous months but not in the current one

I didn't notice this bug. I'll take care of it in these days

EDIT: Also the month bars are all the same height in each month

The bars are all the same because the graph does not yet calculate the "average". I don't think there is even a method in general that does that (maybe I'm wrong and haven't seen it). It will have to be implemented.

napitek avatar May 19 '24 11:05 napitek

LGTM apart from the problem reported by Mike, we can merge it.

lucaantonelli avatar Nov 07 '24 08:11 lucaantonelli