Bug 464949 - Data in forecast chart disappears based on resolution (ticks) of the date range
Summary: Data in forecast chart disappears based on resolution (ticks) of the date range
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-28 15:51 UTC by lp.allard.1
Modified: 2023-01-29 22:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example of the bug on chequing account charts (226.92 KB, image/png)
2023-01-28 15:51 UTC, lp.allard.1
Details
Forecast charts differ by ticks appears to change data (536.28 KB, application/pdf)
2023-01-29 22:34 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lp.allard.1 2023-01-28 15:51:29 UTC
Created attachment 155736 [details]
Example of the bug on chequing account charts

SUMMARY
When creating a forecast chart of a chequing account for the next 18 months, some data seems to disappear depending on the resolution (tick) of the date range.

See attached screenshot.  The date range is kept identical only the "ticks" is changed between daily & weekly...  I understand the "shape" of the chart changes because KMM calculates the forecast balance on a weekly basis instead of daily basis but the fact that the balance randomly becomes "zero" for a certain date range doesnt make sense...  On the attached screenshot, the balance is set to zero from the opening to the month of July...
 
STEPS TO REPRODUCE
1. Create a forecast chart
2. Set ticks to something
3. Change ticks to something else

OBSERVED RESULT
Data will disappear from the chart

EXPECTED RESULT
Only the shape of the chart should change to fit with balances calculated based on the selected "ticks" value...

SOFTWARE/OS VERSIONS
kmymoney-5.1-360-linux-gcc-x86_64.AppImage
KDE Frameworks Version 5.101.0
Qt Version 5.15.8 (built against 5.15.7)
Comment 1 Jack 2023-01-29 22:34:38 UTC
Created attachment 155772 [details]
Forecast charts differ by ticks appears to change data

I've attached a two page PDF, from 5.1.3-caa1baff4 (appimage) and master, based on Forecast next Quarter) from 1/1/2022 to 6/30/2024, showing only one active credit card account.  Oddly, creating the report in master with Daily ticks works, but after that, I could not select daily or weekly.  5.1.3 allowed all tick variants.  In addition, note that all values with daily ticks shows $0 from just after "Opening" to about now; weekly shows all values except opening as $0; monthly returns future values; and bi-monthly shows all as $0 except for opening and one year from now.
I suspect only looking at the code will tell where the collapsing to per-tick time periods happens.  I can imagine that collapsing past data before forecasting might account for this behavior, but I don't see how the daily ticks could zero out the past year's data in this account.