source: trunk/client/modules/Elezioni/grafici/voti_graf.php@ 388

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

ulteriori modifiche per adeguamento a php7
Client: aggiornamento jpgraph

File size: 1.5 KB
RevLine 
[2]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");
[346]11require_once ('jpgraph_pie3d.php');
[2]12$a=$_GET['a'];$b=$_GET['b'];$c=$_GET['c'];$d=$_GET['d'];
13$a1=$_GET['a1'];$b1=$_GET['b1'];$c1=$_GET['c1'];$d1=$_GET['d1'];
14$titolo=$_GET['titolo'];
15$cop=$_GET['cop'];
16$logo=$_GET['logo'];
17$data = array($a,$b,$c,$d);
18$legend = array("$a $a1","$b $b1", "$c $c1", "$d $d1");
[346]19$graph = new PieGraph(450,300,"auto");
[2]20$graph->SetShadow();
[346]21$theme_class= new VividTheme;
22$graph->SetTheme($theme_class);
[2]23$graph->title->Set($titolo);
24$graph->title->SetFont(FF_FONT1,FS_BOLD);
[346]25$graph->legend->Pos( 0.0,0.41,"left" ,"center");
26$graph->legend->SetColumns(1);
[2]27$graph->SetBackgroundGradient('white','yellow',GRAD_HOR,BGRAD_MARGIN);
28
[105]29
30//$graph->SetBackgroundImagePos(1, 100);
31$graph->SetBackgroundImage("../images/$logo",BGIMG_COPY);
32
[2]33// black-white
34//$graph->AdjBackgroundImage(0.4,0.3,-1);
35
[346]36$p1 = new PiePlot3D($data);
[2]37$p1->value->SetFormat('');
38$p1->value->Show();
39$p1->SetLegends($legend);
[346]40$p1->SetCenter(0.65,0.35);
[2]41$graph->Add($p1);
[346]42$p1->ExplodeSlice(1);
[2]43$graph->Stroke();
44
45?>
46
47
Note: See TracBrowser for help on using the repository browser.