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

Last change on this file since 417 was 346, checked in by roby, 4 years ago

ulteriori modifiche per adeguamento a php7
Client: aggiornamento jpgraph

File size: 1.5 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");
11require_once ('jpgraph_pie3d.php');
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='450';
16if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='300';
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$theme_class= new VividTheme;
23$graph->SetTheme($theme_class);
24$graph->title->Set($titolo);
25$graph->title->SetFont(FF_FONT1,FS_BOLD);
26$graph->legend->Pos( 0,0.41,"left" ,"center");
27$graph->legend->SetColumns(1);
28$graph->SetBackgroundImage("../images/$logo",BGIMG_COPY);
29
30$graph->SetBackgroundGradient('red','yellow',GRAD_HOR,BGRAD_MARGIN);
31
32$p1 = new PiePlot3D($data);
33$p1->value->SetFormat('');
34$p1->value->Show();
35$p1->SetLegends($legend);
36$p1->SetCenter(0.65,0.35);
37
38$graph->Add($p1);
39$p1->ExplodeSlice(1);
40$graph->Stroke();
41
42?>
43
44
Note: See TracBrowser for help on using the repository browser.