[ Index ]
 

Code source de jpGraph 2.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

   1  <?php
   2  
   3  include  ("../jpgraph.php");
   4  include  ("../jpgraph_bar.php");
   5  
   6  // We need some data
   7  $datay=array(4,8,6);
   8  
   9  // Setup the graph. 
  10  $graph = new Graph(200,150,"auto");    
  11  $graph->SetScale("textlin");
  12  $graph->img->SetMargin(25,15,25,25);
  13  
  14  $graph->title->Set('"GRAD_WIDE_MIDHOR"');
  15  $graph->title->SetColor('darkred');
  16  
  17  // Setup font for axis
  18  $graph->xaxis->SetFont(FF_FONT1);
  19  $graph->yaxis->SetFont(FF_FONT1);
  20  
  21  // Create the bar pot
  22  $bplot = new BarPlot($datay);
  23  $bplot->SetWidth(0.6);
  24  
  25  // Setup color for gradient fill style 
  26  $bplot->SetFillGradient("navy","lightsteelblue",GRAD_WIDE_MIDHOR);
  27  
  28  // Set color for the frame of each bar
  29  $bplot->SetColor("navy");
  30  $graph->Add($bplot);
  31  
  32  // Finally send the graph to the browser
  33  $graph->Stroke();
  34  ?>


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