public static void main ( String [ ] args ) { TimeSeries dataset1 = createDataset ( "Series 1" , 100.0 , new Minute ( ) , 200 ) ; MultipleAxisChart demo = new MultipleAxisChart ( "Multiple Axis Demo 1" , "Time of Day" , "Primary Range Axis" , dataset1 ) ; /* AXIS 2 NumberAxis axis2 = new NumberAxis("Range Axis 2"); axis2.setFixedDimension(10.0); axis2.setAutoRangeIncludesZero(false); plot.setRangeAxis(1, axis2); plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_LEFT); / plot.setDataset(1, dataset2); plot.mapDatasetToRangeAxis(1, 1); XYItemRenderer renderer2 = new StandardXYItemRenderer(); plot.setRenderer(1, renderer2); */ TimeSeries dataset2 = createDataset ( "Series 2" , 1000.0 , new Minute ( ) , 170 ) ; demo . addSeries ( "Range Axis 2" , dataset2 ) ; /* // AXIS 3 NumberAxis axis3 = new NumberAxis("Range Axis 3"); plot.setRangeAxis(2, axis3); XYDataset dataset3 = createDataset("Series 3", 10000.0, new Minute(), 170); plot.setDataset(2, dataset3); plot.mapDatasetToRangeAxis(2, 2); XYItemRenderer renderer3 = new StandardXYItemRenderer(); plot.setRenderer(2, renderer3); */ TimeSeries dataset3 = createDataset ( "Series 3" , 10000.0 , new Minute ( ) , 170 ) ; demo . addSeries ( "Range Axis 3" , dataset3 ) ; /* AXIS 4 NumberAxis axis4 = new NumberAxis("Range Axis 4"); plot.setRangeAxis(3, axis4); XYDataset dataset4 = createDataset("Series 4", 25.0, new Minute(), 200); plot.setDataset(3, dataset4); plot.mapDatasetToRangeAxis(3, 3); XYItemRenderer renderer4 = new StandardXYItemRenderer(); plot.setRenderer(3, renderer4); */ TimeSeries dataset4 = createDataset ( "Series 4" , 25.0 , new Minute ( ) , 200 ) ; demo . addSeries ( "Range Axis 4" , dataset4 ) ; demo . finish ( new java . awt . Dimension ( 600 , 270 ) ) ; JFrame frame = new JFrame ( "Demovabulous " ) ; frame . getContentPane ( ) . add ( demo , BorderLayout . CENTER ) ; frame . setSize ( 640 , 480 ) ; frame . setVisible ( true ) ; frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; }
Starting point for the demonstration application .