NikhithaTarala / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

FlleBelowLine obstructs other datasets drawn if used in the most comon case #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The FillBelowLine option is commonly used to show the total of invididual 
"Part" lines in a Line Chart.  The "Total" is usually the most important piece 
of information in the chart.  

The problem is that if I want the line section of the Total to have priority of 
over the Parts, I would need to add the Total dataset last, but this causes the 
fill-below section to obstruct the Parts.   If I add the Total first, the Part 
lines can obstruct the Total line, which is also not desirable.

The deseired drawing order is:

1) Total FillBelow area
2) Parts line(s)
3) Total line

I know I can probaby work around this right now by adding the fill-below 
section last as a seperate dataset, but since the current behavior is probably 
never the right one, I am adding this ticket.

Original issue reported on code.google.com by zvasv...@gmail.com on 11 Jan 2012 at 7:29

GoogleCodeExporter commented 9 years ago
Here's a screenshot where the "Part" lines obstruct the "Total" line, giving an 
ugly chart.

Original comment by zvasv...@gmail.com on 11 Jan 2012 at 7:36

Attachments:

GoogleCodeExporter commented 9 years ago
Datasets are drawn in the provided order. The order is application specific.
I am not going to modify this as this would annoy other users.

Original comment by dandrome...@gmail.com on 11 Jan 2012 at 4:32

GoogleCodeExporter commented 9 years ago
Well, I tried my work around (2 datasets) and, unfortunately, it's 
unsatisfactory.  The problem lies in the fact that the legends are not correct. 
 I want the Total (as it's the most important) legend item to appear first on 
the legend section.  But if I add the Fill dataset first, the Legend shows up 
with the color of the Fill, which is wrong.  Since I need to add the Total line 
last to appear on top, its legend will appear last.

So unless there is a way to reorder the legends, or change their colors, I 
don't see a way to fix this issue with any available workarounds.  

I think this is a fairly serious issue for me (see my screenshot).  There is 
surely a way to extend the API so that this can be fixed without breaking 
existing apps, which, I agree with you, is not an option.

If you want me to, I can think about this one and come up with a patch.

Original comment by zvasv...@gmail.com on 12 Jan 2012 at 1:13

GoogleCodeExporter commented 9 years ago
Sounds like a good plan.
Ideas and patches are always welcome.

Original comment by dandrome...@gmail.com on 12 Jan 2012 at 1:29