petko_stankoski
petko_stankoski

Reputation: 10713

Mouse out event on highcharts

I have a div that show on top of my highchart when I click on a point from the highchart. The highchart looks like this:

enter image description here

When I click on the blue point a div appears. I want when I move the cursor ou, the div to disappear, but all of the mouseOut events for the highcharts are called when the mouse leaves the graph, not the dot. How do I do this?

Upvotes: 0

Views: 1924

Answers (1)

MrDoughnut
MrDoughnut

Reputation: 116

Without an example it's hard to tell exactly, but I'm going to guess it's because you have stickyTracking on and/or a high hideDelay?

From http://api.highcharts.com/highcharts#plotOptions.series.stickyTracking:

When false, the mouseOut event on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip.

I've adapted an example to show that when stickyTracking is set to false, and hideDelay is set to 0, the tooltip disappears on mouseOut of a single data point:

    tooltip: {
        headerFormat: '<b>{series.name}</b><br />',
        pointFormat: 'x = {point.x}, y = {point.y}',
        hideDelay: 0
    },

    series: [{
        data: [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],
        pointStart: 1,
        stickyTracking: false
    }]

Example found here: http://jsfiddle.net/08wp6sk3/

Upvotes: 1

Related Questions