diff --git a/src/legacy/core_plugins/metrics/public/visualizations/components/flot_chart.js b/src/legacy/core_plugins/metrics/public/visualizations/components/flot_chart.js index 8e1ea8c9ae2a4..a50720dd1769a 100644 --- a/src/legacy/core_plugins/metrics/public/visualizations/components/flot_chart.js +++ b/src/legacy/core_plugins/metrics/public/visualizations/components/flot_chart.js @@ -65,9 +65,9 @@ class FlotChart extends Component { shutdownChart() { if (!this.plot) return; - $(this.target).unbind('plothover', this.props.plothover); - if (this.props.onMouseOver) $(this.target).on('plothover', this.handleMouseOver); - if (this.props.onMouseLeave) $(this.target).on('mouseleave', this.handleMouseLeave); + $(this.target).off('plothover', this.props.plothover); + if (this.props.onMouseOver) $(this.target).off('plothover', this.handleMouseOver); + if (this.props.onMouseLeave) $(this.target).off('mouseleave', this.handleMouseLeave); if (this.props.onBrush) $(this.target).off('plotselected', this.brushChart); this.plot.shutdown(); if (this.props.crosshair) {