mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Only use active datasets in the tooltip body
This commit is contained in:
parent
bc41909e7a
commit
60f2426774
@ -222,7 +222,9 @@
|
||||
yLabel = [];
|
||||
|
||||
helpers.each(this._data.datasets, function(dataset, datasetIndex) {
|
||||
|
||||
if (!helpers.isDatasetVisible(dataset)) {
|
||||
return;
|
||||
}
|
||||
xLabel.push(element._xScale.getLabelForIndex(element._index, datasetIndex));
|
||||
yLabel.push(element._yScale.getLabelForIndex(element._index, datasetIndex));
|
||||
});
|
||||
@ -415,6 +417,7 @@
|
||||
|
||||
helpers.each(vm.body, function(body, i) {
|
||||
|
||||
|
||||
// Draw Legend-like boxes if needed
|
||||
if (this._options.tooltips.mode != 'single') {
|
||||
ctx.fillStyle = helpers.color(vm.labelColors[i].borderColor).alpha(vm.opacity).rgbString();
|
||||
|
Loading…
Reference in New Issue
Block a user