| Rev | Line | |
|---|
| [42] | 1 | <?php // content="text/plain; charset=utf-8"
|
|---|
| 2 | require_once ('jpgraph/jpgraph.php');
|
|---|
| 3 | require_once ('jpgraph/jpgraph_line.php');
|
|---|
| 4 |
|
|---|
| 5 | $datay = array(11,30,20,13,10,'x',16,12,'x',15,4,9);
|
|---|
| 6 |
|
|---|
| 7 | // Setup the graph
|
|---|
| 8 | $graph = new Graph(400,250);
|
|---|
| 9 | $graph->SetScale('intlin');
|
|---|
| 10 | $graph->title->Set('Filled line with NULL values');
|
|---|
| 11 | //Make sure data starts from Zero whatever data we have
|
|---|
| 12 | $graph->yscale->SetAutoMin(0);
|
|---|
| 13 |
|
|---|
| 14 | $p1 = new LinePlot($datay);
|
|---|
| 15 | $p1->SetFillColor('lightblue');
|
|---|
| 16 | $graph->Add($p1);
|
|---|
| 17 |
|
|---|
| 18 | // Output line
|
|---|
| 19 | $graph->Stroke();
|
|---|
| 20 |
|
|---|
| 21 | ?>
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.