source: trunk/client/modules/Elezioni/grafici/affluenze_graf.php@ 380

Last change on this file since 380 was 22, checked in by roby, 15 years ago

Rivista gestione accentate nei grafici

File size: 1.4 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");
12if(file_exists(TTF_DIR))
13 define("CURFONT1",FF_DV_SANSSERIF);
14else
15 define ("CURFONT1",FF_FONT1);
16
17
18$e=$_GET['e'];$f=$_GET['f'];$e1=$_GET['e1'];$f1=$_GET['f1'];
19$titolo=$_GET['titolo'];
20if (isset($_GET['cop'])) $cop=$_GET['cop'];else $cop='';
21if (isset($_GET['x'])) $dim_x=$_GET['x']; else $dim_x='300';
22if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='200';
23$data = array($e,$f);
24$legend = array("$e $e1","$f $f1");
25$graph = new PieGraph($dim_x,$dim_y,"auto");
26$graph->SetShadow();
27
28$graph->title->Set($titolo);
29$graph->title->SetFont(CURFONT1,FS_BOLD);
30$graph ->legend->Pos( 0.02,0.85,"left" ,"center");
31$graph->SetBackgroundImage("../images/logo.jpg",BGIMG_COPY);
32// testo
33$txt =new Text("$cop");
34$txt->Pos( 2,180);
35$txt->SetColor( "black");
36$graph->AddText( $txt);
37
38
39
40$p1 = new PiePlot($data);
41$p1->value->SetFormat('');
42$p1->value->Show();
43$p1->SetLegends($legend);
44$p1->SetCenter(0.5,0.5);
45
46$graph->Add($p1);
47$graph->Stroke();
48
49?>
50
51
Note: See TracBrowser for help on using the repository browser.