source: trunk/client/modules/Elezioni/grafici/votanti_graf.php@ 73

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

importo il progetto

File size: 1.7 KB
Line 
1<?php
2/************************************************************************/
3/* Eleonline - Raccolta e diffusione dei dati elettorali */
4/* by Luciano Apolito & Roberto Gigli */
5/* http://www.eleonline.it */
6/* info@eleonline.it luciano@aniene.net rgigli@libero.it */
7/************************************************************************/
8
9include ("jpgraph.php");
10include ("jpgraph_pie.php");
11
12$e=$_GET['e'];$f=$_GET['f'];$e1=$_GET['e1'];$f1=$_GET['f1'];
13$titolo=$_GET['titolo'];
14if (isset($_GET['cop'])) $cop=$_GET['cop'];else $cop='';
15if (isset($_GET['x'])) $dim_x=$_GET['x']; else $dim_x='350';
16if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='200';
17if (isset($_GET['logo'])) $logo=$_GET['logo'];else $logo='';
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.05,0.75,"left" ,"center");
26/*
27if(isset($logo)){
28 if (file_exists("../images/".$logo.".png")) {
29 $graph->SetBackgroundImage("../images/".$logo.".png",BGIMG_COPY);
30 }else{
31 else $graph->SetBackgroundImage("../images/vuoto.jpg",BGIMG_COPY);
32}
33*/
34// testo
35/*
36$txt =new Text("$cop");
37$txt->SetFont(FF_FONT1,FS_BOLD);
38//$txt->Pos(0.5,0.97,'center','bottom');
39$txt->SetBox('yellow','black');
40$txt->Pos( 2,2,'center');
41$txt->SetColor( "black");
42
43$graph->AddText( $txt);
44
45*/
46$graph->SetBackgroundGradient('white','yellow',GRAD_HOR,BGRAD_MARGIN);
47
48$p1 = new PiePlot($data);
49$p1->value->SetFormat('');
50$p1->value->Show();
51$p1->SetLegends($legend);
52$p1->SetCenter(0.4,0.5);
53
54$graph->Add($p1);
55$graph->Stroke();
56
57?>
58
59
Note: See TracBrowser for help on using the repository browser.