[ 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/ -> example17.php (source)

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_line.php");
   4  
   5  $new_datay =             array(11,7,5,8,3,5,5,4,8,6,5,5,3,2,5,1,2,0);
   6  $inprogress_datay =     array( 4,5,4,5,6,5,7,4,7,4,4,3,2,4,1,2,2,1);
   7  $fixed_datay =         array(4,5,7,10,13,15,15,22,26,26,30,34,40,43,47,55,60,62);
   8  
   9  // Create the graph. These two calls are always required
  10  $graph = new Graph(300,200,"auto");    
  11  $graph->img->SetMargin(40,30,20,40);
  12  $graph->SetScale("textlin");
  13  $graph->SetShadow();
  14  
  15  // Create the linear plots for each category
  16  $dplot[] = new LinePLot($new_datay);
  17  $dplot[] = new LinePLot($inprogress_datay);
  18  $dplot[] = new LinePLot($fixed_datay);
  19  
  20  $dplot[0]->SetFillColor("red");
  21  $dplot[1]->SetFillColor("blue");
  22  $dplot[2]->SetFillColor("green");
  23  
  24  // Create the accumulated graph
  25  $accplot = new AccLinePlot($dplot);
  26  
  27  // Add the plot to the graph
  28  $graph->Add($accplot);
  29  
  30  $graph->xaxis->SetTextTickInterval(2);
  31  $graph->title->Set("Example 17");
  32  $graph->xaxis->title->Set("X-title");
  33  $graph->yaxis->title->Set("Y-title");
  34  
  35  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  36  $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
  37  $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
  38  
  39  // Display the graph
  40  $graph->Stroke();
  41  ?>


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