Line | |
---|
1 | <?php // content="text/plain; charset=utf-8"
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_bar.php');
|
---|
4 | require_once ('jpgraph/jpgraph_line.php');
|
---|
5 |
|
---|
6 | $datay=array(5,3,11,6,3);
|
---|
7 |
|
---|
8 | $graph = new Graph(400,300,'auto');
|
---|
9 | $graph->SetScale("textlin");
|
---|
10 |
|
---|
11 | $graph->title->Set('Images on top of bars');
|
---|
12 | $graph->title->SetFont(FF_ARIAL,FS_BOLD,13);
|
---|
13 |
|
---|
14 | $graph->SetTitleBackground('lightblue:1.1',TITLEBKG_STYLE1,TITLEBKG_FRAME_BEVEL);
|
---|
15 |
|
---|
16 | $bplot = new BarPlot($datay);
|
---|
17 | $bplot->SetFillColor("orange");
|
---|
18 | $bplot->SetWidth(0.5);
|
---|
19 |
|
---|
20 | $lplot = new LinePlot($datay);
|
---|
21 | $lplot->SetColor('white@1');
|
---|
22 | $lplot->SetBarCenter();
|
---|
23 | $lplot->mark->SetType(MARK_IMG_LBALL,'red');
|
---|
24 |
|
---|
25 | $graph->Add($bplot);
|
---|
26 | $graph->Add($lplot);
|
---|
27 |
|
---|
28 | $graph->Stroke();
|
---|
29 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.