Changeset 412 for trunk/client/modules/Elezioni/blocchi/pie_affluenze.php
- Timestamp:
- May 2, 2024, 9:21:31 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/modules/Elezioni/blocchi/pie_affluenze.php
r400 r412 83 83 $resto=100-$perc; 84 84 if ($genere==0){echo "<div style=\"text-align:center\">referendum n. $num_gruppo</div";} 85 echo '<center> 86 <div id="piechart" style="width:100%; min-height:200px;"></div><br/> 87 <a href="modules.php?id_cons_gen='.$id_cons_gen.'&name=Elezioni&id_comune='.$id_comune.'&file=index&op=affluenze_graf">Tutte le affluenze</a> 88 </center> 89 <script>google.charts.load("current", {"packages":["corechart"]}); 90 google.charts.setOnLoadCallback(drawChart); 91 92 function drawChart() { 93 var data = google.visualization.arrayToDataTable([ 94 ["Task", "Affluenze"], 95 ["", '.$resto.'], 96 ["'.$perc.'%", '.$perc.'] 97 ]); 98 var options = { 99 title: "", 100 is3D:true, 101 legend: "none", 102 pieSliceText: "label", 103 pieSliceTextStyle: { 104 color: "#000", 105 bold:true, 106 fontSize:12 107 }, 108 slices: { 109 0: { color: "#ff0000", textStyle:{color:"#fff"}}, 110 1: { color: "#ffff00" } 111 } 112 }; 113 var chart = new google.visualization.PieChart(document.getElementById("piechart")); 85 114 86 echo "<center><img src=\"http://chart.apis.google.com/chart? 87 chs=200x70 88 &chd=t:$resto,$perc 89 &cht=p3 90 &chl=|$perc% 91 &chco=ff0000,ffff00 \" 92 alt=\"Sample chart\" /> 93 <br/> <a href=\"modules.php?id_cons_gen=$id_cons_gen&name=Elezioni&id_comune=$id_comune&file=index&op=affluenze_graf\">Tutte le affluenze</a> 94 </center>"; 95 96 97 115 chart.draw(data, options); 116 }</script>'; 98 117 } 99 118
Note:
See TracChangeset
for help on using the changeset viewer.