Permalink
Browse files

Remove spurious x axis labels when axis bounds set

  • Loading branch information...
Martin Kleppmann
Martin Kleppmann committed May 5, 2009
1 parent f478264 commit 7723e4bcf51788ce75ce0ab63fc9aea4d05d1154
Showing with 3 additions and 1 deletion.
  1. +3 −1 PlotKit/Layout.js
View
@@ -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 {

0 comments on commit 7723e4b

Please sign in to comment.