我有一个带有以下代码的jQuery flot图表: $("table.statics").each(function() { var colors = []; $("table.statics thead th:not(:first)").each(function() { colors.push($(this).css("color")); }); $(this).graphTable({ series: 'colum
$("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.
只需删除“身高:200px”并给它“身高:40%”或你想要的东西.在给出百分比时,确保在调整窗口大小时每次计算大小.