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

   1  <?php
   2  include  ("../jpgraph.php");
   3  include  ("../jpgraph_pie.php");
   4  
   5  // Some data
   6  $data = array(27,23,47,17);
   7  
   8  // A new graph
   9  $graph = new PieGraph(350,200,"auto");
  10  $graph->SetShadow();
  11  
  12  // Setup title
  13  $graph->title->Set("Example of pie plot with absolute labels");
  14  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  15  
  16  // The pie plot
  17  $p1 = new PiePlot($data);
  18  
  19  // Move center of pie to the left to make better room
  20  // for the legend
  21  $p1->SetCenter(0.35,0.5);
  22  
  23  // Label font and color setup
  24  $p1->SetFont(FF_FONT1,FS_BOLD);
  25  $p1->SetFontColor("darkred");
  26  
  27  // Use absolute values (type==1)
  28  $p1->SetLabelType(1);
  29  
  30  // Label format
  31  $p1->SetLabelFormat("$%d");
  32  
  33  // Size of pie in fraction of the width of the graph
  34  $p1->SetSize(0.3);
  35  
  36  // Legends
  37  $p1->SetLegends(array("May ($%d)","June ($%d)","July ($%d)","Aug ($%d)"));
  38  $graph->legend->Pos(0.05,0.15);
  39  
  40  $graph->Add($p1);
  41  $graph->Stroke();
  42  ?>
  43  
  44  


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