@cryptotaxi247 / netdata-1 / commits / 682eea1de

prevents charts from being reset when they are not initialized

Costa Tsaousis (ktsaou) committed Nov 1, 2017 at 00:14 UTC 682eea1defea55323805628609ad81c22658a8f5
1 file changed +4 -2
web/dashboard.js
+4 -2
@@ -6393,7 +6393,8 @@ var NETDATA = window.NETDATA || {};
6393 state.tmp.easyPieChartUnits.innerText = units;
6394 };
6395 state.legendShowUndefined = function() {
6396 - NETDATA.easypiechartClearSelection(state);
6396 + if(typeof state.tmp.easyPieChart_instance !== 'undefined')
6397 + NETDATA.easypiechartClearSelection(state);
6398 };
6399
6400 return true;
@@ -6766,7 +6767,8 @@ var NETDATA = window.NETDATA || {};
6767 }
6768 };
6769 state.legendShowUndefined = function() {
6769 - NETDATA.gaugeClearSelection(state);
6770 + if(typeof state.tmp.gauge_instance !== 'undefined')
6771 + NETDATA.gaugeClearSelection(state);
6772 };
6773
6774 return true;