cosmetic changes
Costa Tsaousis committed
Mar 27, 2014 at 21:58 UTC
4f33498248163ec9ac33f1995b09cde55f4a0da7
1 file changed
+18
web/netdata.js
+18
@@ -9,6 +9,20 @@
9
function refreshChart(index) {
10
if(index >= charts.length) return;
11
12
+ charts[index].refreshCount++;
13
+
14
+ if(charts[index].chart != null) {
15
+ if(charts[index].chart.getSelection()[0]) return;
16
+
17
+ if(charts[index].refreshCount >= 1) {
18
+ charts[index].jsondata = null;
19
+ charts[index].datatable = null;
20
+ charts[index].chart.clearChart();
21
+ charts[index].chart = null;
22
+ charts[index].refreshCount = 1;
23
+ }
24
+ }
25
+
26
charts[index].jsondata = $.ajax({
27
url: charts[index].url,
28
dataType:"json",
@@ -50,6 +64,9 @@
64
isStacked: isStacked,
65
hAxis: {title: hAxisTitle},
66
vAxis: {title: vAxisTitle, minValue: 10},
67
+ focusTarget: 'category',
68
+ lineWidth: (isStacked)?1:2,
69
+ areaOpacity: (isStacked)?1.0:0.3,
70
// animation: {duration: 1000, easing: 'inAndOut'},
71
};
72
@@ -72,6 +89,7 @@
89
charts[i].vtitle = vtitle;
90
charts[i].width = width;
91
charts[i].height = height;
92
+ charts[i].refreshCount = 0;
93
}
94
95
var charts_last_drawn = 999999999;