Skip to content

Commit 6c9f202

Browse files
benmccannetimberg
authored andcommitted
Fix autoskip for first segment of chart (#6584)
* Fix autoskip for first segment of chart * Fix issue identified during review
1 parent 3cb308d commit 6c9f202

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/core/core.scale.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ function skip(ticks, spacing, majorStart, majorEnd) {
305305
}
306306

307307
next = start;
308+
309+
while (next < 0) {
310+
count++;
311+
next = Math.round(start + count * spacing);
312+
}
313+
308314
for (i = Math.max(start, 0); i < end; i++) {
309315
tick = ticks[i];
310316
if (i === next) {

0 commit comments

Comments
 (0)