Logo Search packages:      
Sourcecode: libjfreechart-java version File versions  Download package

static IntervalXYDataset org::jfree::experimental::chart::demo::CombinedXYPlotDemo1::createDataset1 (  )  [inline, static, private]

Creates a sample dataset. You wouldn't normally hard-code the population of a dataset in this way (it would be better to read the values from a file or a database query), but for a self-contained demo this is the least complicated solution.

Returns:
The dataset.

Definition at line 164 of file CombinedXYPlotDemo1.java.

References org::jfree::data::time::TimeSeries::add().

Referenced by createCombinedChart().

                                                      {

        // create dataset 1...
        TimeSeries series1 = new TimeSeries("Series 1", Month.class);
        series1.add(new Month(1, 2005), 7627.743);
        series1.add(new Month(2, 2005), 7713.138);
        series1.add(new Month(3, 2005), 6776.939);
        series1.add(new Month(4, 2005), 5764.537);
        series1.add(new Month(5, 2005), 4777.880);
        series1.add(new Month(6, 2005), 4836.496);
        series1.add(new Month(7, 2005), 3887.618);
        series1.add(new Month(8, 2005), 3926.933);
        series1.add(new Month(9, 2005), 4932.710);
        series1.add(new Month(10, 2005), 4027.123);
        series1.add(new Month(11, 2005), 8092.322);
        series1.add(new Month(12, 2005), 8170.414);
        series1.add(new Month(1, 2006), 8196.070);
        series1.add(new Month(2, 2006), 8269.886);
        series1.add(new Month(3, 2006), 5371.156);
        series1.add(new Month(4, 2006), 5355.718);
        series1.add(new Month(5, 2006), 5356.777);
        series1.add(new Month(6, 2006), 8420.042);
        series1.add(new Month(7, 2006), 8444.347);
        series1.add(new Month(8, 2006), 8515.034);
        series1.add(new Month(9, 2006), 8506.974);
        series1.add(new Month(10, 2006), 8584.329);
        series1.add(new Month(11, 2006), 8633.246);
        series1.add(new Month(12, 2006), 8680.224);
        series1.add(new Month(1, 2007), 8707.561);
        return new TimeSeriesCollection(series1);

    }


Generated by  Doxygen 1.6.0   Back to index