I tried to add a chart to a docx but I cannot see the chart object when I check the document.xml file. The chart object is not displayed on the docx also. this is my code
public static void main(String args) throws InvalidFormatException, FileNotFoundException {
System.out.println( "Creating package..");
inputfilepath = System.getProperty("user.dir") + "\\CreateWord3.docx";
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
wordMLPackage.getMainDocumentPart()
.addStyledParagraphOfText("Title", "Hello world");
wordMLPackage.getMainDocumentPart().addParagraphOfText("Adding a Chart - using docx4j!");
org.docx4j.wml.ObjectFactory factory = new org.docx4j.wml.ObjectFactory();
org.docx4j.wml.P p = ...