UNPKG

615 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.d3TimeNice = void 0;
4const find_tick_interval_1 = require("./find-tick-interval");
5const d3TimeNice = (min, max, count, interval, utc) => {
6 const r = min > max;
7 const lo = r ? max : min;
8 const hi = r ? min : max;
9 const [tickInterval, step] = (0, find_tick_interval_1.findTickInterval)(lo, hi, count, interval, utc);
10 const domain = [tickInterval.floor(lo, step), tickInterval.ceil(hi, step)];
11 return r ? domain.reverse() : domain;
12};
13exports.d3TimeNice = d3TimeNice;
14//# sourceMappingURL=d3-time-nice.js.map
\No newline at end of file