updates for latest netdata.js
box@home root committed
Jun 19, 2013 at 02:01 UTC
84ef49d83c2224df16f73f2b976272e7d6b6190b
1 file changed
+8
-5
netdata.start
+8
-5
@@ -85,11 +85,9 @@ cat >all.html <<EOF
85
google.setOnLoadCallback(drawCharts);
86
87
function drawCharts() {
88
- var width = (window.innerWidth - 50) / 2;
88
+ var width = 0; // if zero, auto-adjusts to 50% of screen, 1-10 goes 1/width of screen
89
var height = 260;
90
91
- if(width < height) width = height; //>
92
-
91
// EDIT: add one line per interface you have
92
// EDIT:
93
// EDIT: name div id json data graph title
@@ -107,8 +105,13 @@ done
105
cat >>all.html <<EOF3
106
}
107
110
- // EDIT: how often the charts are updated, in milliseconds
111
- setInterval(drawCharts, 1000);
108
+ function myChartsRefresh() {
109
+ // refresh up to 4 charts per second
110
+ refreshCharts(4);
111
+ }
112
+
113
+ // EDIT: how often the charts are updated, in milliseconds
114
+ setInterval(myChartsRefresh, 1000);
115
</script>
116
</head>
117