Javascript 如何调整实时flot图表的大小?
当我调整浏览器大小时,是否有js库或方法来调整实时flot图表的大小?我的图表是这样的。这个例子和我的图表的区别在于它被放在一个表格中 编辑:Javascript 如何调整实时flot图表的大小?,javascript,browser,resize,flot,Javascript,Browser,Resize,Flot,当我调整浏览器大小时,是否有js库或方法来调整实时flot图表的大小?我的图表是这样的。这个例子和我的图表的区别在于它被放在一个表格中 编辑: 我发现,jquery.flot.resize.js存在并且做了我想要的事情。但是flot在表中的位置会影响库功能吗 您可以使用相对单位相对于窗口大小调整元素大小,其中一个单位为%。在%中设置元素的宽度和高度。它将根据父元素的%年龄大小调整此元素的大小。范例 Resize window to see results! <div style=" p
我发现,
jquery.flot.resize.js
存在并且做了我想要的事情。但是flot在表中的位置会影响库功能吗 您可以使用相对单位相对于窗口大小调整元素大小,其中一个单位为%。在%中设置元素的宽度和高度。它将根据父元素的%年龄大小调整此元素的大小。范例
Resize window to see results!
<div style="
position: absolute;
width: 50%;
height: 50%;
background: red;">
Resizeable DIV
</div>
调整窗口大小以查看结果!
可调整大小的DIV
此处给出的演示我将问题的解决方案张贴在此处。也许有人会需要它。 我使用了
jquery.flot.resize.js
和下一个代码:
<table cellpadding="0" cellspacing="0" class="floatedTable">
<tr>
<td class="auto-style15">
<div id="content">
<div class="demo-container" style="position:absolute; width:75%; height:80%; top: 57px; left: 64px;">
<div id="placeholder" class="demo-placeholder" style="position:absolute; width:95%; height:95%; top: 17px; left: 24px;"></div>
</div>
</div>
</td>
</tr>
</table>
对不起,这不是我要找的。请参阅已编辑的问题。没问题,可以:)
.floatedTable {
width: 100%;
height:100%;
}