Bug 256927 - Missing axis lines charts - no support to show only the axis in KDChart
Summary: Missing axis lines charts - no support to show only the axis in KDChart
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.5
Platform: MacPorts macOS
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-14 21:21 UTC by Marko Käning
Modified: 2011-05-29 17:09 UTC (History)
2 users (show)

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


Attachments
Balance Chart (42.14 KB, image/png)
2010-11-14 21:21 UTC, Marko Käning
Details
A little off original topic, but it would be nicer to have the header image aligned to view selection pane on the left (13.65 KB, application/octet-stream)
2010-11-20 16:10 UTC, Marko Käning
Details
This is a comparison for the output of KMM2 and current KMM4. (496.30 KB, image/jpeg)
2011-05-29 15:27 UTC, Marko Käning
Details
Test file for illustration of sub-optimal balance chart (5.36 KB, application/octet-stream)
2011-05-29 15:28 UTC, Marko Käning
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Käning 2010-11-14 21:21:20 UTC
Created attachment 53418 [details]
Balance Chart

Version:           4.5 (using KDE 4.5.3) 
OS:                OS X

The balance chart which can be called from ledger view for a specific account doesn't display the axis lines.

Also the selected colours for past and future balance are hardly distinguishable at least for people with red/green deficiency like me. :-) It would be great, if the user had influence about the colour settings.

See attached png!

Reproducible: Always
Comment 1 Marko Käning 2010-11-20 16:04:11 UTC
Axises are also missing in Net Worth Forecast graph on homepage.
Comment 2 Marko Käning 2010-11-20 16:10:17 UTC
Created attachment 53580 [details]
A little off original topic, but it would be nicer to have the header image aligned to view selection pane on the left

Top alignment of left pane's and header image's border would give a better layout.
Comment 3 TonyIT 2010-11-20 19:44:53 UTC
More.
I have a chart with three items and their colors is yellow, red and orange. But because their shades, they are almost indistinguishable.
It would be nice to have a colour picker for this.

Thanks.
Comment 4 Cristian Oneț 2011-05-14 16:40:13 UTC
This should be fixed by this revision http://websvn.kde.org/?revision=1231890&view=revision

The axis are there AFAICS. I you refer to the line that goes trough the ticks then AFAIK that is only available if the grid is shown and the grid is hidden in this chart to make the warning values more visible.
Comment 5 Cristian Oneț 2011-05-14 16:41:16 UTC
(In reply to comment #4)
> This should be fixed by this revision
> http://websvn.kde.org/?revision=1231890&view=revision

The above 'This' stands for the color configuration part of the bug.
Comment 6 Marko Käning 2011-05-18 22:59:23 UTC
Hi Christian,

I am back online eventually. Latest SVN version of KMM is still building here on my machine...

I guess I'd very likely have to reopen this bug. But I don't know how to achieve it.

Please look at the attached png "Balance Chart" at the bottom of this page! That pic demonstrates my problem. It's the axis lines itself. In that pic you see that you cannot even see the x-axis which should be horizontally somewhere in the middle of the graph slightly below the horizontal limit line.

Also the y-axis is absent.

(I still have to verify how my OpenSUSE behaves there...)

Greets,
Marko
Comment 7 Marko Käning 2011-05-19 00:51:18 UTC
I just verified with the latest SVN version 1232629 that the axis lines are missing.

If I - as you said - switch on the grid, I do see also the x-axis at y=0.

Is this wanted behavior? It looks like one should show the axis also when the grid is switched off, don't you think?

---

I tested this also in a virtual OpenSUSE 11.2 (on Parallels) which produces the same thing: no axes unless I enable the chart grid.

---

So it looks like this odd display is actually not a quirck which only I see on my machines, but works as implemented...

===>>> I'd love to have no grid, but still axis lines for time and amount.
Comment 8 Cristian Oneț 2011-05-19 07:08:17 UTC
That's what I have said in my closing comment there is no line for axis AFAIK for *all* charts. I'll leave this bug open until I make sure that this is actually true.
Comment 9 Marko Käning 2011-05-19 08:41:07 UTC
Well, that there is no line for all charts is different to KMyMoney 1.0.x!

In the old days when the grid was off there WERE the axes, which makes perfect sence IMHO.

:-)
Comment 10 Cristian Oneț 2011-05-19 08:59:12 UTC
Version 1.x uses an older version of libkdchart. Since in the never version the zero lines are part of the grid I have to check if it's possible to always display only the zero lines and display the rest of the grid depending on the report's 'Show grid' setting.
Comment 11 Marko Käning 2011-05-19 09:03:25 UTC
I guess you can see my point now, since I've never seen a graph without axes anywhere (and just ticks in free space). :-)

(Too bad I had misunderstood all the time that everyone seems to see the axes, but in reality everyone had the grid enabled...)
Comment 12 Cristian Oneț 2011-05-20 10:30:29 UTC
After going trough the KDChart axes drawing code it is clear that only the ticks are drawn by the new version of KDChart. The axes lines are drawn by the grid (if it's visible). Since we don't want to change KDChart code except fixing crashes. I'll mark this bug as upstream.
Comment 13 Marko Käning 2011-05-21 00:54:50 UTC
I didn't know that KDChart isn't KMM's code. From that point of view I understand that you are reluctant to change it.

Still, I come back to what I've stated before:

1) KMM 4.5.x works different in this respect to KMM 1.0.x which always showed all axes even with the grid switched off.

2) Omitting axes lines makes graphs near the zero line looking pretty useless if the grid isn't switched on.

3) Graphs on homepage as well as balance chart in ledger view also don't show the axes.

I repeat it again: Graphs with just ticks and without axes are of no great sense.

