diff --git a/packages/core/src/components/essentials/tooltip.ts b/packages/core/src/components/essentials/tooltip.ts index d690233433..c74db0f191 100644 --- a/packages/core/src/components/essentials/tooltip.ts +++ b/packages/core/src/components/essentials/tooltip.ts @@ -87,6 +87,12 @@ export class Tooltip extends Component { Events.Tooltip.HIDE, this.handleHideTooltip ); + + // listen to chart-mouseout event to hide the tooltip + this.services.events.addEventListener( + Events.Chart.MOUSEOUT, + this.handleHideTooltip + ); } removeTooltipEventListener() { @@ -104,6 +110,12 @@ export class Tooltip extends Component { Events.Tooltip.HIDE, this.handleHideTooltip ); + + // remove the listener on chart-mouseout + this.services.events.removeEventListener( + Events.Chart.MOUSEOUT, + this.handleHideTooltip + ); } getItems(e: CustomEvent) {