2012-01-31 99 views
0

我正在使用phonegap構建我的app.I使用flot創建圖表。 這裏是我的javascript代碼如何在android中設置條形圖的設備高度和寬度

<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript" src="flot/jquery.js"></script> 
<script type="text/javascript" src="flot/jquery.flot.js"></script> 
<script type="text/javascript" src="flot/jquery.flot.stack.js"></script> 
<script type="text/javascript" src="flot/jquery.flot.pie.js"></script>  
</head> 
<body>  
<div id="pie-example" style="width:300px;height:200px;"></div> 
<script type="text/javascript" src="pie_chart.js"></script> 
</body> 
</html> 

在這段代碼我給graph.I想給設備的高度和width.How做到這一點的酒吧的寬度和高度?

回答

0

我明白了。我們必須設置這樣的視口

<meta name="viewport" content="width=default-width; user-scalable=no" /> 
+0

你能更具體嗎?你想給條形圖提供與設備相同的尺寸嗎?我現在有同樣的問題http://stackoverflow.com/questions/9895663/flot-on-android-how-to-fit-the-screen-size – Yang 2012-03-28 00:22:44

相關問題