Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在初始绘制后更改图表的属性(例如,使用 HTML 按钮更改 ChartRangeFilter 的范围)。我很难找到如何访问页面上的图表对象,但我确信它在window命名空间中的某处可用。
window
我现在明白了。将图表绑定到局部变量,并在范围内附加处理程序:
var chart = new google.visualization.PieChart(...); $('body').on('click', 'button.update', function() { chart.draw(...); }