This is a migrated thread and some comments may be shown as answers.

optional zIndex of series doesn't appear to be working

5 Answers 52 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Clyde
Top achievements
Rank 1
Clyde asked on 20 May 2016, 12:43 PM
I noticed on http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart#configuration-series.zIndex that there is an optional attribute for changing the sort order of a multi series chart.  When I set the zIndex, however, it does not work.  The chart still renders the way it wants.  Is there a way to set the stack order of the series?  The data is completely dynamic and it doesn't make sense to hard code a solution when something more dynamic will do.  Please advise.

5 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 23 May 2016, 02:25 PM
Hi,

Can you please share a snippet, preferably in the dojo, that demonstrates the problem.

The snippet in the documentation seems okay in terms of zIndex.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Clyde
Top achievements
Rank 1
answered on 23 May 2016, 02:41 PM

Here is my series code:

```

series: [
    { color: "#00FFFF", data: [1, 2, 3, 4], name: "Item1", stack: true, type: "area", zIndex: 5 },
    { color: "#00FF00", data: [5, 6, 7, 8], name: "Item2", stack: true, type: "area", zIndex: 4 },
    { color: "#4169E1", data: [8, 7, 6, 5], name: "Item3", stack: true, type: "area", zIndex: 3 },
    { color: "#FF8C00", data: [4, 3, 2, 1], name: "Item4", stack: true, type: "area", zIndex: 1 },
    { color: "#808080", data: [5, 6, 7, 8], name: "Item5", stack: true, type: "area", zIndex: 2 },
  ]

```

 

0
T. Tsonev
Telerik team
answered on 25 May 2016, 11:32 AM
Hello,

I think I can see where the confusion is coming from.

Stacked series don't actually sit behind each other, they sit on top of each other. The zIndex makes no sense here, only the series order will be taken into account.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Clyde
Top achievements
Rank 1
answered on 25 May 2016, 11:34 AM
Is there anyway to accomplish what I need?  series 1 sits behind the stacked series 2 and series 3.  So series 1 is not stacked but series 2 and 3 are.
0
T. Tsonev
Telerik team
answered on 27 May 2016, 07:33 AM
Hello,

I assume this is the same issue as discussed in this forum thread. I'm afraid stack grouping is not supported for stacked area, this also excludes zIndex support.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Clyde
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Clyde
Top achievements
Rank 1
Share this question
or