]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Bail out, same as the x axis
authorEvert Timberg <evert.timberg@gmail.com>
Thu, 12 Nov 2015 02:40:29 +0000 (21:40 -0500)
committerEvert Timberg <evert.timberg@gmail.com>
Thu, 12 Nov 2015 02:40:29 +0000 (21:40 -0500)
src/core/core.scale.js

index edf807de07e882eda14592438b25df8d43fd4938..f40f6fa2d53447afa5b482b2505bbb888ba8161f 100644 (file)
                                        var xTickEnd = this.options.position == "right" ? this.left + 5 : this.right;
 
                                        helpers.each(this.ticks, function(label, index) {
+                                               // If the callback returned a null or undefined value, do not draw this line
+                                               if (label === undefined || label === null) {
+                                                       return;
+                                               }
+
                                                var yLineValue = this.getPixelForTick(index); // xvalues for grid lines
 
                                                if (this.options.gridLines.show) {