/** * RandomDataset [Constructor] * * @param int $count The number of points to create * @param double $minimum The minimum value the random set can be * @param double $maximum The maximum value the random set can be * @param bool $includeZero Whether 0 should be included or not as an X * value, may be omitted, default: false</false> */ function Image_Graph_Dataset_Random($count, $minimum, $maximum, $includeZero = false) { parent::Image_Graph_Dataset_Trivial(); $i = 0; while ($i < $count) { $this->addPoint($ixc = $includeZero ? $i : $i + 1, rand($minimum, $maximum)); $i++; } }
/** * Image_Graph_SequentialDataset [Constructor] */ function Image_Graph_Dataset_Sequential($dataArray = false) { parent::Image_Graph_Dataset_Trivial(); if (is_array($dataArray)) { reset($dataArray); foreach ($dataArray as $value) { $this->addPoint($value); } } }