diff --git a/package.json b/package.json index 59f3c78..8fe1b98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/scale", - "version": "0.4.14", + "version": "0.4.15", "description": "Toolkit for mapping abstract data into visual representation.", "license": "MIT", "main": "lib/index.js", diff --git a/src/utils/time-interval.ts b/src/utils/time-interval.ts index 2ba6cc5..170825b 100644 --- a/src/utils/time-interval.ts +++ b/src/utils/time-interval.ts @@ -63,8 +63,7 @@ export function createInterval(duration: number, floorish: TimeProcess, offseti: const ticks = []; const roundStep = Math.floor(step); const t = shouldAdjust ? ceil(start, step) : ceil(start); - let index = 0; - for (let i = t; +i < +stop && index < 10; offseti(i, roundStep), floori(i), index += 1) { + for (let i = t; i < stop; offseti(i, roundStep), floori(i)) { ticks.push(new Date(+i)); } return ticks;