Only draw the tooltip if it is defined (#7411)

This commit is contained in:
Evert Timberg
2020-05-26 20:03:18 -04:00
parent 521844704c
commit 25ab011ed4

View File

@@ -1076,6 +1076,7 @@ export default {
afterDraw(chart) {
const tooltip = chart.tooltip;
const args = {
tooltip
};
@@ -1084,7 +1085,9 @@ export default {
return;
}
tooltip.draw(chart.ctx);
if (tooltip) {
tooltip.draw(chart.ctx);
}
plugins.notify(chart, 'afterTooltipDraw', [args]);
},