在同一页面上获取多个明细高图表才能正常工作 [英] Getting Multiple drilldown highcharts on same page to work

查看:45
本文介绍了在同一页面上获取多个明细高图表才能正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在2个具有不同ID的不同div容器中的同一页面上有2个向下钻取图表.

I have 2 drill down charts on the same page inside 2 different div containers with different ids.

父级可以正确渲染,但是当我尝试向下钻取第二张图表时,向下钻取操作将在第一张图表上进行.任何人都可以解耦这两个图表,并告诉我我在这里做错了什么.谢谢.

The parent level renders correctly but when i try to drill down the 2nd chart, the drill down operation takes place on the first chart. Can anyone decouple these 2 charts and tell me what am i doing wrong here. Thank you.

这是jfiddle链接: http://jsfiddle.net/ePg89/

here is the jfiddle link: http://jsfiddle.net/ePg89/

这是2个div:

    <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
<div id="container1" style="min-width: 400px; height: 400px; margin: 0 auto"></div>

推荐答案

因为您对两个图表都使用了 setChart()函数,却无法识别应更改哪个图表.我建议将参数添加到诸如chartID之类的函数中,然后您可以控制要更新的项目.

Because you use setChart() function for both chart and not recognise which chart should be changed. I advice to add parameter to function like chartID and then you can have control which item is updated.

http://jsfiddle.net/ePg89/1/

这篇关于在同一页面上获取多个明细高图表才能正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