private static TimeSeries createDataset ( String name , double base , RegularTimePeriod start , int count ) { TimeSeries series = new TimeSeries ( name , start . getClass ( ) ) ; RegularTimePeriod period = start ; double value = base ; for ( int i = 0 ; i < count ; i ++ ) { series . add ( period , value ) ; period = period . next ( ) ; value = value * ( 1 + ( Math . random ( ) - 0.495 ) / 10.0 ) ; } return series ; }
Creates the demo chart .