[ Index ]
 

Code source de jpGraph 2.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/src/Examples/ -> example2.php (source)

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_line.php");
   4  
   5  $ydata = array(11,3,8,10,5,1,9,13,5,7);
   6  
   7  // Create the graph. These two calls are always required
   8  $graph = new Graph(300,200,"auto");    
   9  $graph->SetScale("textlin");
  10  
  11  // Setup margin and titles
  12  $graph->img->SetMargin(40,20,20,40);
  13  $graph->title->Set("Example 2");
  14  $graph->xaxis->title->Set("X-title");
  15  $graph->yaxis->title->Set("Y-title");
  16  
  17  // Create the linear plot
  18  $lineplot=new LinePlot($ydata);
  19  
  20  // Add the plot to the graph
  21  $graph->Add($lineplot);
  22  
  23  // Display the graph
  24  $graph->Stroke();
  25  ?>


Généré le : Sat Nov 24 09:27:55 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics