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

Free Support Forum - aspose.com

How to get all the chart type from chart that contain more than one type


Im have a chart with multiple chart type (see attach file)
when trying to get the chart type im getting only the first type (in my case out of 3 types)
im using this code
ChartCollection chartCollection = worksheet.Charts;
int count = chartCollection.Count; //return 1 chart
var type = chart.Type; //return only one type while the chart have 3 type

how do i get all the type of the chart?
Thanks for the help


I think you may try the following code, see the sample code for your reference:

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook(“e:\test2\beta.xlsx”);
Worksheet worksheet = book.Worksheets[va”];
ChartCollection chartCollection = worksheet.Charts;
Chart chart = chartCollection[0];
SeriesCollection nseries = chart.NSeries;
for (int i = 0; i < nseries.Count; i++)
Console.WriteLine("Series: " + nseries[i].Name + ", Type: "+ nseries[i].Type.ToString());