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 1f63c38 commit ca5dfd2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/scales/scale.time.js
Expand Up @@ -790,6 +790,10 @@ module.exports = Scale.extend({
var size = me._getLabelSize(exampleLabel);
var capacity = Math.floor(me.isHorizontal() ? me.width / size.w : me.height / size.h);

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

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

0 comments on commit ca5dfd2

Please sign in to comment.