[ Index ] |
|
Code source de jpGraph 2.2 |
1 <?php 2 include ("../jpgraph.php"); 3 include ("../jpgraph_line.php"); 4 5 $ydata = array(11,3,8,12,5,1,9,13,5,7); 6 7 // Create the graph. These two calls are always required 8 $graph = new Graph(300,200,"auto"); 9 $graph->SetScale("textlin"); 10 11 // Adjust the margin 12 $graph->img->SetMargin(40,20,20,40); 13 $graph->SetShadow(); 14 15 // Create the linear plot 16 $lineplot=new LinePlot($ydata); 17 $lineplot->mark->SetType(MARK_UTRIANGLE); 18 $lineplot->value->show(); 19 $lineplot->value->SetColor('darkred'); 20 $lineplot->value->SetFont(FF_FONT1,FS_BOLD); 21 $lineplot->value->SetFormat('$%0.1f'); 22 23 24 // Add the plot to the graph 25 $graph->Add($lineplot); 26 27 $graph->title->Set("Displaying the values"); 28 $graph->xaxis->title->Set("X-title"); 29 $graph->yaxis->title->Set("Y-title"); 30 31 $graph->title->SetFont(FF_FONT1,FS_BOLD); 32 $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); 33 $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); 34 35 $lineplot->SetColor("blue"); 36 $lineplot->SetWeight(2); 37 38 39 // Display the graph 40 $graph->Stroke(); 41 ?>
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 |
![]() |