Skip to content

Commit

Permalink
Fix autoskip for first segment of chart (#6584)
Browse files Browse the repository at this point in the history
* Fix autoskip for first segment of chart

* Fix issue identified during review
  • Loading branch information
benmccann authored and etimberg committed Oct 24, 2019
1 parent 3cb308d commit 6c9f202
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ function skip(ticks, spacing, majorStart, majorEnd) {
}

next = start;

while (next < 0) {
count++;
next = Math.round(start + count * spacing);
}

for (i = Math.max(start, 0); i < end; i++) {
tick = ticks[i];
if (i === next) {
Expand Down

0 comments on commit 6c9f202

Please sign in to comment.