source: trunk/xgraph/jpgraph/Examples/gradlinefillex1.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 612 bytes
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_line.php');
4
5$datay = array(20,15,33,5,17,35,22);
6
7// Setup the graph
8$graph = new Graph(400,200);
9$graph->SetMargin(40,40,20,30); 
10$graph->SetScale("intlin");
11$graph->SetMarginColor('darkgreen@0.8');
12
13$graph->title->Set('Gradient filled line plot');
14$graph->yscale->SetAutoMin(0);
15
16// Create the line
17$p1 = new LinePlot($datay);
18$p1->SetColor("blue");
19$p1->SetWeight(0);
20$p1->SetFillGradient('red','yellow');
21
22$graph->Add($p1);
23
24// Output line
25$graph->Stroke();
26
27?>
28
29
Note: See TracBrowser for help on using the repository browser.