Blame view

site/jpgraph/Examples/filledlineex03.php 515 Bytes
8ec98c9f   Guillaume   MAJ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  <?php // content="text/plain; charset=utf-8"
  require_once ('jpgraph/jpgraph.php');
  require_once ('jpgraph/jpgraph_line.php');
  
  $datay = array(11,30,20,13,10,'x',16,12,'x',15,4,9);
  
  // Setup the graph
  $graph = new Graph(400,250);
  $graph->SetScale('intlin');
  $graph->title->Set('Filled line with NULL values');
  //Make sure data starts from Zero whatever data we have
  $graph->yscale->SetAutoMin(0);
  
  $p1 = new LinePlot($datay);
  $p1->SetFillColor('lightblue');
  $graph->Add($p1);
  
  // Output line
  $graph->Stroke();
  
  ?>