我有一个jQuery flot图表,代码如下:
$("table.statics").each(function() {
var colors = [];
$("table.statics thead th:not(:first)").each(function() {
colors.push($(this).css("color"));
});
$(this).graphTable({
series: 'columns',
position: 'replace',
height: '200px',
colors: colors
}, {
xaxis: {
tickSize: 1
}
});
});
这段代码可以正常运行,但是现在我希望当窗口大小改变时图表也能随之自适应大小。
怎样实现呢?我已经在文档中包含了jquery.flot.resize.js。
height: '200px'
,而不是"height:200px"
。 - knocte