Stacked Column chart reverse plot order

Hi Team,
I’m attaching the stacked column chart file here. I want the series of stacked chart should be plotted in a reverse order.
For Ex.
In the given chart P1 is at the bottom and then It’s P2 and then at the top we have P3.
Instead I want P1 should be at the top and P3 and the bottom touching the X-axis line. Condition is X axis position should not change. It should be always at the bottom.
Is there any config available in MS or ASPOSE which will reverse the series elements from the stacked charts without changing the position of X-axis.
We already tried the value in reverse order option from Excel but also change the position of X-axis.
StackedChart.zip (11.2 KB)

@VaradS
Please try the following codes:

 Workbook workbook = new Workbook(download + "StackedChart.xlsx");
 Chart chart = workbook.Worksheets[0].Charts[0];
 chart.NSeries.SwapSeries(0, 2);
 workbook.Save(download + "dest.xlsx");

In Excel, Right click chart, “select data”, select one series, you will move up and down button will be enabled.

@simon.zhao ,
We get n number of series for each category it may vary as well. Do we have an efficient way to achieve this using and flag or method in aspose? For example to revert the Y axis values we can do axis.setPlotOrderReversed(true) but this also changes the position of X axis from bottom to top. We don’t want to change the X-axis position.

@VaradS
Please try the following codes:

 Workbook workbook = new Workbook(download + "StackedChart.xlsx");
 Chart chart = workbook.Worksheets[0].Charts[0];
// chart.NSeries.SwapSeries(0, 2);
chart.ValueAxis.IsPlotOrderReversed = true;
 chart.ValueAxis.CrossType = CrossType.Maximum;
 workbook.Save(download + "dest.xlsx");

This code change is still changing the position on X-axis. And shifting it at the top. Let me know is there a config to do not change the Xasxis position.

@VaradS

Thank you for the follow-up and for clarifying the requirement regarding the X-axis position.

We understand that you need to reverse the plot order of the stacked column chart series without the X-axis shifting from the bottom to the top of the plot area. We have updated the existing investigation with these specific details to ensure the development team addresses the axis positioning behavior.

The issue is currently being investigated by our internal team. We will look into whether this can be achieved via a specific configuration or if a fix is required to decouple the plot order from the axis crossing point.

We will notify you here as soon as there are any updates or if a fix is available in a future release.

Please check the generated file
dest.zip (11.5 KB)

Could you create a template file with your excepted chart in MS Excel, then share it here . We will check it soon.