Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Jun 19, 2019
1 parent eae2a3f commit 97f819d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/core.scale.js
Expand Up @@ -454,7 +454,7 @@ var Scale = Element.extend({

// Allow 3 pixels x2 padding either side for label readability
if (maxLabelWidth + 6 > tickWidth) {
tickWidth = maxWidth / (ticks.length - (options.offset ? 0.5 : 1));
tickWidth = maxWidth / (ticks.length - options.offset ? 0.5 : 1);
maxHeight = me.maxHeight - getTickMarkLength(options.gridLines)
- tickOpts.padding - getScaleLabelHeight(options.scaleLabel);
maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);
Expand Down Expand Up @@ -700,8 +700,8 @@ var Scale = Element.extend({
getPixelForTick: function(index) {
var me = this;
var offset = me.options.offset;
var tickWidth = 1 / Math.max((me._ticks.length - (offset ? 0 : 1)), 1);
var decimal = index * tickWidth + (offset ? tickWidth / 2 : 0);
var tickWidth = 1 / Math.max((me._ticks.length - offset ? 0 : 1), 1);
var decimal = index * tickWidth + offset ? tickWidth / 2 : 0;
return me.getPixelForDecimal(decimal);
},

Expand Down

0 comments on commit 97f819d

Please sign in to comment.