[ Index ]
 

Code source de jpGraph 2.2

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

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

   1  <?php
   2  
   3  include ("../jpgraph.php");
   4  include ("../jpgraph_line.php");
   5  
   6  // create the graph
   7  $graph= new Graph(400,250,"auto");
   8  
   9  $ydata = array(5,10,15,20,15,10);
  10  
  11  $graph->SetScale("textlin");
  12  $graph->SetShadow(true);
  13  $graph->SetMarginColor("antiquewhite");
  14  $graph->img->SetMargin(60,40,40,50);
  15  $graph->img->setTransparent("white");
  16  $graph->xaxis->SetFont(FF_FONT1);
  17  $graph->xaxis->setTextTickInterval(1);
  18  $graph->xaxis->SetTextLabelInterval(1);
  19  $graph->legend->SetFillColor("antiquewhite");
  20  $graph->legend->SetShadow(true);
  21  $graph->legend->SetLayout(LEGEND_VERT);
  22  $graph->legend->Pos(0.02,0.01);
  23  $graph->title->Set("Step Styled Example");
  24  $graph->title->SetFont(FF_FONT1,FS_BOLD);
  25  
  26  $lineplot = new LinePlot($ydata);
  27  $lineplot->SetColor("black");
  28  $lineplot->setFillColor("gray7");
  29  $lineplot->SetStepStyle();
  30  $lineplot->SetLegend(" 2002 ");
  31  
  32  // add plot to the graph
  33  $graph->Add($lineplot);
  34  $graph->ygrid->show(false,false);
  35  
  36  // display graph
  37  $graph->Stroke();
  38  
  39  ?>


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