From: Evert Timberg Date: Sun, 18 Nov 2018 08:45:41 +0000 (-0500) Subject: Fix axis line width when option is an array (#5751) X-Git-Tag: v2.8.0-rc.1~110 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6d9a39cb8e8661e1d6a733d4b77fb3f3238935a;p=thirdparty%2FChart.js.git Fix axis line width when option is an array (#5751) When the axis lineWidth setting is set to an array, use the first item when determining the size of the axis area. --- diff --git a/src/core/core.scale.js b/src/core/core.scale.js index f08c68fe9..28211b7f4 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -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;