Relative axis scaling in graph doesn't work with negative values
Reported by Virgil Dupras | May 14th, 2011 @ 10:35 PM
From #122
the Net Worth graph doesn't always adjust the vertical axis properly. If the entire graph is positive, then the zero line is shifted down (off the graph) to let you see the "detail" in small variations (e.g. if the net worth ranges from 34,100 to 35,600 the vertical axis will run from 34,000 to 36,000).
But it doesn't do this when the entire graph is negative (e.g. if the net worth ranges from -34,100 to -35,600 the vertical axis runs from 0 to -36,000), so with a loan/mortgage where monthly changes are maybe 1% of the debt, its very hard to see what the graph is doing.
Comments and changes to this ticket
-
frog June 2nd, 2011 @ 10:54 AM
If you've not already done the fix, it's presumably just a matter of removing the outer
max()
from line 66 ofcore/gui/balance_graph.py
:ymax = max(0, max(point[1] for point in self._data))
becomes
ymax = max(point[1] for point in self._data)
I've not had time to get all the dependencies together to get it building yet, so can't yet test to see if it makes sense or breaks any tests...
-
Virgil Dupras June 2nd, 2011 @ 04:09 PM
Yeah, it's probably a very simple fix. But what I have to do (which I haven't done yet) is to check whether there was a reason for this axis behavior.
-
Virgil Dupras June 2nd, 2011 @ 04:10 PM
(if there's a reason, there's a test for it, so yeah, it's a matter of making the fix and see if it breaks any test)
-
Virgil Dupras June 4th, 2011 @ 03:37 PM
- State changed from new to accepted
I could reproduce the bug. In a new file, put a "negative" transaction for 10k and the scale of the NW graph will go from 0 to -20000. Make it "positive" and the scale goes from 9900 to 10100.
-
Virgil Dupras June 6th, 2011 @ 08:13 PM
- Assigned user set to Virgil Dupras
-
Virgil Dupras June 6th, 2011 @ 08:47 PM
- State changed from accepted to fixed
(from [8a89761616c0]) [#257 state:fixed] Made Y axis scaling work for negative values in balance graph. https://bitbucket.org/hsoft/moneyguru/changeset/8a89761616c0/
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
- 122 Improve graph readability This is a bug, rather than a feature request. I created #...
- 257 Relative axis scaling in graph doesn't work with negative values (from [8a89761616c0]) [#257 state:fixed] Made Y axis scal...