Skip to content

Commit

Permalink
Fix axis line width when option is an array (chartjs#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 5ec60f2 commit d7da5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/core.scale.js
Original file line number Diff line number Diff line change
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 d7da5c5

Please sign in to comment.