https://bugsfiles.kde.org/attachment.cgi?id=106647
The mentioned screenshot shows that point labels are formatted wrongly. For example the number is 18.000.000 and the label shows 1.80.
The problem is located inside class void KDChart::AbstractDiagram::Private methods void paintDataValueText( const AbstractDiagram* diag, QPainter* painter, const QModelIndex& index, const QPointF& pos, double value, bool justCalculateRect=false, QRectF* cumulatedBoundingRect=0 ) and QString roundValues( double value, const int decimalPos, const int decimalDigits) const; They simply use QString::number(value) with default conversation settings which are QString::number(value, 'g', 6). A number of 18000000 is returned as "1.80e+7". Also in KReportChartView::drawPivotChart() there is used dataValueAttr.setDecimalDigits(MyMoneyMoney::denomToPrec(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction())); which limits the number of digits to 2 which results into 1.80 for the mentioned value 18000000. Another example is 180.000 which is displayed also as 1.80. The fix is to refactor the mentioned methods.
Did you try master version? Can you attach .kmy file with your graph? I've worked in that area and would like it to look correct.
(In reply to NSLW from comment #3) > Did you try master version? no, cannot build master branch yet. > Can you attach .kmy file with your graph? see the attachments from bug 382378
No, it does not. For some reason the opening balance of the account is not accounted in master using the demo file from bug 382378. The format of the numbers shown seems to be OK though in master. The incorrect values is certainly something we need to fix in 5.0 (maybe even open a separate bug entry). For KDE4 I need to mention, that we do not fix stuff inside KDChart. This version was not maintained by KDE. This differs for KF5 and it could well be, that this has been fixed upstream (and that is why we see a different display in master). In case we cannot fix it using the API then it will stay the (broken) way it is.
For the record: In 4.8 branch kdchart has been updated from time to time to a more recent update: - 2012-02-18 Update our internal copy of KDChart to version 2.4.3. https://cgit.kde.org/kmymoney.git/commit/libkdchart?h=4.8&id=9ec18e4857d654b3dfdace09228cba6a5da8216f - 2011-05-24 Upgrade our copy of KDChart to version 2.4.1 https://cgit.kde.org/kmymoney.git/commit/libkdchart?h=4.8&id=89d7f29479db157f82bc2d0d558357efe58ec5a5 Unfortunally after 2012 this has not been continued and results in a very outdated version of kdchart compared to the recent version 2.6.0.
Created attachment 107041 [details] Net worth graphs from bug #382378 on master No problem here. Aren't the graphs look correct?
(In reply to NSLW from comment #7) > No problem here. Aren't the graphs look correct? This is because kmymoney from master branch uses KDChart version 2.6.0 which has this bug fixed. 4.8 branch uses KDChart version 2.4.3 which is broken in this area.
(In reply to Ralf Habacker from comment #8) > (In reply to NSLW from comment #7) > > No problem here. Aren't the graphs look correct? > > This is because kmymoney from master branch uses KDChart version 2.6.0 which > has this bug fixed. 4.8 branch uses KDChart version 2.4.3 which is broken in > this area. Then I would suggest either fix it or mark as resolved-wontfix, so that this bug doesn't pollute bug list.
(In reply to NSLW from comment #9) > (In reply to Ralf Habacker from comment #8) > > (In reply to NSLW from comment #7) > > > No problem here. Aren't the graphs look correct? > > > > This is because kmymoney from master branch uses KDChart version 2.6.0 which > > has this bug fixed. 4.8 branch uses KDChart version 2.4.3 which is broken in > > this area. > > Then I would suggest either fix it I'm mostly ready with this - see at https://github.com/rhabacker/kmymoney/commits/4.8-kdchart-2.6. Should I open a review request for this or simply merge into 4.8 ?
(In reply to Ralf Habacker from comment #10) > (In reply to NSLW from comment #9) > > (In reply to Ralf Habacker from comment #8) > > > (In reply to NSLW from comment #7) > > > > No problem here. Aren't the graphs look correct? > > > > > > This is because kmymoney from master branch uses KDChart version 2.6.0 which > > > has this bug fixed. 4.8 branch uses KDChart version 2.4.3 which is broken in > > > this area. > > > > Then I would suggest either fix it > > I'm mostly ready with this - see at > https://github.com/rhabacker/kmymoney/commits/4.8-kdchart-2.6. > Should I open a review request for this or simply merge into 4.8 ? Maybe Thomas would like to review this, but if you just removed old one version and pasted new one version and it works for you, then I think there is nothing to review.
(In reply to NSLW from comment #11) > (In reply to Ralf Habacker from comment #10) > > (In reply to NSLW from comment #9) > > > (In reply to Ralf Habacker from comment #8) > > > > (In reply to NSLW from comment #7) > > > > > No problem here. Aren't the graphs look correct? > > > > > > > > This is because kmymoney from master branch uses KDChart version 2.6.0 which > > > > has this bug fixed. 4.8 branch uses KDChart version 2.4.3 which is broken in > > > > this area. > > > > > > Then I would suggest either fix it > > > > I'm mostly ready with this - see at > > https://github.com/rhabacker/kmymoney/commits/4.8-kdchart-2.6. > > Should I open a review request for this or simply merge into 4.8 ? > > Maybe Thomas would like to review this, but if you just removed old one > version and pasted new one version yes > and it works for you, then I think there is nothing to review. I did not changed any major things. From the git log mentioned above you can see that there is one commit with the update, two commits with fixed bugs I was faced on testing (may be useful for master too) and one commit which adds a simple chart test dialog, which makes it easier to debug chart issues in future. Talking about the bugs I guess it would be better to open separate bug reports for it to be able to have it public. Also I will merge the two remaining commits - the update and the test dialog into one commit to solve this bug.
Git commit cb841612e11349aca26b6c4af4ff7dced9a95357 by Ralf Habacker. Committed on 05/08/2017 at 08:35. Pushed by habacker into branch '4.8'. Update to KDChart 2.6 Also add test report chart. FIXED-IN:4.8.1 https://commits.kde.org/kmymoney/cb841612e11349aca26b6c4af4ff7dced9a95357
Git commit 51529f756008f2c879a92b0b3fef72a716e51e2b by Ralf Habacker. Committed on 05/08/2017 at 08:44. Pushed by habacker into branch '4.8'. Add missing copyright header bugzilla complaints about this. M +16 -0 kmymoney/reports/reportcharttest.cpp https://commits.kde.org/kmymoney/51529f756008f2c879a92b0b3fef72a716e51e2b
*** Bug 383110 has been marked as a duplicate of this bug. ***