Hi There,
Im using ASPOSE SLIDES 15.8.0 for Java. Im trying to merge data in existing charts in a template presentation, however to do this i need to be able to tell what the type of chart is that I have. Looking at the example snippet, you see im able to get the chart, but invoking the getType method always gives me 0, while the example template I attached clearly has a barchart in there (see attached image also.
The question obviously is, how do I retrieve the correct information, otherwise Im unable to call the correct methods upon the datapoints.
Example snippet:
//get and open the template file
Presentation pres = getNewPresentation();
ISlideCollection presslds = pres.getSlides();
for(int i=0; i<presslds.size(); i++){
ISlide slide = presslds.get_Item(i);
IShapeCollection shapes = slide.getShapes();
for (int s=0; s < shapes.size(); s++){
IShape shp = shapes.get_Item(s);
if (shp instanceof IChart){
IChart chart = (IChart)shp;
//Would expect the next line to print the Charttype number as in the ChartType class, but it is always 0.
System.out.println( chart.getType() );
}
}
}