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

index f6c522838d0ce634d0eefc593872e1cb5d17958a..d0d653870e66aa72760b21c1c14c000b5e1db99c 100644 (file)
                                        backgroundColor: point.custom && point.custom.backgroundColor ? point.custom.backgroundColor : helpers.getValueAtIndexOrDefault(this.getDataset().backgroundColor, index, this.chart.options.elements.point.backgroundColor),
                                        borderColor: point.custom && point.custom.borderColor ? point.custom.borderColor : helpers.getValueAtIndexOrDefault(this.getDataset().borderColor, index, this.chart.options.elements.point.borderColor),
                                        borderWidth: point.custom && point.custom.borderWidth ? point.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().borderWidth, 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));
+
                        point.pivot();
                },