Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    3
    Vote Rating
    0
    vadimmaximov is on a distinguished road

      0  

    Default 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?

  2. #2
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    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();
          }
        });

  3. #3
    Sencha - GXT Dev Team BrendanC's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Vote Rating
    3
    BrendanC is on a distinguished road

      0  

    Default


    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.

Thread Participants: 1