For reference, my complete doHum() function now looks like this (in v2.5.0beta 14/9/5). It caters for those (such as Cumulus users) who do not have the additional indoor data in the realtime file.
doHum = function (radio) {
//if rad isn't specified, just use existing value
var sel = (radio === undefined ? _hum.selected : radio.value),
popupImg, tip;
if (sel === 'out') {
_hum.value = extractDecimal(data.hum);
_hum.areas = [steelseries.Section(+extractDecimal(data.humTL), +extractDecimal(data.humTH), gauge.minMaxArea)];
_hum.title = strings.hum_title_out;
popupImg = 0;
} else {
_hum.value = extractDecimal(data.inhum);
if (data.inhumTL && data.inhumTH) {
_hum.areas = [steelseries.Section(+extractDecimal(data.inhumTL), +extractDecimal(data.inhumTH), gauge.minMaxArea)];
} else {
_hum.areas = [];
}
_hum.title = strings.hum_title_in;
popupImg = 1;
}
if (_hum.selected !== sel) {
_hum.selected = sel;
//Change gauge title
_gaugeHum.setTitleString(_hum.title);
if (config.showPopupGraphs) {
$('#imgtip4_img').attr('src', config.imgPathURL + config.tipImgs[4][popupImg] + _cacheDefeat);
}
}
_gaugeHum.setArea(_hum.areas);
_gaugeHum.setValueAnimated(_hum.value);
if (ddimgtooltip.showTips) {
//update tooltip
if (_hum.selected === 'out') {
tip = strings.hum_out_info + ':' +
'<br>' +
'- ' + strings.minimum_info + ': ' + extractDecimal(data.humTL) + '% ' + strings.at + ' ' + data.ThumTL +
' | ' + strings.maximum_info + ': ' + extractDecimal(data.humTH) + '% ' + strings.at + ' ' + data.ThumTH;
} else if (data.inhumTL && data.inhumTH) {
// we have indoor high/low data
tip = strings.hum_in_info + ':' +
'<br>' +
'- ' + strings.minimum_info + ': ' + extractDecimal(data.inhumTL) + '% ' + strings.at + ' ' + data.TinhumTL +
' | ' + strings.maximum_info + ': ' + extractDecimal(data.inhumTH) + '% ' + strings.at + ' ' + data.TinhumTH;
} else {
// no indoor high/low data
tip = strings.hum_in_info + ': ' + extractDecimal(data.inhum) + '%';
}
$('#imgtip4_txt').html(tip);
if (_refreshGraphs && config.showPopupGraphs && config.tipImgs[4][0] !== null) {
$('#imgtip4_img').attr('src', config.imgPathURL + config.tipImgs[4][popupImg] + _cacheDefeat);
}
}
},