function encodeHTML(source) {
  return source == null ? '' : (source + '').replace(replaceReg, function (str, c) {
    return replaceMap[c];
  });
}
Make value user readable for tooltip and label.
"User readable":
    Try to not print programmer-specific text like NaN, Infinity, null, undefined.
    Avoid to display an empty string, which users can not recognize there is
    a value and it might look like a bug.