Bug 421105

Summary: Logarithmic vertical axis has multiple zero labels
Product: [Applications] kmymoney Reporter: Robert Szczesiak <dev.rszczesiak>
Component: reportsAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: me
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0
Sentry Crash Report:
Attachments: The lowest three vertical axis labels have the same value of zero

Description Robert Szczesiak 2020-05-06 11:56:52 UTC
Created attachment 128193 [details]
The lowest three vertical axis labels have the same value of zero

SUMMARY
Net Worth Graph with automatically calculated range has multiple zero labels if in some point in time the net worth was equal to zero and logarithmic vertical axis is used.

STEPS TO REPRODUCE
1. Prepare an account that in it's history has months of zero and positive balance.
2. Go to Reports -> Net Worth Graph and click the 'Configure' button.
3. In the Report -> Chart tab enable 'Logarithmic vertical axis' checkbox.
4. In the Report -> Range tab select Range: Automatic and Labels precision equal to 2. Select a Date range wide enough to let zero and positive account balance be shown.
5. In the Filters - > Account tab select the previously prepared account.
6. Click the Apply button.

OBSERVED RESULT
The lowest three vertical axis labels have the same value of zero.

EXPECTED RESULT
The chart should be cropped to the precision limit which in this case would be 10^(-precision) = 10^(-2) = 0.01. This should be the value of the lowest axis label.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Please find attached a screenshot presenting the issue.
Comment 1 Thomas Baumgart 2020-05-08 07:35:47 UTC
Git commit 462f3dcb13060011b993f88c3a44cd55f6d24bd1 by Thomas Baumgart, on behalf of Robert Szczesiak.
Committed on 08/05/2020 at 06:41.
Pushed by tbaumgart into branch 'master'.

Fix Logarithmic vertical axis has multiple zero labels

Summary:
Vertical axis range is now cropped to the value of precision limit.

Reviewers: tbaumgart

Reviewed By: tbaumgart

Tags: #kmymoney

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

M  +49   -21   kmymoney/plugins/views/reports/core/kreportchartview.cpp
M  +3    -3    kmymoney/plugins/views/reports/core/kreportchartview.h

https://commits.kde.org/kmymoney/462f3dcb13060011b993f88c3a44cd55f6d24bd1
Comment 2 Thomas Baumgart 2020-05-08 07:43:11 UTC
Git commit b9d999e137f070577821c6a09b3978f3e095c77a by Thomas Baumgart, on behalf of Robert Szczesiak.
Committed on 08/05/2020 at 07:42.
Pushed by tbaumgart into branch '5.0'.

Fix Logarithmic vertical axis has multiple zero labels

Summary:
Vertical axis range is now cropped to the value of precision limit.
FIXED-IN: 5.0.9

Reviewers: tbaumgart

Reviewed By: tbaumgart

Tags: #kmymoney

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

(cherry picked from commit 462f3dcb13060011b993f88c3a44cd55f6d24bd1)

M  +49   -21   kmymoney/plugins/views/reports/core/kreportchartview.cpp
M  +3    -3    kmymoney/plugins/views/reports/core/kreportchartview.h

https://commits.kde.org/kmymoney/b9d999e137f070577821c6a09b3978f3e095c77a