mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
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:
parent
b64cab0046
commit
4d2772e313
@ -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 + ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user