case TIMESERIES_CHART:
dataset = new TimeSeriesDataset();
plot = new TimeSeriesPlot();
break;
case XYAREA_CHART:
dataset = new XYDataset();
plot = new AreaPlot();
break;
case XYBAR_CHART:
dataset = new XYDataset();
plot = new BarPlot();
break;
case XYLINE_CHART:
dataset = new XYDataset();
plot = new LinePlot();
break;
case SCATTER_CHART:
dataset = new XYDataset();
plot = new ScatterPlot();
break;
default:
throw new JRRuntimeException("Chart type not supported.");
}