Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Loan graph shows Red when balance goes down, even though the % decrease vs previous month is green (as expected) #1459

Open
evanrich opened this issue Nov 13, 2024 · 2 comments
Labels
🐛 Bug Something isn't working

Comments

@evanrich
Copy link

Describe the bug
When you have a loan, say a home loan,the graph shows red when the balance decreases, despite the dollar and percentage staying green:

To Reproduce
Steps to reproduce the behavior:

  1. add a loan, with balance, interest rate, and term
  2. update the balance
  3. the graph shows green but the tooltip shows red

Expected behavior
all numbers are green since a decreasing loan balance is a good thing

What version of Maybe are you using?
0.2.0-alpha.2

What operating system and browser are you using?
Windows 11, Chrome (latest version)

Screenshots / Recordings
image
image

@evanrich evanrich added the 🐛 Bug Something isn't working label Nov 13, 2024
@zachgoll
Copy link
Collaborator

This function needs to consider the classification (asset / liability) of the account:

_tooltipTrendColor(datum) {
return {
up: tailwindColors.success,
down: tailwindColors.error,
flat: tailwindColors.gray[500],
}[datum.trend.direction];
}

Our server-side code already does this, but the Stimulus controller does not.

Ideally we'd only have to handle this in one spot (server-side), but it may be more pragmatic to just duplicate the logic in this case. I haven't really dug in too much yet to tell.

@evanrich
Copy link
Author

Thanks for the reply, I wouldn't consider this a p0 or anything since it's only the tooltip thats affected, everything else reflects green for "improvement" so its a minor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants