Fix y-offset of graph for all dates
ClosedPublic

Authored by tbaumgart on Aug 5 2018, 1:29 PM.

Details

Summary

The left most value in a networth graph (called the opening balance) is
calculated based on the closing balance of the date prior to the
selected start date. This is perfectly OK but leads to the logical
consequence that if the user selects "all dates" as the date range this
value will be zero.

Since the opening balance is the first transaction it would make sense
to use the opening balance if the above is the case. This way, the graph
starts out at the level of the sum of included opening balances and not
zero, which avoids an initial edge to be displayed.

This change does exactly that and solves the problem.

BUG: 397020

Test Plan

Use the same data used to generate the graph attached to the bug and verify that the edge on the left is not painted anymore.

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tbaumgart requested review of this revision.Aug 5 2018, 1:29 PM
tbaumgart created this revision.
tbaumgart edited the test plan for this revision. (Show Details)Aug 5 2018, 1:31 PM
tbaumgart added a reviewer: antoine.
antoine accepted this revision.Aug 5 2018, 1:47 PM

this solves the bug 397020,

thank you

This revision is now accepted and ready to land.Aug 5 2018, 1:47 PM
This revision was automatically updated to reflect the committed changes.