Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do not extend time scales (massive failure)

  • Loading branch information...
commit 39e42e5c5596197325996346d3cb5d4b184b634f 1 parent 76985a3
@paularmstrong paularmstrong authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/scales.js
View
10 lib/scales.js
@@ -80,13 +80,17 @@ function _getExtents(options, data, xType, yType) {
var axis = (i) ? 'y' : 'x',
extended;
extents[axis] = d3.extent(nData, function (d) { return d[axis]; });
- extended = _extendDomain(extents[axis]);
if (type === 'ordinal') {
return;
}
+
_.each([axis + 'Min', axis + 'Max'], function (minMax, i) {
+ if (type !== 'time') {
+ extended = _extendDomain(extents[axis]);
+ }
extents[axis][i] = (options.hasOwnProperty(minMax) &&
- options[minMax] !== null) ? options[minMax] : extended[i];
+ options[minMax] !== null) ? options[minMax]
+ : (type !== 'time') ? extended[i] : extents[axis][i];
});
});
@@ -96,7 +100,6 @@ function _getExtents(options, data, xType, yType) {
function xy(self, data, xType, yType) {
var o = self._options,
extents = _getExtents(o, data, xType, yType),
- extendedExtents = _extendDomain(extents),
scales = {},
horiz = [o.axisPaddingLeft, self._width],
vert = [self._height, o.axisPaddingTop],
@@ -111,7 +114,6 @@ function xy(self, data, xType, yType) {
scales[axis] = ordinal(data, axis, bounds);
break;
case 'linear':
-
scales[axis] = linear(extents[axis], bounds, axis);
break;
case 'exponential':
Please sign in to comment.
Something went wrong with that request. Please try again.