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

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_line.php");
   4  include  ("../jpgraph_error.php");
   5  
   6  $errdatay = array(11,9,2,4,19,26,13,19,7,12);
   7  $datax=array("Jan","Feb","Mar","Apr","May");
   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 plot
  16  $errplot=new ErrorLinePlot($errdatay);
  17  $errplot->SetColor("red");
  18  $errplot->SetWeight(2);
  19  $errplot->SetCenter();
  20  $errplot->line->SetWeight(2);
  21  $errplot->line->SetColor("blue");
  22  // Add the plot to the graph
  23  $graph->Add($errplot);
  24  
  25  $graph->title->Set("Example 15");
  26  $graph->xaxis->title->Set("X-title");
  27  $graph->yaxis->title->Set("Y-title");
  28  
  29  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  30  $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
  31  $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
  32  
  33  $graph->xaxis->SetTickLabels($datax);
  34  //$graph->xaxis->SetTextTickInterval(2);
  35  
  36  // Display the graph
  37  $graph->Stroke();
  38  ?>


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