]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Tooltips now respect stacked ordering 2027/head
authorTanner Linsley <tannerlinsley@gmail.com>
Wed, 17 Feb 2016 19:42:29 +0000 (12:42 -0700)
committerTanner Linsley <tannerlinsley@gmail.com>
Wed, 17 Feb 2016 19:42:29 +0000 (12:42 -0700)
Tooltips detect the stacked scale property now, reversing when
appropriate

src/core/core.tooltip.js

index b99d05c8725133df502efc5ca9d8a3de82b448ce..ae3e2d58aa7aa5c9a0b4f4cd34607734cd61d350 100644 (file)
@@ -253,7 +253,7 @@ module.exports = function(Chart) {
                                                                datasetIndex: datasetIndex
                                                        });
                                                }
-                                       });
+                                       }, null, element._yScale.options.stacked);
 
                                        helpers.each(this._active, function(active) {
                                                if (active) {
@@ -262,7 +262,7 @@ module.exports = function(Chart) {
                                                                backgroundColor: active._view.backgroundColor
                                                        });
                                                }
-                                       });
+                                       }, null, element._yScale.options.stacked);
 
                                        tooltipPosition = this.getAveragePosition(this._active);
                                        tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
@@ -609,4 +609,4 @@ module.exports = function(Chart) {
                        }
                }
        });
-};
\ No newline at end of file
+};