[ Index ] |
|
Code source de jpGraph 2.2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_bar.php"); 4 5 $datay=array(12,8,19,3,10,5); 6 7 // Create the graph. These two calls are always required 8 $graph = new Graph(260,100,"auto"); 9 $graph->SetScale("linlin"); 10 11 // Add a drop shadow 12 $graph->SetShadow(); 13 14 // Adjust the margin a bit to make more room for titles 15 $graph->img->SetMargin(40,30,20,40); 16 17 // Create a bar pot 18 $bplot = new BarPlot($datay); 19 20 // Adjust fill color 21 $bplot->SetFillColor('orange'); 22 $graph->Add($bplot); 23 24 // Setup the titles 25 $graph->title->Set("Bar graph, linear scale"); 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 // Display the graph 34 $graph->Stroke(); 35 ?>
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 |
![]() |