DefaultCategoryDataset dataset = new DefaultCategoryDataset();
JFreeChart chart = ChartFactory.createBarChart(
"Test Chart", "Category Axis", "Value Axis",
dataset, PlotOrientation.VERTICAL, true, true, false);
CategoryPlot plot = (CategoryPlot) chart.getPlot();
plot.addRangeMarker(new ValueMarker(1.1), Layer.FOREGROUND);
plot.addRangeMarker(new IntervalMarker(2.2, 3.3), Layer.BACKGROUND);
JFreeChart chart2 = null;
// serialize and deserialize the chart....
try {