我想根据方向调整Jqplot图表的大小。我有下面的代码。它不工作。调整JQPlot图表问题的大小
var plot = $.jqplot('chartDivId', dataArray, options);
var w = parseInt($(".jqplot-yaxis").width(), 10) + parseInt($("#chartDivId").widt(), 10);
var h = parseInt($(".jqplot-title").height(), 10) + parseInt($(".jqplot-xaxis").height(), 10) +
parseInt($("#chartDivId").height(), 10);
$("#chartDivId").width(w).height(h);
plot.replot();
$(window).on("orientationchange",function(event){
alert("Orientation is: " + event.orientation);
plot.replot({ resetAxes: true });
});
如果注释掉下面的代码
/* var w = parseInt($(".jqplot-yaxis").width(), 10) + parseInt($("#chartDivId").width(), 10);
var h = parseInt($(".jqplot-title").height(), 10) + parseInt($(".jqplot-xaxis").height(), 10) + parseInt($("#chartDivId").height(), 10);
$("#chartDivId").width(w).height(h);
plot.replot();
*/
我不想注释掉上面的代码,我该怎么解决这个问题它是否行得通呢?
Thanks..Johnson
有人可以回答我的问题吗? – 2014-09-22 07:22:49
嗨@Johnson Tummalapalli,做了以下帮助你吗? – 2014-09-30 04:22:59
你好阿尼什,我很忙,没有机会检查它。我会检查并确认。谢谢你的帮助!! – 2014-10-01 11:15:00