Skip to content

Commit

Permalink
Fix autoskip for first segment of chart
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Oct 21, 2019
1 parent 2933bcf commit 1fa3768
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/core.scale.js
Expand Up @@ -305,7 +305,13 @@ function skip(ticks, spacing, majorStart, majorEnd) {
}

next = start;
for (i = Math.max(start, 0); i < end; i++) {

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

for (i = next; i < end; i++) {
tick = ticks[i];
if (i === next) {
tick._index = i;
Expand Down

0 comments on commit 1fa3768

Please sign in to comment.