Only use active datasets in the tooltip body

This commit is contained in:
Tanner Linsley 2015-10-23 12:40:56 -06:00
parent bc41909e7a
commit 60f2426774

View File

@ -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();