Skip to content

Commit d7da5c5

Browse files
etimbergsimonbrunel
authored andcommitted
Fix axis line width when option is an array (chartjs#5751)
When the axis lineWidth setting is set to an array, use the first item when determining the size of the axis area.
1 parent 5ec60f2 commit d7da5c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/core.scale.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ module.exports = Element.extend({
708708

709709
var itemsToDraw = [];
710710

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

0 commit comments

Comments
 (0)