diff --git a/src/core/core.scale.js b/src/core/core.scale.js index b0bdc3cfdd3..534d3f2d63c 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -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); @@ -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); },