From ccc2e10a98dab51e5508c92f3212dace3af43c04 Mon Sep 17 00:00:00 2001
From: markusbloch <>
Date: Fri, 30 Jun 2017 17:47:40 +0000
Subject: [PATCH] statistigs2.cgi: minor changes in HTML/JS code
git-svn-id: https://svn.fhem.de/fhem/trunk@14605 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/contrib/statistics/2017/js/statistics.js | 21 ++++++++++---------
fhem/contrib/statistics/2017/statistics.html | 2 +-
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/fhem/contrib/statistics/2017/js/statistics.js b/fhem/contrib/statistics/2017/js/statistics.js
index 99901dada..2a8bf5bf8 100644
--- a/fhem/contrib/statistics/2017/js/statistics.js
+++ b/fhem/contrib/statistics/2017/js/statistics.js
@@ -4,8 +4,7 @@ function loadGoogleApi(success) {
if(window.google)
{
// Load the Visualization API library
- google.setOnLoadCallback(success);
- google.load('visualization', '1.0', {'packages':['corechart','geochart','table'], callback: success} );
+ google.charts.load('current', {'packages':['corechart','geochart','table'], callback: success} );
}
else
{
@@ -57,8 +56,10 @@ function drawGooglePieChart(data, el) {
var options = { is3D: true,
chartArea : { height:'80%',width:'95%' },
tooltip: { trigger: 'selection' },
- width: 390,
- height: 300,
+ width: 450,
+ legend: {position: 'right'},
+ pieSliceText: 'none',
+ height: 350,
};
var chart = new google.visualization.PieChart(document.getElementById(id));
@@ -135,7 +136,7 @@ function drawGoogleGermanyMap(data, el) {
resolution: "provinces",
backgroundColor : 'lightblue',
tooltip: {isHtml: true},
- width:700
+ width:800
};
var chart = new google.visualization.GeoChart(document.getElementById(id));
@@ -165,11 +166,11 @@ function drawGoogleWorldMap(data, el) {
array.addRows(result);
var options = {
- colorAxis: {colors: ['#A7E7A7', '#278727']},
+ colorAxis: {colors: ['#A7E7A7', '#A7E7A7']},
backgroundColor : 'lightblue',
tooltip: {isHtml: true},
legend: 'none',
- width:700
+ width: 800
};
var chart = new google.visualization.GeoChart(document.getElementById(id));
@@ -198,10 +199,10 @@ function drawGoogleEuroMap(data, el) {
var options = {
region: '150',
- colorAxis: {colors: ['#A7E7A7', '#278727']},
+ colorAxis: {colors: ['#A7E7A7', '#A7E7A7']},
backgroundColor : 'lightblue',
legend: 'none',
- width:700
+ width:800
};
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
");
div.append("number of installations (last 12 months): " + data.nodes12 + "
");
- div.append("number of submissions (since : " + data.started + " UTC): "+data.nodesTotal+"
");
+ div.append("number of submissions (since : " + data.started + "): "+data.nodesTotal+"
");
div.append("created in: " + data.generated.toFixed(3) + " seconds
");
$("div.tabs").tabs();
diff --git a/fhem/contrib/statistics/2017/statistics.html b/fhem/contrib/statistics/2017/statistics.html
index 692cf20d6..835d95d88 100644
--- a/fhem/contrib/statistics/2017/statistics.html
+++ b/fhem/contrib/statistics/2017/statistics.html
@@ -13,7 +13,7 @@
-
+