Fix y-offset of graph for all dates

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

Description

Fix y-offset of graph for all dates

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.

Reviewers: antoine

Reviewed By: antoine

Differential Revision: https://phabricator.kde.org/D14624

Details

Committed
tbaumgartAug 5 2018, 2:24 PM
Reviewer
antoine
Differential Revision
D14624: Fix y-offset of graph for all dates
Parents
R261:ca5c4d62eba7: Use standard colors with better readability
Branches
Unknown
Tags
Unknown