Skip to content

Commit

Permalink
Fix axis line width when option is an array (#5751)
Browse files Browse the repository at this point in the history
When the axis lineWidth setting is set to an array, use the first item when determining the size of the axis area.
  • Loading branch information
etimberg authored and simonbrunel committed Nov 18, 2018
1 parent ab06831 commit f6d9a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/core.scale.js
Expand Up @@ -708,7 +708,7 @@ module.exports = Element.extend({

var itemsToDraw = [];

var axisWidth = me.options.gridLines.lineWidth;
var axisWidth = helpers.valueAtIndexOrDefault(me.options.gridLines.lineWidth, 0);
var xTickStart = options.position === 'right' ? me.left : me.right - axisWidth - tl;
var xTickEnd = options.position === 'right' ? me.left + tl : me.right;
var yTickStart = options.position === 'bottom' ? me.top + axisWidth : me.bottom - tl - axisWidth;
Expand Down

0 comments on commit f6d9a39

Please sign in to comment.