mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 20:29:12 +02:00
Only draw the tooltip if it is defined (#7411)
This commit is contained in:
parent
f472a3f9a7
commit
e590a9792c
@ -1076,6 +1076,7 @@ export default {
|
|||||||
|
|
||||||
afterDraw(chart) {
|
afterDraw(chart) {
|
||||||
const tooltip = chart.tooltip;
|
const tooltip = chart.tooltip;
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
tooltip
|
tooltip
|
||||||
};
|
};
|
||||||
@ -1084,7 +1085,9 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tooltip) {
|
||||||
tooltip.draw(chart.ctx);
|
tooltip.draw(chart.ctx);
|
||||||
|
}
|
||||||
|
|
||||||
plugins.notify(chart, 'afterTooltipDraw', [args]);
|
plugins.notify(chart, 'afterTooltipDraw', [args]);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user