方向正常,但数据大小不适合屏幕。
function doOnOrientationChange()
{
var hhei= 0;
switch(window.orientation)
{
case -90:
hhei= ($(document).height())*2.0/4;
alert("-90:"+hhei);
chartcreator(ticks,s1,s2,legendEquipments,hhei);
break;
case 90:
hhei= ($(document).height())*2.0/4;
alert("90:"+hhei);
chartcreator(ticks,s1,s2,legendEquipments,hhei);
break;
case 0:
hhei= ($(document).height())*2.0/4;
alert("0:"+hhei);
chartcreator(ticks,s1,s2,legendEquipments,hhei);
break;
case 180:
hhei= ($(document).height())*2.0/4;
alert("180:"+hhei);
chartcreator(ticks,s1,s2,legendEquipments,hhei);
break;
}
}
90' 显示垂直布局,180' 显示水平布局。我不知道如何解决它