Skip to main content

How to set device height and width for a bar chart in android



I am using phonegap to build my app.I am using flot to create charts. here is my javascript code







<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>







In this code i am giving the width and height of the bar graph.I want to give device height and width.How to do that?


Comments