From ecf5801787abefaa6a47b17cb8b4180c35948437 Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Sat, 31 Oct 2015 16:07:57 -0600 Subject: [PATCH] call the custom callback in tooltip options --- src/core/core.tooltip.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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() { -- 2.47.3