【发布时间】:2015-02-17 07:42:20
【问题描述】:
我使用 angular 指令在我的 HTML 中成功显示了一个浮点图表。 它看起来像:
<flot id="placeholder" dataset="dataset" options="options" height="300px" width="100%" style="width:100%;" ng-disabled="graphLoading" ng-class="{disabled:graphLoading}"></flot>
我观察窗口调整大小,然后希望调整浮动图表的大小,因为它不会自动这样做。
但是重置数据源不起作用,我有点不知道接下来要尝试什么。
window.onresize = function(event) {
console.log('refresh size of flot chart');
refreshDataset();
}
只是寻找方向或想法,我可以尝试调试或测试以找到解决方案。这里http://jsfiddle.net/9x7aJ/2029/似乎有一个jquery解决方案,但我正在尝试找到一个angularJS解决方案。
【问题讨论】:
标签: javascript angularjs html angularjs-directive