Fix bubble chart tooltip callback to use correct labels (#3421)

Fix bubble chart tooltip callback to use correct label parsed from scales. Fixes #3029
This commit is contained in:
Evert Timberg 2016-10-06 08:54:50 -04:00 committed by GitHub
parent b64cab0046
commit 4d2772e313

View File

@ -31,7 +31,7 @@ module.exports = function(Chart) {
label: function(tooltipItem, data) {
var datasetLabel = data.datasets[tooltipItem.datasetIndex].label || '';
var dataPoint = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];
return datasetLabel + ': (' + dataPoint.x + ', ' + dataPoint.y + ', ' + dataPoint.r + ')';
return datasetLabel + ': (' + tooltipItem.xLabel + ', ' + tooltipItem.yLabel + ', ' + dataPoint.r + ')';
}
}
}