如何在Amcharts 5中单击传说中的事件?
同样解决的问题在这里 https://www.amcharts.com/docs/v4/tutorials/activate-deactivate-a-pie-a-pie-slice-slice-slice-on-legend-click-click-instead-click-instead-og-toggling/ 我需要具有相同的效果,但在版本5中无效
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,这是一个非常琐碎的问题,但是花了一段时间才弄清楚这一点,所以你去了:
您需要做的就是在听众之后设置传奇数据。
正如下面的演示中所述的
在所有事件设置在模板上之后设置Legend数据很重要,否则将不会复制事件
演示:https://www.amcharts.com/demos/highlighting-line-chart-series-on-legend -Hover/
示例
I had the same problem and it was a really trivial issue, but it took a while to figure this out so here you go:
All you need to do is set the legend data AFTER your listener.
As commented in the demo below
It's is important to set legend data after all the events are set on template, otherwise events won't be copied
Demo: https://www.amcharts.com/demos/highlighting-line-chart-series-on-legend-hover/
Example