private static JFreeChart createChart(){
  XYSeries series1=new XYSeries("Series 1");
  series1.add(1.0,1.0);
  series1.add(2.0,2.0);
  series1.add(3.0,3.0);
  XYDataset dataset=new XYSeriesCollection(series1);
  return ChartFactory.createXYStepChart("Step Chart","Domain","Range",dataset,PlotOrientation.VERTICAL,true,true,true);
}

private static JFreeChart createChart ( ) { XYSeries series1 = new XYSeries ( "Series 1" ) ; series1 . add ( 1.0 , 1.0 ) ; series1 . add ( 2.0 , 2.0 ) ; series1 . add ( 3.0 , 3.0 ) ; XYDataset dataset = new XYSeriesCollection ( series1 ) ; return ChartFactory . createXYStepChart ( "Step Chart" , "Domain" , "Range" , dataset , PlotOrientation . VERTICAL , true , true , true ) ; }
create a horizontal bar chart with sample data in the range - 3 to + 3 .
