From: Evert Timberg Date: Mon, 1 Jun 2015 00:16:04 +0000 (-0400) Subject: Tooltip titles now work in the line chart. Getting ever closer to being done X-Git-Tag: v2.0-alpha~2^2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edbb2356680f5c2726e9d6b7582a54b46cdb3578;p=thirdparty%2FChart.js.git Tooltip titles now work in the line chart. Getting ever closer to being done --- diff --git a/samples/line.html b/samples/line.html index 7655abe7a..2a1794284 100644 --- a/samples/line.html +++ b/samples/line.html @@ -50,7 +50,9 @@ data: lineChartData, options: { responsive: true, - hoverMode: 'label', + hover: { + mode: 'label', + }, stacked: false, scales: { xAxes: [{ diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 3a5adf38a..e9b27caf9 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -1598,7 +1598,7 @@ x: medianPosition.x, y: medianPosition.y, labels: labels, - title: this._active.length ? this._active[0].label : '', + title: this._data.labels && this._data.labels.length ? this._data.labels[this._active[0]._index] : '', legendColors: colors, legendBackgroundColor: this._options.tooltips.multiKeyBackground, });