Index: trunk/client/modules/Elezioni/consiglieri.php
===================================================================
--- trunk/client/modules/Elezioni/consiglieri.php	(revision 345)
+++ trunk/client/modules/Elezioni/consiglieri.php	(revision 346)
@@ -47,5 +47,5 @@
 while (isset($param['num_lista'.$x])) {
 	if ($param['num_lista'.$x]==$gruppo) array_push($collegate,$_SESSION['num_lista'.$x]);
-	elseif ($param['num_lista'.$x]!=0) array_push($collperd,$_SESSION['num_lista'.$x]);
+#	elseif ($param['num_lista'.$x]!=0) array_push($collperd,$_SESSION['num_lista'.$x]);
 	$x++;
 }
Index: trunk/client/modules/Elezioni/grafici/gd_image.inc.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/gd_image.inc.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/gd_image.inc.php	(revision 346)
@@ -109,5 +109,5 @@
         }
         else {
-        //    JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.')
+            JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation. Use the GD version that comes with PHP and not the standalone version.')
         }
     }
@@ -221,15 +221,9 @@
     }
 
-    static function GetWidth($aImg=null) {
-        if( $aImg === null ) {
-            $aImg = $this->img;
-        }
+    static function GetWidth($aImg) {
         return imagesx($aImg);
     }
 
-    static function GetHeight($aImg=null) {
-        if( $aImg === null ) {
-            $aImg = $this->img;
-        }
+    static function GetHeight($aImg) {
         return imagesy($aImg);
     }
@@ -2271,5 +2265,5 @@
     function GetAndStream($aImage,$aCacheFileName) {
         if( $this->Isvalid($aCacheFileName) ) {
-            $this->StreamImgFile($aImage,$aCacheFileName);
+            return $this->StreamImgFile($aImage,$aCacheFileName);
         }
         else {
Index: trunk/client/modules/Elezioni/grafici/jpgraph.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/jpgraph.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/jpgraph.php	(revision 346)
@@ -20,5 +20,5 @@
 
 // Version info
-define('JPG_VERSION','4.2.6');
+define('JPG_VERSION','4.3.4');
 
 // Minimum required PHP version
@@ -3643,5 +3643,4 @@
             // to many gridlines
             $i=0;
-            $x=$aTicksPos[$i];
             while( $i<count($aTicksPos) && ($x=$aTicksPos[$i]) <= $limit ) {
                 if    ( $aType == 'solid' )      $this->img->Line($x,$yl,$x,$yu);
@@ -5571,5 +5570,5 @@
     function Clear() {
         $this->isRunningClear = true;
-        $this->__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
+        Plot::__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
         $this->isRunningClear = false;
     }
Index: trunk/client/modules/Elezioni/grafici/jpgraph_bar.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/jpgraph_bar.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/jpgraph_bar.php	(revision 346)
@@ -310,4 +310,15 @@
     }
 
+
+    /**
+     * @override
+     * Without overriding this method, $this->numpoints does not updated correctly.
+     */
+    function Clear() {
+        $this->isRunningClear = true;
+        $this->__construct($this->inputValues['aDatay'], $this->inputValues['aDatax']);
+        $this->isRunningClear = false;
+    }
+
     function Stroke($img,$xscale,$yscale) {
 
@@ -717,5 +728,5 @@
         for($i=0; $i < $n; ++$i) {
             list($xm,$ym) = $this->plots[$i]->Min();
-            $xmin = max($xmin,$xm);
+            $xmin = min($xmin,$xm);
             $ymin = min($ymin,$ym);
         }
Index: trunk/client/modules/Elezioni/grafici/jpgraph_date.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/jpgraph_date.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/jpgraph_date.php	(revision 346)
@@ -407,7 +407,13 @@
         if( $aStartTime == $aEndTime ) {
             // Special case when we only have one data point.
-            // Create a small artifical intervall to do the autoscaling
+            // Create a small artificial interval to do the autoscaling
             $aStartTime -= 10;
             $aEndTime += 10;
+        }
+        if( abs($aEndTime - $aStartTime) <= 1 ) {
+            // Special case when we only have one second.
+            // Create a small artificial interval to do the autoscaling
+            $aStartTime -= 1;
+            $aEndTime += 1;
         }
         $done=false;
Index: trunk/client/modules/Elezioni/grafici/jpgraph_errhandler.inc.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/jpgraph_errhandler.inc.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/jpgraph_errhandler.inc.php	(revision 346)
@@ -17,4 +17,8 @@
 if( !defined('USE_IMAGE_ERROR_HANDLER') ) {
     define('USE_IMAGE_ERROR_HANDLER',true);
+}
+
+if( !defined('IMG_PNG') ) {
+    define('IMG_PNG',true);
 }
 
@@ -156,5 +160,5 @@
         $errobj->Raise($this->getMessage());
     }
-    static public function defaultHandler(Exception $exception) {
+    static public function defaultHandler(Throwable $exception) {
         global $__jpg_OldHandler;
         if( $exception instanceof JpGraphException ) {
Index: trunk/client/modules/Elezioni/grafici/jpgraph_pie.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/jpgraph_pie.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/jpgraph_pie.php	(revision 346)
@@ -335,8 +335,10 @@
 
             if( $this->setslicecolors==null ) {
-                $graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$this->csimtargets[$i],$alt,$wintarg);
+                $csimtarget = isset($this->csimtargets[$i]) ? $this->csimtargets[$i] : null;
+                $graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,$csimtarget,$alt,$wintarg);
             }
             else {
-                $graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$this->csimtargets[$i],$alt,$wintarg);
+                $csimtarget = isset($this->csimtargets[$i]) ? $this->csimtargets[$i] : null;
+                $graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,$csimtarget,$alt,$wintarg);
             }
         }
Index: trunk/client/modules/Elezioni/grafici/votanti_graf.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/votanti_graf.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/votanti_graf.php	(revision 346)
@@ -9,10 +9,10 @@
 include ("jpgraph.php");
 include ("jpgraph_pie.php");
-
+require_once ('jpgraph_pie3d.php');
 $e=$_GET['e'];$f=$_GET['f'];$e1=$_GET['e1'];$f1=$_GET['f1'];
 $titolo=$_GET['titolo'];
 if (isset($_GET['cop'])) $cop=$_GET['cop'];else $cop='';
-if (isset($_GET['x'])) $dim_x=$_GET['x']; else $dim_x='350';
-if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='200';
+if (isset($_GET['x'])) $dim_x=$_GET['x']; else $dim_x='450';
+if (isset($_GET['y'])) $dim_y=$_GET['y']; else $dim_y='300';
 if (isset($_GET['logo'])) $logo=$_GET['logo'];else $logo='';
 $data = array($e,$f);
@@ -20,20 +20,22 @@
 $graph = new PieGraph($dim_x,$dim_y,"auto");
 $graph->SetShadow();
-
+$theme_class= new VividTheme;
+$graph->SetTheme($theme_class);
 $graph->title->Set($titolo);
 $graph->title->SetFont(FF_FONT1,FS_BOLD);
-$graph ->legend->Pos( 0.55,0.75,"left" ,"center");
-
+$graph->legend->Pos( 0,0.41,"left" ,"center");
+$graph->legend->SetColumns(1);
 $graph->SetBackgroundImage("../images/$logo",BGIMG_COPY);
 
 $graph->SetBackgroundGradient('red','yellow',GRAD_HOR,BGRAD_MARGIN);
 
-$p1 = new PiePlot($data);
+$p1 = new PiePlot3D($data);
 $p1->value->SetFormat('');
 $p1->value->Show();
 $p1->SetLegends($legend);
-$p1->SetCenter(0.45,0.5);
+$p1->SetCenter(0.65,0.35);
 
 $graph->Add($p1);
+$p1->ExplodeSlice(1);
 $graph->Stroke();
 
Index: trunk/client/modules/Elezioni/grafici/voti_graf.php
===================================================================
--- trunk/client/modules/Elezioni/grafici/voti_graf.php	(revision 345)
+++ trunk/client/modules/Elezioni/grafici/voti_graf.php	(revision 346)
@@ -9,5 +9,5 @@
 include ("jpgraph.php");
 include ("jpgraph_pie.php");
-
+require_once ('jpgraph_pie3d.php');
 $a=$_GET['a'];$b=$_GET['b'];$c=$_GET['c'];$d=$_GET['d'];
 $a1=$_GET['a1'];$b1=$_GET['b1'];$c1=$_GET['c1'];$d1=$_GET['d1'];
@@ -17,12 +17,12 @@
 $data = array($a,$b,$c,$d);
 $legend = array("$a $a1","$b $b1", "$c $c1", "$d $d1");
-$graph = new PieGraph(350,250,"auto");
+$graph = new PieGraph(450,300,"auto");
 $graph->SetShadow();
-
-
-
+$theme_class= new VividTheme;
+$graph->SetTheme($theme_class);
 $graph->title->Set($titolo);
 $graph->title->SetFont(FF_FONT1,FS_BOLD);
-$graph ->legend->Pos( 0.52,0.70,"left" ,"center");
+$graph->legend->Pos( 0.0,0.41,"left" ,"center");
+$graph->legend->SetColumns(1);
 $graph->SetBackgroundGradient('white','yellow',GRAD_HOR,BGRAD_MARGIN);
 
@@ -34,23 +34,12 @@
 //$graph->AdjBackgroundImage(0.4,0.3,-1);
 
-$p1 = new PiePlot($data);
+$p1 = new PiePlot3D($data);
 $p1->value->SetFormat('');
 $p1->value->Show();
 $p1->SetLegends($legend);
-$p1->SetCenter(0.25,0.65);
+$p1->SetCenter(0.65,0.35);
 $graph->Add($p1);
+$p1->ExplodeSlice(1);
 $graph->Stroke();
-
-
-
-
-
-
-$graph->Add($p1);
-$graph->Stroke();
-
-
-
-
 
 ?>
Index: trunk/client/modules/Elezioni/gruppo.php
===================================================================
--- trunk/client/modules/Elezioni/gruppo.php	(revision 345)
+++ trunk/client/modules/Elezioni/gruppo.php	(revision 346)
@@ -297,5 +297,5 @@
 
 			if ($circo) $condcirc="and t5.id_circ=$id_circ";			
-			if ($tab=="gruppo" or $genere==4)
+			if ($tab=="gruppo" or $genere==4 or ($genere==5 and $votog))
 					$votigl=" sum(t3.validi),sum(t3.nulli),sum(t3.bianchi),sum(t3.contestati),sum(t3.voti_nulli)";
 			else
Index: trunk/client/versione.php
===================================================================
--- trunk/client/versione.php	(revision 345)
+++ trunk/client/versione.php	(revision 346)
@@ -1,7 +1,7 @@
 <?php
 
-$versione = "3.0 rev 345";
+$versione = "3.0 rev 346";
 $version_number = $versione;
-$datarel = "28 gennaio 2021";
+$datarel = "30 marzo 2021";
 $version = "Eleonline $version_number (<i>Data Release: $datarel</i>)";
 
