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

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

importo il progetto

File size: 1.3 KB
Line 
1<?php
2
3/************************************************************************/
4/* Eleonline - Raccolta e diffusione dei dati elettorali */
5/* by Luciano Apolito & Roberto Gigli */
6/* http://www.eleonline.it */
7/* info@eleonline.it luciano@aniene.net rgigli@libero.it */
8/************************************************************************/
9
10include ("jpgraph.php");
11include ("jpgraph_pie.php");
12
13$e=$_GET['e'];$f=$_GET['f'];$e1=$_GET['e1'];$f1=$_GET['f1'];
14$titolo=$_GET['titolo'];
15if (isset($_GET['cop'])) $cop=$_GET['cop'];else $cop='';
16if (isset($_GET['x'])) $dim_x=$_GET['x']; else $dim_x='300';
17if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='200';
18$data = array($e,$f);
19$legend = array("$e $e1","$f $f1");
20$graph = new PieGraph($dim_x,$dim_y,"auto");
21$graph->SetShadow();
22
23$graph->title->Set($titolo);
24$graph->title->SetFont(FF_FONT1,FS_BOLD);
25$graph ->legend->Pos( 0.02,0.85,"left" ,"center");
26$graph->SetBackgroundImage("../images/logo.jpg",BGIMG_COPY);
27// testo
28$txt =new Text("$cop");
29$txt->Pos( 2,180);
30$txt->SetColor( "black");
31$graph->AddText( $txt);
32
33
34
35$p1 = new PiePlot($data);
36$p1->value->SetFormat('');
37$p1->value->Show();
38$p1->SetLegends($legend);
39$p1->SetCenter(0.5,0.5);
40
41$graph->Add($p1);
42$graph->Stroke();
43
44?>
45
46
Note: See TracBrowser for help on using the repository browser.