1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var util_1 = require("@antv/util");
|
4 | var cat_1 = require("./cat");
|
5 | /**
|
6 | * 计算时间分类的 ticks, 保头,保尾
|
7 | * @param cfg 度量的配置项
|
8 | * @returns 计算后的 ticks
|
9 | */
|
10 | function 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 | }
|
18 | exports.default = calculateTimeCatTicks;
|
19 | //# sourceMappingURL=time-cat.js.map |
\ | No newline at end of file |