public Chart createChart(XSSFWorkbook workbook, XSSFChart xc) { this.cellNames.clear(); CTChart ctChart = xc.getCTChart(); if (ctChart == null) { return null; } CTPlotArea plotArea = ctChart.getPlotArea(); if (plotArea == null) { return null; } if (plotArea.sizeOfPieChartArray() > 0) { return createPieChart(workbook, ctChart, plotArea.getPieChartArray(0)); } if (plotArea.sizeOfBarChartArray() > 0) { return createBarChart(workbook, ctChart, plotArea.getBarChartArray(0)); } if (plotArea.sizeOfLineChartArray() > 0) { return createLineChart(workbook, ctChart, plotArea.getLineChartArray(0)); } if (plotArea.sizeOfRadarChartArray() > 0) { return createRadarChart(workbook, ctChart, plotArea.getRadarChartArray(0)); } if (plotArea.sizeOfBubbleChartArray() > 0) { return createBubbleChart(workbook, ctChart, plotArea.getBubbleChartArray(0)); } return null; }
public Chart createChart(XSSFWorkbook workbook, XSSFChart chart);