Jump to content
Software FX Community

How do I change the Z-order of series in a Stacked Chart


Recommended Posts

I want to be able to change the Z order of my stacked area charts.

This code produces a stacked chart:


  Chart chart = new Chart { Gallery = Gallery.Area };   chart.AllSeries.StackedStyle = StackedStyle.Normal;   SeriesAttributes front = new SeriesAttributes { Content = "front", ItemsSource = new double[] { 1, 2, 1 } };   SeriesAttributes back = new SeriesAttributes { Content = "back", ItemsSource = new double[] { 2, -3, 2 } };   chart.Series.Add(front);   chart.Series.Add(back);...

How do I move the series labeled 'front" so that it's closer (higher z-order) to the user while maintaining the same placement (x, y values) for both series?


Link to comment
Share on other sites

Note that in an stacked area chart the series are drawn from bottom to top, i.e. the first series is draw first from 0 to the series values, then the second series is drawn from the previous series values.

We do not have an API that allows you to change this order (or the Z order if we were talking about a non-stacked) chart so you will have to change the order in which you add the series to the chart.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...