private void generateSingleXSSFChart ( final XSSFChart chart , final String chartId , final XSSFSheet sheet , final Map < String , ClientAnchor > anchorMap , final Map < String , BufferedImage > chartMap , final Map < String , ChartData > chartDataMap ) { ClientAnchor anchor ; try { anchor = anchorMap . get ( chartId ) ; if ( anchor != null ) { ChartData chartData = ChartUtility . initChartDataFromXSSFChart ( chartId , chart , ( XSSFWorkbook ) parent . getWb ( ) ) ; chartDataMap . put ( chartId , chartData ) ; JFreeChart jchart = createChart ( chartData ) ; if ( jchart != null ) { AnchorSize anchorSize = PicturesUtility . getAnchorSize ( sheet , null , null , anchor ) ; BufferedImage img = jchart . createBufferedImage ( anchorSize . getWidth ( ) , anchorSize . getHeight ( ) ) ; chartMap . put ( chartId , img ) ; } } } catch ( Exception ex ) { LOG . log ( Level . SEVERE , "generate chart for " + chartId + " error = " + ex . getLocalizedMessage ( ) , ex ) ; } }
Generate single XSSF chart .