Example: ChartType property

This example creates a chart first, and then changes the source range and chart type of the chart.

  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().setSourceData(range);
  chartObject.getChart().setChartType(Constant.SYMPHONY_CHART_XYDIAGRAM);

Related information

ChartType property