From 7723e4bcf51788ce75ce0ab63fc9aea4d05d1154 Mon Sep 17 00:00:00 2001 From: Martin Kleppmann Date: Tue, 5 May 2009 16:35:50 +0100 Subject: [PATCH] Remove spurious x axis labels when axis bounds set --- PlotKit/Layout.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PlotKit/Layout.js b/PlotKit/Layout.js index bff7ce5..fbb49e4 100644 --- a/PlotKit/Layout.js +++ b/PlotKit/Layout.js @@ -638,7 +638,9 @@ PlotKit.Layout.prototype._evaluateLineTicksForXAxis = function() { var pos = this.xscale * (xvalues[i] - this.minxval); // FIXME take xTickPrecision option into account? //this.xticks.push([pos, MochiKit.Format.roundToFixed(xvalues[i], prec)]); - this.xticks.push([pos, xvalues[i]]); + if ((pos >= 0) && (pos <= 1)) { + this.xticks.push([pos, xvalues[i]]); + } } } else {