UNPKG

560 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var util_1 = require("@antv/util");
4var cat_1 = require("./cat");
5/**
6 * 计算时间分类的 ticks, 保头,保尾
7 * @param cfg 度量的配置项
8 * @returns 计算后的 ticks
9 */
10function calculateTimeCatTicks(cfg) {
11 var ticks = cat_1.default(cfg);
12 var lastValue = util_1.last(cfg.values);
13 if (lastValue !== util_1.last(ticks)) {
14 ticks.push(lastValue);
15 }
16 return ticks;
17}
18exports.default = calculateTimeCatTicks;
19//# sourceMappingURL=time-cat.js.map
\No newline at end of file