<?
require_once "graph/LinePlot.class.php";
class graph_dyna
{
var $graph;
var $plot;
var $values;
function graph_dyna ()
{
$this->graph = new Graph(400, 400);
$this->graph->setAntiAliasing(TRUE);
$values = array(1, 4, 5, 2.5, 1);
$this->plot = new LinePlot($values);
$this->plot->setBackgroundColor(new Color(240, 240, 240));
}
function draw2 ()
{
$this->graph->add($plot);
$this->graph->draw();
}
}
$t = new graph_dyna ();
$t->draw2();
?> |