@cryptotaxi247 / netdata-1 / commits / b476e2ffe

prevent easipiecharts and gauge charts from updating their units while the chart is not rendered

Costa Tsaousis (ktsaou) committed Oct 20, 2017 at 01:28 UTC b476e2ffe560ccac380f79227e3c06ebf55861dc
1 file changed +5 -2
web/dashboard.js
+5 -2
@@ -6357,7 +6357,8 @@ var NETDATA = window.NETDATA || {};
6357 }
6358
6359 state.legendSetUnitsString = function(units) {
6360 - state.tmp.easyPieChartUnits.innerText = units;
6360 + if(typeof state.tmp.easyPieChartUnits !== 'undefined')
6361 + state.tmp.easyPieChartUnits.innerText = units;
6362 };
6363 state.legendShowUndefined = function() {};
6364
@@ -6730,7 +6731,9 @@ var NETDATA = window.NETDATA || {};
6731 animate = false;
6732
6733 state.legendSetUnitsString = function(units) {
6733 - state.tmp.gaugeChartUnits.innerText = units;
6734 + if(typeof state.tmp.gaugeChartUnits !== 'undefined')
6735 + state.tmp.gaugeChartUnits.innerText = units;
6736 +
6737 state.tmp.___gaugeOld__.valueLabel = null;
6738 state.tmp.___gaugeOld__.minLabel = null;
6739 state.tmp.___gaugeOld__.maxLabel = null;