1 | <?php // content="text/plain; charset=utf-8"
|
---|
2 | require_once ('jpgraph/jpgraph.php');
|
---|
3 | require_once ('jpgraph/jpgraph_radar.php');
|
---|
4 |
|
---|
5 | $titles=array("N", '', "NW", '', "W", '', "SW", '', 'S', '', "SE", '', "E", '', "NE", '');
|
---|
6 | $data=array(0, 0, 8, 10, 70, 90, 42, 0, 70, 60, 50, 40, 30, 40, 37.8, 72);
|
---|
7 |
|
---|
8 | $graph = new RadarGraph (250,270);
|
---|
9 |
|
---|
10 | $graph->title->Set("Accumulated PPM");
|
---|
11 | $graph->title->SetFont(FF_VERDANA,FS_NORMAL,12);
|
---|
12 |
|
---|
13 | $graph->subtitle->Set("(according to direction)");
|
---|
14 | $graph->subtitle->SetFont(FF_VERDANA,FS_ITALIC,10);
|
---|
15 |
|
---|
16 |
|
---|
17 | $graph->SetTitles($titles);
|
---|
18 | $graph->SetCenter(0.5,0.55);
|
---|
19 | $graph->HideTickMarks();
|
---|
20 | $graph->SetColor('lightyellow');
|
---|
21 | $graph->axis->SetColor('darkgray@0.3');
|
---|
22 | $graph->grid->SetColor('darkgray@0.3');
|
---|
23 | $graph->grid->Show();
|
---|
24 |
|
---|
25 | $graph->SetGridDepth(DEPTH_BACK);
|
---|
26 |
|
---|
27 | $plot = new RadarPlot($data);
|
---|
28 | $plot->SetColor('red@0.2');
|
---|
29 | $plot->SetLineWeight(1);
|
---|
30 | $plot->SetFillColor('red@0.7');
|
---|
31 | $graph->Add($plot);
|
---|
32 | $graph->Stroke();
|
---|
33 | ?>
|
---|