-
14 Aug 2012 5:23 PM #1
Bar Series is covered by Area Series
Bar Series is covered by Area Series
For some reason no matter what, bar series is behind area series.
chart.addSeries(area);
chart.addSeries(bar);
Bar should be over area, but it's not. Only happens to the bar series. I tried scatter and line, they are just fine.
Also if I do
chart.addSeries(area);
chart.addSeries(line);
chart.addSeries(bar);
everything works fine I have bar on top of line and line on top of area.
but when it's just area and bar series, area always ends up on top for some reason
Any ideas?
-
20 Aug 2012 9:50 AM #2
Thanks for the report. Until this is fixed you can use this workaround:
Code:barSeries.setRenderer(new SeriesRenderer<Data>() { @Override public void spriteRenderer(Sprite sprite, int index, ListStore<Data> store) { sprite.setOpacity(0.93); sprite.redraw(); } });
-
29 Aug 2012 1:51 PM #3
Giving this a second look it would appear the trouble line (assuming you are using the area example almost exactly) is: highlightLine.setZIndex(1000);
Since SVG does not support z-index the sprites are actually sorted using a binary search causing the sprites to not maintain their original ordering from when they were added.
So the current solution is to either not use setZIndex at all in your chart or to specify the z index of all sprites in which you care about the order.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote