【发布时间】:2019-04-19 14:43:12
【问题描述】:
According to the documentation,你可以Set the chart-specific events you want to listen to and the corresponding callback. 给出的示例使用select 工作正常(我已经设置了一个示例here。当我尝试使用 any 时出现问题其他图表类型。
从谷歌图表文档中,对于bar chart,我应该能够使用点击事件:
当我像这样添加点击事件时:
{
eventName: "click",
callback({}) {
console.log("clicked");
}
}
什么都没有发生,但 select 事件仍然有效。我设置了一个代码沙箱here 来演示这种行为。 animationfinish、onmouseover 以及我检查过的所有其他事件也会发生这种情况。
【问题讨论】:
标签: reactjs google-visualization