]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Radar controller now skips non-numerical coordinates
authorTanner Linsley <tannerlinsley@gmail.com>
Fri, 23 Oct 2015 22:36:00 +0000 (16:36 -0600)
committerTanner Linsley <tannerlinsley@gmail.com>
Fri, 23 Oct 2015 22:36:00 +0000 (16:36 -0600)
src/controllers/controller.radar.js

index ddbff5e1515dbf4fe1383eee6bdc46be7f3f87c5..1cc44e0d76fc774fa26f42f177f9b6c5716f9869 100644 (file)
                                        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,
                                        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) {