Stacked bar - Legend is in reverse order - Cells & java

For stacked bars, the legend order should be the same as the order of series , But right now it is coming in the reverse order when legend is positioned left.

Do we have option to set the legend order through code for stacked bars ? If yes can you share an example using Cells & java.

@mrajgopal.22,

Generally, the order of the legend entries is same as you add the data series based on your source range for the chart, so you should evaluate and fix it accordingly. If you still find any issue, kindly share your sample code (runnable) and sample files to show the issue, we will check it soon.

Thanks for replying. Is there any way we can set the legend order manually…?

@mrajgopal.22,

I do not think you can set legend entries order manually even in MS Excel either. You may move your data series of the chart accordingly (try using Series.move method).

Thanks for replying…!!

@mrajgopal.22,

You are welcome.