source: trunk/xgraph/jpgraph/Examples/radarex6.1.php @ 42

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 1.1 KB
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_radar.php');
4       
5// Some data to plot
6$data = array(55,80,26,31,95);
7$data2 = array(15,50,46,39,25);
8       
9// Create the graph and the plot
10$graph = new RadarGraph(250,200);
11
12// Add a drop shadow to the graph
13$graph->SetShadow();
14
15// Create the titles for the axis
16$titles = $gDateLocale->GetShortMonth();
17$graph->SetTitles($titles);
18$graph->SetColor('lightyellow');
19
20// ADjust the position to make more room
21// for the legend
22$graph->SetCenter(0.4,0.55);
23$graph->SetSize(0.6);
24
25// Add grid lines
26$graph->grid->Show();
27$graph->grid->SetColor('darkred');
28$graph->grid->SetLineStyle('dotted');
29
30$plot = new RadarPlot($data);
31$plot->SetFillColor('lightblue');
32$plot->SetLegend("QA results");
33
34$plot2 = new RadarPlot($data2);
35$plot2->SetLegend("Target");
36$plot2->SetColor('red');
37$plot2->SetFill(false);
38$plot2->SetLineWeight(2);
39
40
41// Add the plot and display the graph
42$graph->Add($plot);
43$graph->Add($plot2);
44$graph->Stroke();
45?>
Note: See TracBrowser for help on using the repository browser.