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

Last change on this file since 42 was 42, checked in by marrucho, 10 years ago
File size: 1.3 KB
Line 
1<?php // content="text/plain; charset=utf-8"
2require_once ('jpgraph/jpgraph.php');
3require_once ('jpgraph/jpgraph_radar.php');
4
5// Create the basic radar graph
6$graph = new RadarGraph(300,200);
7$graph->img->SetAntiAliasing();
8
9// Set background color and shadow
10$graph->SetColor("white");
11$graph->SetShadow();
12
13// Position the graph
14$graph->SetCenter(0.4,0.55);
15
16// Setup the axis formatting   
17$graph->axis->SetFont(FF_FONT1,FS_BOLD);
18
19// Setup the grid lines
20$graph->grid->SetLineStyle("solid");
21$graph->grid->SetColor("navy");
22$graph->grid->Show();
23$graph->HideTickMarks();
24               
25// Setup graph titles
26$graph->title->Set("Quality result");
27$graph->title->SetFont(FF_FONT1,FS_BOLD);
28
29$graph->SetTitles($gDateLocale->GetShortMonth());
30
31// Create the first radar plot         
32$plot = new RadarPlot(array(70,80,60,90,71,81,47));
33$plot->SetLegend("Goal");
34$plot->SetColor("red","lightred");
35$plot->SetFill(false);
36$plot->SetLineWeight(2);
37
38// Create the second radar plot
39$plot2 = new RadarPlot(array(70,40,30,80,31,51,14));
40$plot2->SetLegend("Actual");
41$plot2->SetLineWeight(2);
42$plot2->SetColor("blue");
43$plot2->SetFill(false);
44
45// Add the plots to the graph
46$graph->Add($plot2);
47$graph->Add($plot);
48
49// And output the graph
50$graph->Stroke();
51
52?>
Note: See TracBrowser for help on using the repository browser.