如何connect 两个chart?
Opened this issue · 3 comments
xiatianshitiancai commented
如何connect 两个chart?
lloydzhou commented
@xiatianshitiancai
刚刚参照connect的文档写了一个connect的demo
点击Legend或者tooltip的时候,上下两个图是可以联动的。
lloydzhou commented
其实有好几种不同的实现思路:
- Chart 组件支持一个 finished事件,可以在这个事件里面调用connect('group1')
- 可以像上面的demo一样在一个子组件里面通过inject拿到chart对象,再通过chart对象调用api
xiatianshitiancai commented
明白了。谢谢🙏。