From: Tanner Linsley Date: Sat, 31 Oct 2015 22:07:57 +0000 (-0600) Subject: call the custom callback in tooltip options X-Git-Tag: 2.0.0-beta1~41^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ecf5801787abefaa6a47b17cb8b4180c35948437;p=thirdparty%2FChart.js.git call the custom callback in tooltip options --- diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 40ec7e9d1..055d68eb8 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -136,7 +136,7 @@ }); }, - // Get the title + // Get the title // Args are: (tooltipItem, data) getTitle: function() { var beforeTitle = this._options.tooltips.callbacks.beforeTitle.apply(this, arguments), @@ -197,7 +197,7 @@ var ctx = this._chart.ctx; - var element = this._active[0], + var element = this._active[0], labelColors = [], tooltipPosition; @@ -255,6 +255,10 @@ labelColors: labelColors, }); + if (this._options.tooltips.custom) { + this._options.tooltips.custom.call(this, this._model); + } + return this; }, draw: function() {