source: trunk/client/modules/Elezioni/grafici-old/raffrontiperc.php@ 2

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

importo il progetto

File size: 1.9 KB
Line 
1<?php
2include ("jpgraph.php");
3include ("jpgraph_line.php");
4//include ("jpgraph_flags.php");
5
6
7$titperc=$_GET['titperc'];
8$altro=$_GET['altro'];
9$desc=$_GET['desc'];
10$grp1=$_GET['grp1'];$grp2=$_GET['grp2'];$grp3=$_GET['grp3'];
11
12$percg1=$_GET['percg1'];$percg2=$_GET['percg2'];$percg3=$_GET['percg3'];
13
14$percg1=unserialize(stripslashes($percg1));
15$percg2=unserialize(stripslashes($percg2));
16$percg3=unserialize(stripslashes($percg3));
17$desc=unserialize(stripslashes($desc));
18
19
20
21$graph = new Graph(640,320,"auto");
22$graph->img->SetMargin(40,40,40,40);
23
24$graph->img->SetAntiAliasing();
25$graph->SetScale("textlin");
26$graph->SetShadow();
27$graph->title->Set($titperc);
28$graph->title->SetFont(FF_FONT1,FS_BOLD);
29
30// Add 10% grace to top and bottom of plot
31$graph->yscale->SetGrace(10,10);
32$graph->xscale->SetGrace(10,10);
33$graph->xaxis-> SetTickLabels($desc);
34$graph->legend->Pos(0.03,0.2,"right","center");
35
36
37//$graph->Set3DPerspective(SKEW3D_RIGHT,650,470,true);
38
39$graph->SetBackgroundImage("../images/logo.jpg",BGIMG_COPY);
40//$graph->SetBackgroundCountryFlag('ital',BGIMG_COPY,20);
41
42if($grp1){
43$p1 = new LinePlot($percg1);
44$p1->value-> Show();
45$p1->value->SetFormat( " %0.2f");
46$p1->mark->SetType(MARK_FILLEDCIRCLE);
47$p1->mark->SetFillColor("red");
48$p1->mark->SetWidth(4);
49$p1->SetColor("blue");
50$p1->SetCenter();
51$p1->SetLegend($grp1);
52}
53if($grp2){
54$p2 = new LinePlot($percg2);
55$p2->value->SetFormat( "%0.2f");
56$p2->value-> Show();
57$p2->mark->SetType(MARK_FILLEDCIRCLE);
58$p2->mark->SetFillColor("gray");
59$p2->mark->SetWidth(4);
60$p2->SetColor("black");
61$p2->SetCenter();
62$p2->SetLegend($grp2);
63}
64
65if($grp3){
66$p3 = new LinePlot($percg3);
67$p3->value->SetFormat( "%0.2f");
68$p3->value-> Show();
69$p3->mark->SetType(MARK_FILLEDCIRCLE);
70$p3->mark->SetFillColor("green");
71$p3->mark->SetWidth(4);
72$p3->SetColor("red");
73$p3->SetCenter();
74$p3->SetLegend($altro);
75}
76
77if($grp1)$graph->Add($p1);
78if($grp2)$graph->Add($p2);
79if($grp3)$graph->Add($p3);
80
81$graph->Stroke();
82
83
84
85
86
87?>
88
89
Note: See TracBrowser for help on using the repository browser.