The following code in XDDFChart.createData: if (ChartTypes.PIE != type && ChartTypes.PIE3D != type) { categories = Collections.singletonMap(category.getId(), category); mapValues = Collections.singletonMap(values.getId(), values); } It will make error when ChartTypes is DOUGHNUT because axes area needed here.But if I do this,the docx file will not be opened. The right condition is: ChartTypes.PIE != type && ChartTypes.PIE3D != type && ChartTypes.DOUGHNUT !=null Now I solve the problem by deleting all the axes after creating chart.
Duplicate of https://bz.apache.org/bugzilla/show_bug.cgi?id=64950 *** This bug has been marked as a duplicate of bug 64950 ***