[ Index ]
 

Code source de jpGraph 2.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_pie.php");
   4  
   5  // Some data
   6  $data = array(113,5,160,3,15,10,1);
   7  
   8  // Create the Pie Graph.
   9  $graph = new PieGraph(300,200,"auto");
  10  $graph->SetShadow();
  11  
  12  // Set A title for the plot
  13  $graph->title->Set("Example 1 Pie plot");
  14  $graph->title->SetFont(FF_VERDANA,FS_BOLD,14); 
  15  $graph->title->SetColor("brown");
  16  
  17  // Create pie plot
  18  $p1 = new PiePlot($data);
  19  //$p1->SetSliceColors(array("red","blue","yellow","green"));
  20  $p1->SetTheme("earth");
  21  
  22  $p1->value->SetFont(FF_ARIAL,FS_NORMAL,10);
  23  // Set how many pixels each slice should explode
  24  $p1->Explode(array(0,15,15,25,15));
  25  
  26  
  27  $graph->Add($p1);
  28  $graph->Stroke();
  29  
  30  ?>
  31  
  32  


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