Free Support Forum - aspose.com

Legend Entries Order To Be Reversed

Hi Team,

I’m adding two series to the “STACKED COLUMN” chart.

Let the series names be FirstSeries and SecondSeries.

After generating report I can see FirstSeries and SecondSeries names as Legend Entries.

But I have a scenario where I need to show SecondSeries and FirstSeries names as Legend Entries without changing the plotting of values.

Is there any way that I can implement this requirement…?

By the way I tested with both aspose-cells-8.3.1 and aspose-cells-8.5.2 jars but still I have this issue.

Thanks in advance!!!

Regards,
Sanjeev

Hi,


Thanks for providing some details.

I am not entirely certain about your requirement. But if you could do it in MS Excel manually, you should be able to accomplish the task via Aspose.Cells APIs. Could you provide us simple JAVA program (runnable) and attach any template file (if you are using) to evaluate your issue on our end. Also attach your output Excel file containing the chart by Aspose.Cells APIs and an expected file which should contain your desired chart. You may create your desired chart in Ms Excel manually. We will check how to do it (to create the chart as per your expected chart) via Aspose.Cells APIs soon.

Thank you.

Hi Amjad Sahi,

Thanks for the suggestion.
I’m attaching the sample excel report that is being generated.
If you see in this report for the STACKED COLUMN chart I added two series:
1. First Series (Blue color)
2. Second Series (Orange color)
In the legend if you see the order of legend is First Series and Second Series.

I want this order to be reversed i.e., Second Series and First Series without changing the series order.
Only legend entries should be changed but not the series order for the chart.

Hope this information will be helpful for you to proceed further.

Thanks in advance!

Regards,
Sanjeev



Hi,


Thanks for the template file.

Well, I actually requested your desired file that you could make in Ms Excel but you provided simple output file (by Aspose.Cells APIs or Ms Excel) and provided details about what you want to achieve. As you do not want to change the source series order or their respective data to be plotted, so I am not sure if this is possible in Ms Excel either. I tried to accomplish the task in Ms Excel manually a bit but I could not get it right. So, I think this is not possible in Ms Excel. If you still think this is possible, kindly create your desired chart in Ms Excel manually (without changing the source series order or their respective data to be plotted), save the file and provide us here with all the details and screen shots (on how to do it in Ms Excel), we will check how to do it (to create the chart as per your expected chart) via Aspose.Cells APIs soon.

Thank you.