From afc40e7dbced09a07e013bc442a92baee9309354 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Fri, 23 Oct 2015 16:36:00 -0600 Subject: [PATCH] Radar controller now skips non-numerical coordinates --- src/controllers/controller.radar.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/controller.radar.js b/src/controllers/controller.radar.js index ddbff5e15..1cc44e0d7 100644 --- a/src/controllers/controller.radar.js +++ b/src/controllers/controller.radar.js @@ -141,8 +141,6 @@ borderWidth: this.getDataset().borderWidth || this.chart.options.elements.line.borderWidth, borderColor: this.getDataset().borderColor || this.chart.options.elements.line.borderColor, fill: this.getDataset().fill !== undefined ? this.getDataset().fill : this.chart.options.elements.line.fill, // use the value from the this.getDataset() if it was provided. else fall back to the default - skipNull: this.getDataset().skipNull !== undefined ? this.getDataset().skipNull : this.chart.options.elements.line.skipNull, - drawNull: this.getDataset().drawNull !== undefined ? this.getDataset().drawNull : this.chart.options.elements.line.drawNull, // Scale scaleTop: scale.top, @@ -181,12 +179,13 @@ backgroundColor: point.custom && point.custom.backgroundColor ? point.custom.backgroundColor : helpers.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor, index, this.chart.options.elements.point.backgroundColor), borderColor: point.custom && point.custom.borderColor ? point.custom.borderColor : helpers.getValueAtIndexOrDefault(this.getDataset().pointBorderColor, index, this.chart.options.elements.point.borderColor), borderWidth: point.custom && point.custom.borderWidth ? point.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth, index, this.chart.options.elements.point.borderWidth), - skip: point.custom && point.custom.skip ? point.custom.skip : this.getDataset().data[index] === null, // Tooltip hitRadius: point.custom && point.custom.hitRadius ? point.custom.hitRadius : helpers.getValueAtIndexOrDefault(this.getDataset().hitRadius, index, this.chart.options.elements.point.hitRadius), }, }); + + point._model.skip = point.custom && point.custom.skip ? point.custom.skip : (isNaN(point._model.x) || isNaN(point._model.y)); }, updateBezierControlPoints: function() { helpers.each(this.getDataset().metaData, function(point, index) {