This issue affects stacked charts. If all the values for a series are blank the initial chart view is wrong. In this example the bars should be reaching 100%.
public static void main(String[] args) throws Exception {
final Presentation pres = new Presentation();
final IChart c = pres.getSlides()
.get_Item(0)
.getShapes()
.addChart(
ChartType.PercentsStackedBar,
0, 0, 720, 540);
final IChartData data = c.getChartData();
final IChartDataWorkbook wb = data.getChartDataWorkbook();
final int seriesIndex =
data.getSeries().size()-1;
final IChartSeries series =
data.getSeries().get_Item(
seriesIndex);
for(int i = 0; i < series.getDataPoints().size(); i++) {
wb.getCell(0, i+1, seriesIndex+1).setValue(null);
}
pres.save(“D:/test.pptx”, SaveFormat.Pptx);
Desktop.getDesktop().open(new File(“D:/test.pptx”));
}
The view is corrected if you enter the data and then exit again without making changes.
Output attached.