From eabdbab89e90309172755ec851c57a6f0ee9c558 Mon Sep 17 00:00:00 2001 From: etimberg Date: Mon, 31 Aug 2015 21:49:51 -0400 Subject: [PATCH] If the element has a label, use that in the tooltip instead of the dataset label. --- src/core/core.tooltip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 90539681a..3f4a892c4 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -80,7 +80,7 @@ // These variables are available in the template function. Add others here element: this._active[0], value: this._data.datasets[this._active[0]._datasetIndex].data[this._active[0]._index], - label: this._data.labels ? this._data.labels[this._active[0]._index] : '', + label: this._active[0]._model.label !== undefined ? this._active[0]._model.label : this._data.labels ? this._data.labels[this._active[0]._index] : '', }), });