DiMono
DiMono

Reputation: 3368

Is there a way to disable mouseover on highcharts entirely?

I'm building a website that uses highcharts. When I view the site on a mobile device, touching within the graph area pops up the tooltip, which prevents scrolling. I have tried all of the following, as suggested in other SO questions, without success:

$('#graph-container').click(function() { return false; });
$('#graph-container').children().click(function() { return false; });
chart.container.onclick = null;

plotOptions: {
    series: {
        enableMouseTracking: false // (stops tooltip but still blocks scrolling)
    }
}

For now I've added a second div that covers the graph on mobile devices, so the user touches the div instead of the graph, but that is more a workaround than a solution. I also tried removing all listeners from every element of the graph using things like $('svg').off() in Chrome's console, without any noticeable change in the graph's behaviour. Is there a way to do this that I'm missing?

Upvotes: 2

Views: 2202

Answers (2)

user2173033
user2173033

Reputation: 11

Highcharts JS v2.3.5 (2012-12-19)

Little HACK:

edit Line: 9026: this.setDOMEvents();

into: // this.setDOMEvents();

or delete it.

I hope it helped!

Upvotes: 1

Paweł Fus
Paweł Fus

Reputation: 45079

Here you can find simple Gist for that.

Also, in upcoming Highcharts 3.0 touch events should be upgraded and fixed similar issues. See roadmap: http://www.highcharts.com/support/roadmap

Upvotes: 0

Related Questions