var point = points[i];
point.y_top = NaN;
point.y_bottom = NaN;
- point.yval_minus = Dygraph.parseFloat(item[2][0]);
- point.yval_plus = Dygraph.parseFloat(item[2][1]);
+ point.yval_minus = Dygraph.DataHandler.parseFloat(item[2][0]);
+ point.yval_plus = Dygraph.DataHandler.parseFloat(item[2][1]);
}
};
for ( var i = 0; i < series.length; ++i) {
var item = series[i];
var yraw = item[1];
- var yval = yraw === null ? null : Dygraph.parseFloat(yraw);
+ var yval = yraw === null ? null : handler.parseFloat(yraw);
var point = {
x : NaN,
y : NaN,
- xval : Dygraph.parseFloat(item[0]),
+ xval : handler.parseFloat(item[0]),
yval : yval,
name : setName, // TODO(danvk): is this really necessary?
idx : i + boundaryIdStart
}
};
+/**
+ * Optimized replacement for parseFloat, which was way too slow when almost
+ * all values were type number, with few edge cases, none of which were strings.
+ * @param {?number} val
+ * @return {number}
+ */
+handler.parseFloat = function(val) {
+ // parseFloat(null) is NaN
+ if (val === null) {
+ return NaN;
+ }
+
+ // Assume it's a number or NaN. If it's something else, I'll be shocked.
+ return val;
+};
+
})();
}
};
-/**
- * Optimized replacement for parseFloat, which was way too slow when almost
- * all values were type number, with few edge cases, none of which were strings.
- */
-DygraphLayout.parseFloat_ = function(val) {
- // parseFloat(null) is NaN
- if (val === null) {
- return NaN;
- }
-
- // Assume it's a number or NaN. If it's something else, I'll be shocked.
- return val;
-};
-
DygraphLayout.prototype._evaluateLineTicks = function() {
var i, tick, label, pos;
this.xticks = [];