Skip to content

Commit

Permalink
Fix overlapping auto-generated ticks on time scale
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Mar 6, 2019
1 parent 946c6d0 commit 5f31185
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scales/scale.time.js
Expand Up @@ -758,7 +758,7 @@ module.exports = Scale.extend({
var exampleLabel = me.tickFormatFunction(exampleTime, 0, [], format);
var tickLabelWidth = me.getLabelWidth(exampleLabel);
var innerWidth = me.isHorizontal() ? me.width : me.height;
var capacity = Math.floor(innerWidth / tickLabelWidth);
var capacity = Math.floor(innerWidth / tickLabelWidth) - 1;

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

0 comments on commit 5f31185

Please sign in to comment.