Bug 64992

Summary: Error creating chart data when chart type is DOUGHNUT
Product: POI Reporter: fanjiajia <fanziang78>
Component: XDDFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 4.1.2-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   
Bug Depends on: 64950    
Bug Blocks:    

Description fanjiajia 2020-12-16 09:08:36 UTC
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.
Comment 1 PJ Fanning 2020-12-16 09:16:21 UTC
Duplicate of https://bz.apache.org/bugzilla/show_bug.cgi?id=64950

*** This bug has been marked as a duplicate of bug 64950 ***