mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Tooltips now respect stacked ordering
Tooltips detect the stacked scale property now, reversing when appropriate
This commit is contained in:
parent
ee81d4a804
commit
50d0c98030
@ -253,7 +253,7 @@ module.exports = function(Chart) {
|
||||
datasetIndex: datasetIndex
|
||||
});
|
||||
}
|
||||
});
|
||||
}, null, element._yScale.options.stacked);
|
||||
|
||||
helpers.each(this._active, function(active) {
|
||||
if (active) {
|
||||
@ -262,7 +262,7 @@ module.exports = function(Chart) {
|
||||
backgroundColor: active._view.backgroundColor
|
||||
});
|
||||
}
|
||||
});
|
||||
}, null, element._yScale.options.stacked);
|
||||
|
||||
tooltipPosition = this.getAveragePosition(this._active);
|
||||
tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
|
||||
@ -609,4 +609,4 @@ module.exports = function(Chart) {
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user