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

index 35e7f3c3a6aea82e93e4495ffb228cfd5e1b4803..e034e325cdf30ac8244c93dadaae5f03bd46813b 100644 (file)
                                        borderDashOffset: line.custom && line.custom.borderDashOffset ? line.custom.borderDashOffset : (this.getDataset().borderDashOffset || this.chart.options.elements.line.borderDashOffset),
                                        borderJoinStyle: line.custom && line.custom.borderJoinStyle ? line.custom.borderJoinStyle : (this.getDataset().borderJoinStyle || this.chart.options.elements.line.borderJoinStyle),
                                        fill: line.custom && line.custom.fill ? line.custom.fill : (this.getDataset().fill !== undefined ? this.getDataset().fill : this.chart.options.elements.line.fill),
-                                       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: yScale.top,
                                        scaleBottom: yScale.bottom,
                                        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() {