FelipeOdoni

Members
  • Content count

    1
  • Joined

  • Last visited

Everything posted by FelipeOdoni

  1. Hi All. I am using FusionCharts XT 3.3.1-sr2.19840 to render a javascript chart and I get the following error: Cannot read property 'width' of undefined The snippet code that throws this error is (FusionCharts.HC.js): getSmartText: function (d, e, q, l) { if (!this.init) return !1; if (d === void 0 || d === null) d = ""; var v = { text: d, maxWidth: e, maxHeight: q, width: null, height: null, oriTextWidth: null, oriTextHeight: null, oriText: d, isTruncated: !1 }, i = !1, k, b, f, a, g = -1, c = -1, t = -1, x = this.container, J = this.context, ja = g = 0, la, r = [], w = 0, u = this.showNoEllipses ? "" : "...", g = this.lineHeight, V = function (a) { for (var a = a.replace(/^\s\s*/, ""), b = /\s/, g = a.length; b.test(a.charAt(g -= 1)); return a.slice(0, g + 1) }; la = J ? function (a) { return J.measureText(a).width; } : function (a) { x.innerHTML = a; return x.offsetWidth }; In some situations (generally when a = "") the call J.measureText (a) returns undefined and the next call (.width) throws the error. I could not identify why this call returns undefined, or why a = "". Can someone help me with this? Thanks in advance, Felipe Odoni