2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-28 11:01:59 +00:00

statistigs2.cgi: minor changes in HTML/JS code

git-svn-id: https://svn.fhem.de/fhem/trunk@14605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
markusbloch 2017-06-30 17:47:40 +00:00
parent dd5916c663
commit ccc2e10a98
2 changed files with 12 additions and 11 deletions

View File

@ -4,8 +4,7 @@ function loadGoogleApi(success) {
if(window.google) if(window.google)
{ {
// Load the Visualization API library // Load the Visualization API library
google.setOnLoadCallback(success); google.charts.load('current', {'packages':['corechart','geochart','table'], callback: success} );
google.load('visualization', '1.0', {'packages':['corechart','geochart','table'], callback: success} );
} }
else else
{ {
@ -57,8 +56,10 @@ function drawGooglePieChart(data, el) {
var options = { is3D: true, var options = { is3D: true,
chartArea : { height:'80%',width:'95%' }, chartArea : { height:'80%',width:'95%' },
tooltip: { trigger: 'selection' }, tooltip: { trigger: 'selection' },
width: 390, width: 450,
height: 300, legend: {position: 'right'},
pieSliceText: 'none',
height: 350,
}; };
var chart = new google.visualization.PieChart(document.getElementById(id)); var chart = new google.visualization.PieChart(document.getElementById(id));
@ -135,7 +136,7 @@ function drawGoogleGermanyMap(data, el) {
resolution: "provinces", resolution: "provinces",
backgroundColor : 'lightblue', backgroundColor : 'lightblue',
tooltip: {isHtml: true}, tooltip: {isHtml: true},
width:700 width:800
}; };
var chart = new google.visualization.GeoChart(document.getElementById(id)); var chart = new google.visualization.GeoChart(document.getElementById(id));
@ -165,11 +166,11 @@ function drawGoogleWorldMap(data, el) {
array.addRows(result); array.addRows(result);
var options = { var options = {
colorAxis: {colors: ['#A7E7A7', '#278727']}, colorAxis: {colors: ['#A7E7A7', '#A7E7A7']},
backgroundColor : 'lightblue', backgroundColor : 'lightblue',
tooltip: {isHtml: true}, tooltip: {isHtml: true},
legend: 'none', legend: 'none',
width:700 width: 800
}; };
var chart = new google.visualization.GeoChart(document.getElementById(id)); var chart = new google.visualization.GeoChart(document.getElementById(id));
@ -198,10 +199,10 @@ function drawGoogleEuroMap(data, el) {
var options = { var options = {
region: '150', region: '150',
colorAxis: {colors: ['#A7E7A7', '#278727']}, colorAxis: {colors: ['#A7E7A7', '#A7E7A7']},
backgroundColor : 'lightblue', backgroundColor : 'lightblue',
legend: 'none', legend: 'none',
width:700 width:800
}; };
var chart = new google.visualization.GeoChart(document.getElementById(id)); var chart = new google.visualization.GeoChart(document.getElementById(id));
@ -306,7 +307,7 @@ function onSuccess(data, textStatus, jqXHR) {
div.append("last updated: " + data.updated + " UTC<br><br>"); div.append("last updated: " + data.updated + " UTC<br><br>");
div.append("number of installations (last 12 months): " + data.nodes12 + "<br>"); div.append("number of installations (last 12 months): " + data.nodes12 + "<br>");
div.append("number of submissions (since : " + data.started + " UTC): "+data.nodesTotal+"<br>"); div.append("number of submissions (since : " + data.started + "): "+data.nodesTotal+"<br>");
div.append("created in: " + data.generated.toFixed(3) + " seconds<br>"); div.append("created in: " + data.generated.toFixed(3) + " seconds<br>");
$("div.tabs").tabs(); $("div.tabs").tabs();

View File

@ -13,7 +13,7 @@
<script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.min.js" type="text/javascript"></script> <script src="js/jquery-ui.min.js" type="text/javascript"></script>
<script src="js/jquery.dataTables.min.js" type="text/javascript"></script> <script src="js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="https://www.google.com/jsapi" type="text/javascript"></script> <script src="https://www.gstatic.com/charts/loader.js" type="text/javascript"></script>
<script src="js/statistics.js" type="text/javascript"></script> <script src="js/statistics.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />