]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Don't draw bars that represent data that is not valid (null, undefined, or NaN) 1845/head
authoretimberg <evert.timberg@gmail.com>
Fri, 1 Jan 2016 00:32:03 +0000 (19:32 -0500)
committeretimberg <evert.timberg@gmail.com>
Fri, 1 Jan 2016 00:32:03 +0000 (19:32 -0500)
src/controllers/controller.bar.js

index 72e1fb9b70da47b1b9de4d878888f9fdab1494fe..696b67ad873a967b4126294fcb95c85a3e426979 100644 (file)
                draw: function(ease) {
                        var easingDecimal = ease || 1;
                        helpers.each(this.getDataset().metaData, function(rectangle, index) {
-                               rectangle.transition(easingDecimal).draw();
+                               var d = this.getDataset().data[index];
+                               if (d !== null && d !== undefined && !isNaN(d)) {
+                                       rectangle.transition(easingDecimal).draw();
+                               }
                        }, this);
                },