source: trunk/client/modules/Elezioni/grafici/raffronti.php@ 194

Last change on this file since 194 was 2, checked in by root, 15 years ago

importo il progetto

File size: 1.5 KB
Line 
1<?php
2include ("jpgraph.php");
3include ("jpgraph_line.php");
4
5$grp1=$_GET['grp1'];$grp2=$_GET['grp2'];$altro=$_GET['altro'];
6$desc=$_GET['desc'];
7$ar1=$_GET['ar1'];$ar2=$_GET['ar2'];$ar3=$_GET['ar3'];
8
9$ar1=unserialize(stripslashes($ar1));
10$ar2=unserialize(stripslashes($ar2));
11$ar3=unserialize(stripslashes($ar3));
12
13
14//$datay = array(0.2980,0.3039,0.3020,0.3027,0.3015);
15//$data2 = array(0.2910,0.3039,0.3000,0.3010,0.3000);
16$graph = new Graph(450,320,"auto");
17$graph->img->SetMargin(40,40,40,40);
18
19$graph->img->SetAntiAliasing();
20$graph->SetScale("textlin");
21$graph->SetShadow();
22$graph->title->Set("Example of 10% top/bottom grace");
23$graph->title->SetFont(FF_FONT1,FS_BOLD);
24
25// Add 10% grace to top and bottom of plot
26$graph->yscale->SetGrace(20,20);
27$graph->legend->Pos(0.05,0.5,"right","center");
28
29//$graph->xaxis-> SetTickLabels($desc);
30
31
32$p1 = new LinePlot($ar1);
33$p1->mark->SetType(MARK_FILLEDCIRCLE);
34$p1->mark->SetFillColor("red");
35$p1->mark->SetWidth(4);
36$p1->SetColor("blue");
37$p1->SetCenter();
38$p1->SetLegend($grp1);
39
40
41$p2 = new LinePlot($ar2);
42$p2->mark->SetType(MARK_FILLEDCIRCLE);
43$p2->mark->SetFillColor("gray");
44$p2->mark->SetWidth(4);
45$p2->SetColor("black");
46$p2->SetCenter();
47$p2->SetLegend($grp2);
48
49$p3 = new LinePlot($ar3);
50$p3->mark->SetType(MARK_FILLEDCIRCLE);
51$p3->mark->SetFillColor("green");
52$p3->mark->SetWidth(4);
53$p3->SetColor("red");
54$p3->SetCenter();
55$p3->SetLegend("Altro");
56
57
58$graph->Add($p1);
59$graph->Add($p2);
60$graph->Add($p3);
61
62$graph->Stroke();
63
64
65
66
67
68?>
69
70
Note: See TracBrowser for help on using the repository browser.