From df3a67428f73bdf8239a3079c99c1d7ff3ec8080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 3 Nov 2020 21:43:32 +0100 Subject: [PATCH] Graph: Fixes event emit function error (#28795) --- public/app/plugins/panel/graph/graph_tooltip.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/graph/graph_tooltip.ts b/public/app/plugins/panel/graph/graph_tooltip.ts index bc04b92291b..805cf12d0cb 100644 --- a/public/app/plugins/panel/graph/graph_tooltip.ts +++ b/public/app/plugins/panel/graph/graph_tooltip.ts @@ -157,7 +157,7 @@ export default function GraphTooltip(this: any, elem: any, dashboard: any, scope plot.unhighlight(); } } - dashboard.events.$emit(new LegacyGraphHoverClearEvent()); + dashboard.events.publish(new LegacyGraphHoverClearEvent()); }); elem.bind('plothover', (event: any, pos: { panelRelY: number; pageY: number }, item: any) => { @@ -165,7 +165,7 @@ export default function GraphTooltip(this: any, elem: any, dashboard: any, scope // broadcast to other graph panels that we are hovering! pos.panelRelY = (pos.pageY - elem.offset().top) / elem.height(); - dashboard.events.$emit(new LegacyGraphHoverEvent({ pos: pos, panel: panel })); + dashboard.events.publish(new LegacyGraphHoverEvent({ pos: pos, panel: panel })); }); elem.bind('plotclick', (event: any, pos: any, item: any) => {