java create a chart in a powerpoint using APACHE POI

Viewed 6156

How do we create a chart in a ppt in java using apache poi. Which POI API do we use. Below is code I am using to create a text box

XSLFSlide slide = pptx.createSlide();
XSLFTextShape textShape = slide.createTextBox();
textShape.setText(data);

The slide object doesnt contain any api for creating a chart.

Any solution to this?

Thanks in advance

2 Answers

What about the org.apache.poi.xslf.usermodel.XSLFChart Object ? I am unable to find a direct createChart method in this Object.

But I am sure there must be something with this Object. Not much content available on stackoverflow on this.

Has anyone created a chart using org.apache.poi.xslf.usermodel.XSLFChart in a pptx ? Grateful for the response.

Related