[ Index ] |
|
Code source de jpGraph 2.2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_pie.php"); 4 5 $data = array(40,60,31,35); 6 7 // A new pie graph 8 $graph = new PieGraph(250,200,"auto"); 9 $graph->SetShadow(); 10 11 // Title setup 12 $graph->title->Set("Exploding all slices"); 13 $graph->title->SetFont(FF_FONT1,FS_BOLD); 14 15 // Setup the pie plot 16 $p1 = new PiePlot($data); 17 18 // Adjust size and position of plot 19 $p1->SetSize(0.35); 20 $p1->SetCenter(0.5,0.52); 21 22 // Setup slice labels and move them into the plot 23 $p1->value->SetFont(FF_FONT1,FS_BOLD); 24 $p1->value->SetColor("darkred"); 25 $p1->SetLabelPos(0.65); 26 27 // Explode all slices 28 $p1->ExplodeAll(10); 29 30 // Add drop shadow 31 $p1->SetShadow(); 32 33 // Finally add the plot 34 $graph->Add($p1); 35 36 // ... and stroke it 37 $graph->Stroke(); 38 39 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Nov 24 09:27:55 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |