@Override public void start(Stage stage) throws Exception {
  CategoryDataset dataset=createDataset();
  JFreeChart chart=createChart(dataset);
  ChartViewer viewer=new ChartViewer(chart);
  viewer.addChartMouseListener(this);
  stage.setScene(new Scene(viewer));
  stage.setTitle("JFreeChart: BarChartFXDemo1.java");
  stage.setWidth(700);
  stage.setHeight(390);
  stage.show();
}

@ Override public void start ( Stage stage ) throws Exception { CategoryDataset dataset = createDataset ( ) ; JFreeChart chart = createChart ( dataset ) ; ChartViewer viewer = new ChartViewer ( chart ) ; viewer . addChartMouseListener ( this ) ; stage . setScene ( new Scene ( viewer ) ) ; stage . setTitle ( "JFreeChart: BarChartFXDemo1.java" ) ; stage . setWidth ( 700 ) ; stage . setHeight ( 390 ) ; stage . show ( ) ; }
adds a chart viewer to the stage and displays it .
