This example creates a chart first, and then changes the chart to be plotted by rows.
Range range = sheet.range("A1:E6"); chartObject = sheet.getChartObjects().add("TotalReport",6000,8000,8000,6000); chartObject.getChart().chartWizard(range,Constant.SYMPHONY_CHART_PIEDIAGRAM,Constant.SYMPHONY_CHART_PLOTBY_COLUMNS,"total",false); range = sheet.range("C2:D5"); chartObject.getChart().setPlotBy(Constant.SYMPHONY_CHART_PLOTBY_ROWS);
Related information