mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Tooltip titles now work in the line chart. Getting ever closer to being done
This commit is contained in:
parent
92776ce0ac
commit
edbb235668
@ -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: [{
|
||||||
|
@ -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,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user