Sorry repeating myself all the time, but... :-)

BTW, what does UPSTREAM mean, who maintains the KDChart code?
Comment 14 Alvaro Soliverez 2011-05-21 05:38:49 UTC
1) KMM 4.5.x works different in this respect to KMM 1.0.x which always showed
all axes even with the grid switched off.

KDChart migrated to KDE4 too. It's not the same version used in KMM 1.0.x

2) Omitting axes lines makes graphs near the zero line looking pretty useless
if the grid isn't switched on.

Yes, we'll have to figure out a default setting that always shows the axis.
If we have to show the grid too to make that happen, then that's the way it will stay.

Upstream in this case is KDAB. They are the developers of KDChart.
Comment 15 Marko Käning 2011-05-21 10:37:46 UTC
Thanks for the info Alvaro! :-)

So, I'll just keep silent until you guys come up with a new KMM1-like default setting. I am again sorry, Christian, for appearing so pressing, but I am working with non-financial graphs every single day and I never miss to add an axis. ;-) That's why I simply can't take free floating ticks in open space, a non-existing x-axis at y=0 and stuff like that.
I also don't like the looks of the graph when it is covering a longer period in time and you switch on the grid. The grid tick width should adapt to the time span as well as the value tick width should. That's another thing to improve. But I'll perhaps post a separate bug report for it as feature request. :-)
Comment 16 Cristian Oneț 2011-05-21 10:42:46 UTC
The I'll leave it as a wish but I don't know who will dig into KDChart code to change this.
Comment 17 Marko Käning 2011-05-21 10:45:59 UTC
I guess in that case one would have to contact the KDAB guys and ask for their help.
Comment 18 Cristian Oneț 2011-05-24 19:23:41 UTC
SVN commit 1233449 by conet:

BUG: 256927
Always draw the chart axes, thanks to KDAB for the patch.

 M  +2 -0      kmymoney/reports/kreportchartview.cpp  
 M  +32 -0     libkdchart/src/KDChartCartesianAxis.cpp  
 M  +14 -0     libkdchart/src/KDChartRulerAttributes.cpp  
 M  +7 -0      libkdchart/src/KDChartRulerAttributes.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1233449
Comment 19 Marko Käning 2011-05-24 23:10:11 UTC
Verified that it now does work as expected.
Great, Cristian! :-)
Thanks for taking care of this one!!!
Greets,
Marko

P.S.: There is still no line at Y=0, which would help to guide the eye with respect to the zero level, but ok, it's much better than it was before.
Comment 20 Cristian Oneț 2011-05-25 10:10:54 UTC
(In reply to comment #19)
> P.S.: There is still no line at Y=0, which would help to guide the eye with
> respect to the zero level, but ok, it's much better than it was before.

For that one can use the grid and we can draw it with a a special color.
Comment 21 Marko Käning 2011-05-25 20:26:15 UTC
Still, I think the zero-line belongs into this graph even without the grid. :-)
No, I don't want to pester you, Cristian. :-)
I believe this is a necessity for any graph whether in science or in finance, it doesn't matter a bit.
---

Actually the zero-line is in the grid already in a different colour and well visible as of now. :-)

Thanks for all you efforts on this one.
Comment 22 Marko Käning 2011-05-29 15:27:49 UTC
Created attachment 60436 [details]
This is a comparison for the output of KMM2 and current KMM4.

Here you can see that in KMM4

* the axis labels are rendered much smaller (close to invisible)

* the Y=0-line (if there are negative values not identical with x-axis) is NOT drawn

* the nice gray lines for the current day position in time and amount are not there anymore

* start and stop values for amount axis is cropped instead of giving it like in KMM2 a little offset for better visibility

* the color selection with these almost undistinguishable colors is a little strange (would be nice to be able to let the user select the colors)

I'll attach the kmy file used for this test in a next step.
Comment 23 Marko Käning 2011-05-29 15:28:41 UTC
Created attachment 60437 [details]
Test file for illustration of sub-optimal balance chart
Comment 24 Cristian Oneț 2011-05-29 15:37:13 UTC
SVN commit 1234119 by conet:

BUG: 256927
Draw the y=0 line in the balance chart.


 M  +3 -0      kbalancechartdlg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1234119
Comment 25 Cristian Oneț 2011-05-29 15:38:38 UTC
(In reply to comment #22)
> * the color selection with these almost undistinguishable colors is a little
> strange (would be nice to be able to let the user select the colors)

Please checkout the 'Chart palette' setting in Settings->Reports to find a palette that suits you better.
Comment 26 Cristian Oneț 2011-05-29 15:40:06 UTC
(In reply to comment #22)
> * the axis labels are rendered much smaller (close to invisible)

You know, you can always make the windows larger to make the labels more readable. AFAICS you have enough screen real estate :).
Comment 27 Marko Käning 2011-05-29 15:46:31 UTC
Cool, I didn't know about the chart palette settings.

What concerns the screen size I do believe it should be preferred to get a chart with readable labels RIGHT FROM THE START. Every time I open the balance chart it's small again and I'd always have to pull it to unbelievable dimensions to be able to read the labels... :-)
Well, KMM2 back then was smart enough to get the job done. ;-)
Comment 28 Alvaro Soliverez 2011-05-29 16:04:58 UTC
Well, it's not Kansas anymore. It's a different KMyMoney and a whole different KDChart.

The size of the labels, title and legend are set relative to the normal size. It looks like you have a very small normal size.
Comment 29 Cristian Oneț 2011-05-29 17:09:31 UTC
SVN commit 1234125 by conet:

BUG: 256927
Make the balance chart dialog's size persistent but not smaller then 700x500 (the value used until now).


 M  +13 -1     kbalancechartdlg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1234125