Skip to content

Commit

Permalink
Account for options.offset
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed May 9, 2019
1 parent 8640cc4 commit 505576c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scales/scale.time.js
Expand Up @@ -799,6 +799,10 @@ module.exports = Scale.extend({
? (me.width - margins.left - margins.right) / size.w
: (me.height - margins.top - margins.bottom) / size.h);

if (me.options.offset) {
capacity--;
}

return capacity > 0 ? capacity : 1;
}
});
Expand Down

0 comments on commit 505576c

Please sign in to comment.