Bug 421105 - Logarithmic vertical axis has multiple zero labels
Summary: Logarithmic vertical axis has multiple zero labels
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: git (master)
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-06 11:56 UTC by Robert Szczesiak
Modified: 2020-06-05 04:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0


Attachments
The lowest three vertical axis labels have the same value of zero (75.57 KB, image/png)
2020-05-06 11:56 UTC, Robert Szczesiak
Details

Note You need to log in before you can comment on or make changes to this bug.
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