point = arr[i];
}
+ // FIXME: The 'canvasy != canvasy' test here catches NaN values but the test
+ // doesn't catch Infinity values. Could change this to
+ // !isFinite(point.canvasy), but I assume it avoids isNaN for performance?
if (point.canvasy === null || point.canvasy != point.canvasy) {
if (stepPlot && prevCanvasX !== null) {
// Draw a horizontal line to the start of the missing data
DygraphLayout._calcYNormal = function(axis, value, logscale) {
if (logscale) {
- return 1.0 - ((Dygraph.log10(value) - Dygraph.log10(axis.minyval)) * axis.ylogscale);
+ var x = 1.0 - ((Dygraph.log10(value) - Dygraph.log10(axis.minyval)) * axis.ylogscale);
+ return isFinite(x) ? x : NaN;
} else {
return 1.0 - ((value - axis.minyval) * axis.yscale);
}