Skip to content

Commit

Permalink
Compress slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Aug 21, 2013
1 parent 403a0dd commit e6551e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -8850,12 +8850,9 @@ d3 = function() {
};
function tickMethod(extent, count) {
var span = extent[1] - extent[0], target = span / count, i = d3.bisect(d3_time_scaleSteps, target);
if (i == d3_time_scaleSteps.length) return [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {
return i == d3_time_scaleSteps.length ? [ methods.year, d3_scale_linearTickRange(extent.map(function(d) {
return d / 31536e6;
}), count)[2] ];
if (!i) return [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ];
if (target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target) --i;
return methods[i];
}), count)[2] ] : !i ? [ d3_time_scaleMilliseconds, d3_scale_linearTickRange(extent, count)[2] ] : methods[target / d3_time_scaleSteps[i - 1] < d3_time_scaleSteps[i] / target ? i - 1 : i];
}
scale.nice = function(interval) {
var domain = scale.domain(), extent = d3_scaleExtent(domain), method = interval == null ? tickMethod(extent, 10) : typeof interval === "number" ? tickMethod(extent, interval) : [ interval ];
Expand Down
Loading

0 comments on commit e6551e5

Please sign in to comment.