如何在Google图表wrap.setOptions中设置动态值?
我正在使用 ChartWrapper在我的 Google Chart 中,我需要在 wrap.setOptions
中使用动态值。
我当前的解决方案是这样的:
// This works
wrap.setOptions({'width':'300','height':'300','min': '2000'});
//This is NOT working. 'Min' value is ignored
var minimum = get_minimum_value();
wrap.setOptions({'width':'300','height':'300','min': minimum });
wrap.draw(data); <--- This is triggered after I set the options
如何在wrap.setOptions中添加动态值?
I'm using ChartWrapper in my Google Chart and I need to use dynamic values in the wrap.setOptions
.
My current solution is like this:
// This works
wrap.setOptions({'width':'300','height':'300','min': '2000'});
//This is NOT working. 'Min' value is ignored
var minimum = get_minimum_value();
wrap.setOptions({'width':'300','height':'300','min': minimum });
wrap.draw(data); <--- This is triggered after I set the options
How can I add dynamic values in the wrap.setOptions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
来自文档:
仅更改选项是不够的。您需要重新绘制图形
希望这有帮助
from the doc:
just changing the options won't be enough. You'll need to redraw the graphic
Hope this helps