We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Chart series order bug

Hi,

OpenXml document states that the order element (its qualified name is c:order) specifies the order of the series in the collection

https://msdn.microsoft.com/en-us/library/documentformat.openxml.drawing.charts.order(v=office.14).aspx

As shown on screen shot in attachment order of series is the following:

1. red
2. green
3. blue

The order property of the series has correct value in chart1.xml file of series_order_bug.xlsx document:

blue
...

red
...

green
...



In Aspose.Cells version 8.3.2 series in SeriesCollection are ordered by the order property value and we used the following code:

import com.aspose.cells.Chart;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import org.junit.Test;

public class TestChart {

@Test
public void testChartSeriesOrder() throws Exception {
Workbook workbook = new Workbook("C:\\temp\\series_order_bug.xlsx");
Worksheet sheet = workbook.getWorksheets().get(0);
Chart chart = sheet.getCharts().get(0);

for (int i = 0; i < chart.getNSeries().getCount(); i++) {
System.out.println(chart.getNSeries().get(i).getDisplayName());
}
}
}

Output looked as follows:

red
green
blue

However in version 8.6.2 output has wrong order and looks as follows:

blue
red
green

Could you scrutinize the issue and fix this bug?

Thanks.

Hi Anvar,


Thank you for providing the detailed problem description and sample.

We have evaluated the presented scenario while using the latest revision of Aspose.Cells for Java 8.6.3.4, and we are able to notice the said issue. In order to further investigate the matter, we have logged this incident as CELLSJAVA-41690. Please spare us little time to thoroughly analyze this case, and get back to you with updates in this regard.
Hi,

Could you estimate time frame to resolve this issue?

Thanks.

Hi Anvar,


Please note, we have logged the incident about 18 hours ago, and it is currently pending for analysis. Unless we have thoroughly investigated the scenario, we will not be able to share any updates or estimated time frame for the fix. That said, I have requested the concerned member of the product team to schedule the case for analysis. As soon as any updates in this regard, we will post here for your kind reference.

Hi,

Thanks for using Aspose.Cells.

Please use getSeriesByorder(i) method to get series by the order property value. By default, series in SeriesCollection are ordered by the order in the file chart1.xml.

Java

for (int i = 0; i < chart.getNSeries().getCount(); i++) {
System.out.println(chart.getNSeries().getSeriesByOrder(i).getDisplayName());
}