Charttype.highlowclose doesn’t know which method to use to add a series;Can you provide an example;
Version information is aspose. Slides - 16.4.0. jar; jdk1.8
The following code is incorrect:
Exception in thread “main” class com.aspose.slides.ms.pbdb106a0.co
: Parent series is not Column or Bar series.
com.aspose.slides.ChartDataPointCollection.addDataPointForBarSeries(Unknown Source)
Presentation pres = new Presentation();
ISlide sld = (ISlide) pres.getSlides().get_Item(0);
IChart chart = sld.getShapes().addChart(ChartType.HighLowClose, 50, 30, 550, 450);
chart.getChartData().getSeries().clear();
chart.getChartData().getCategories().clear();
int defaultWorksheetIndex = 0;
IChartDataWorkbook fact = chart.getChartData().getChartDataWorkbook();
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 1, 0, “C01”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 2, 0, “C02”));
chart.getChartData().getCategories().add(fact.getCell(defaultWorksheetIndex, 3, 0, “C03”));
IChartSeries series = null;
series = chart.getChartData().getSeries().add(fact.getCell(defaultWorksheetIndex, 0, 1, “s1”), chart.getType());
series.getDataPoints().addDataPointForBarSeries(fact.getCell(defaultWorksheetIndex, 1, 1, 20));
series.getDataPoints().addDataPointForBarSeries(fact.getCell(defaultWorksheetIndex, 2, 1, 50));
series.getDataPoints().addDataPointForBarSeries(fact.getCell(defaultWorksheetIndex, 3, 1, 30));
pres.save(Consts.path + “highLowClose.pptx”, SaveFormat.Pptx);