Rev | Line | |
---|
[42] | 1 | <?php // content="text/plain; charset=utf-8" |
---|
| 2 | require_once ('jpgraph/jpgraph.php'); |
---|
| 3 | require_once ('jpgraph/jpgraph_radar.php'); |
---|
| 4 | |
---|
| 5 | // Some data to plot |
---|
| 6 | $data = array(55,80,26,31,95); |
---|
| 7 | |
---|
| 8 | // Create the graph and the plot |
---|
| 9 | $graph = new RadarGraph(250,200); |
---|
| 10 | |
---|
| 11 | // Create the titles for the axis |
---|
| 12 | $titles = $gDateLocale->GetShortMonth(); |
---|
| 13 | $graph->SetTitles($titles); |
---|
| 14 | |
---|
| 15 | // Add grid lines |
---|
| 16 | $graph->grid->Show(); |
---|
| 17 | $graph->grid->SetColor('darkred'); |
---|
| 18 | $graph->grid->SetLineStyle('dotted'); |
---|
| 19 | |
---|
| 20 | $plot = new RadarPlot($data); |
---|
| 21 | $plot->SetFillColor('lightblue'); |
---|
| 22 | |
---|
| 23 | // Add the plot and display the graph |
---|
| 24 | $graph->Add($plot); |
---|
| 25 | $graph->Stroke(); |
---|
| 26 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.