From: Evert Timberg Date: Sat, 20 Feb 2016 13:44:25 +0000 (-0500) Subject: Fix radius 0 X-Git-Tag: v2.0.0~35^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F2041%2Fhead;p=thirdparty%2FChart.js.git Fix radius 0 --- diff --git a/src/elements/element.point.js b/src/elements/element.point.js index 12d09f557..90a97ca7b 100644 --- a/src/elements/element.point.js +++ b/src/elements/element.point.js @@ -60,14 +60,14 @@ module.exports = function(Chart) { return; } - if (vm.radius > 0 || vm.borderWidth > 0) { + if (!isNaN(vm.radius) && vm.radius > 0) { ctx.strokeStyle = vm.borderColor || Chart.defaults.global.defaultColor; - ctx.lineWidth = vm.borderWidth || Chart.defaults.global.elements.point.borderWidth; + ctx.lineWidth = helpers.getValueOrDefault(vm.borderWidth, Chart.defaults.global.elements.point.borderWidth); ctx.fillStyle = vm.backgroundColor || Chart.defaults.global.defaultColor; - var radius = vm.radius || Chart.defaults.global.elements.point.radius; + var radius = vm.radius; var xOffset; var yOffset;