Tooltip titles now work in the line chart. Getting ever closer to being done

This commit is contained in:
Evert Timberg 2015-05-31 20:16:04 -04:00
parent 92776ce0ac
commit edbb235668
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,9 @@
data: lineChartData, data: lineChartData,
options: { options: {
responsive: true, responsive: true,
hoverMode: 'label', hover: {
mode: 'label',
},
stacked: false, stacked: false,
scales: { scales: {
xAxes: [{ xAxes: [{

View File

@ -1598,7 +1598,7 @@
x: medianPosition.x, x: medianPosition.x,
y: medianPosition.y, y: medianPosition.y,
labels: labels, 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, legendColors: colors,
legendBackgroundColor: this._options.tooltips.multiKeyBackground, legendBackgroundColor: this._options.tooltips.multiKeyBackground,
}); });