[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/projectmanager/inc/jpgraph-1.5.2/src/Examples/ -> example3.php (source)

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_line.php");
   4  
   5  $ydata = array(11,3,8,12,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  // Create the linear plot
  12  $lineplot=new LinePlot($ydata);
  13  
  14  
  15  // Add the plot to the graph
  16  $graph->Add($lineplot);
  17  
  18  $graph->img->SetMargin(40,20,20,40);
  19  $graph->title->Set("Example 3");
  20  $graph->xaxis->title->Set("X-title");
  21  $graph->yaxis->title->Set("Y-title");
  22  
  23  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  24  $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
  25  $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
  26  
  27  $lineplot->SetColor("blue");
  28  $lineplot->SetWeight(2);
  29  $graph->yaxis->SetColor("red");
  30  $graph->yaxis->SetWeight(2);
  31  $graph->SetShadow();
  32  
  33  // Display the graph
  34  $graph->Stroke();
  35  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7