{
final CategoryAxis catAxis = new CategoryAxis("Category");// NON-NLS
final NumberAxis barsAxis = new NumberAxis("Value");// NON-NLS
final NumberAxis linesAxis = new NumberAxis("Value2");// NON-NLS
final CategoryPlot plot = new CategoryPlot(createDataset(), catAxis, barsAxis, new BarRenderer());
plot.setRenderer(1, new LineAndShapeRenderer());
// add lines dataset and axis to plot
plot.setDataset(1, createDataset());
plot.setRangeAxis(1, linesAxis);
// map lines to second axis
plot.mapDatasetToRangeAxis(1, 1);
// set rendering order
plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
// set location of second axis
plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);
return new JFreeChart("Bar Line Chart", plot);
}
if (aExpression instanceof RingChartExpression)
{
return ChartFactory.createRingChart("Ring Chart", createPieDataset(), true, false, false);// NON-NLS
}
if (aExpression instanceof AreaChartExpression)
{
return ChartFactory.createAreaChart("Area Chart", "Category", "Value", createDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof BarChartExpression)
{
return ChartFactory.createBarChart("Bar Chart", "Category", "Value", createDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof LineChartExpression)
{
return ChartFactory.createLineChart("Line Chart", "Category", "Value", createDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof MultiPieChartExpression)
{
return ChartFactory.createMultiplePieChart("Multi Pie Chart", createDataset(), TableOrder.BY_COLUMN, true, false,
false);// NON-NLS
}
if (aExpression instanceof PieChartExpression)
{
return ChartFactory.createPieChart("Pie Chart", createPieDataset(), true, false, false);// NON-NLS
}
if (aExpression instanceof WaterfallChartExpressions)
{
return ChartFactory.createWaterfallChart("Bar Chart", "Category", "Value", createDataset(),
PlotOrientation.HORIZONTAL, true, false, false);// NON-NLS
}
if (aExpression instanceof BubbleChartExpression)
{
return ChartFactory.createBubbleChart("Bubble Chart", "X", "Y", createXYZDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof ExtendedXYLineChartExpression)
{
return ChartFactory.createXYLineChart("XY Line Chart", "X", "Y", createXYZDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof ScatterPlotChartExpression)
{
return ChartFactory.createScatterPlot("Scatter Chart", "X", "Y", createXYZDataset(), PlotOrientation.VERTICAL,
true, false, false);// NON-NLS
}
if (aExpression instanceof XYAreaLineChartExpression)
{
final NumberAxis catAxis = new NumberAxis("Range");// NON-NLS
final NumberAxis barsAxis = new NumberAxis("Value");// NON-NLS
final NumberAxis linesAxis = new NumberAxis("Value2");// NON-NLS
final XYPlot plot = new XYPlot(createXYZDataset(), catAxis, barsAxis, new XYAreaRenderer());
plot.setRenderer(1, new XYLineAndShapeRenderer());
// add lines dataset and axis to plot
plot.setDataset(1, createXYZDataset());
plot.setRangeAxis(1, linesAxis);
// map lines to second axis
plot.mapDatasetToRangeAxis(1, 1);
// set rendering order
plot.setDatasetRenderingOrder(DatasetRenderingOrder.FORWARD);
// set location of second axis
plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);
return new JFreeChart("XY Area Line Chart", plot);// NON-NLS
}
if (aExpression instanceof XYAreaChartExpression)
{