如何完全禁用highcharts的鼠标/手指交互

AGa*_*yer 2 highcharts

我搜索了文档,但找不到讨论这个的帖子.

我目前正在开发一个既适用于移动设备又适用于PC浏览器的项目.由于iPhone上的屏幕非常小,我想禁用它上面的高图交互(即使向下滚动页面,交互也会失败).

我想问一下是否有像"hasInteraction:false"这样的参数.

感谢您的任何提示!

更新:

我尝试了Ricardo Lohmann的代码,它正在努力禁用鼠标跟踪:

plotOptions: {
    series: {
        enableMouseTracking: false
    }
}
Run Code Online (Sandbox Code Playgroud)

但是在移动设备上,它仍然会阻止我的手指向下滚动.我在谷歌上搜索并发现了一个帖子:http://blog.rafael.jp/post/2958719820/div-mouseenabled-false但仍然不能正常工作(允许图表不阻挡我的手指滚动)

Ric*_*ann 5

plotOptions: {
    series: {
        enableMouseTracking: false
    }
}
Run Code Online (Sandbox Code Playgroud)

演示


sup*_*jos 5

我也在寻找解决方案.
更准确地说,即使手指开始在图表上拖动,我也想启用页面滚动.我仍然喜欢触摸数据点打开工具提示.

您可能对v3.0.4中的提交感兴趣"添加了新选项,tooltip.followTouchMove ...".我还是要试试.我在iPhone模拟器上尝试了它,它的工作原理:

HTML页面中的某个位置:

<script type="text/javascript" src="//code.highcharts.com/3.0.1/highcharts.js"></script>
Run Code Online (Sandbox Code Playgroud)

稍后,当您在JavaScript代码中创建图表时:

$('#chartdiv').highcharts({
    chart : {
        type : 'line',  // e.g. for a line chart
        zoomType: null,  // this is already the default, it's just to stress what's said in commit comments and make code "speak"
    },
    tooltip: {
        followPointer: false,  // this is already the default, it's just to stress what's said in commit comments and make code "speak"
        followTouchMove: false,  // this is already the default, it's just to stress what's said in commit comments and make code "speak"
    },
    // other options...
});
Run Code Online (Sandbox Code Playgroud)