Monday, August 6, 2012

Creating bar chart using jquery.

If you want to create a bar chart using jquery, css and html. use the progressbar component of Jquery and edit the CSS as per your requirement. You can manipulate the width of the bar chart using the progressbar js. This is an excellent example: http://jqueryui.com/demos/progressbar/.
You can achieve the the functionality of progress bar as well as bar chart with same component which will inturn save the loading time of your page.

Sample code:
<script>
 $(function() {
  $( "#progressbar" ).progressbar({
   value: 37
  });
 });
 </script>



<div class="demo">

<div id="progressbar"></div>

</div><!-- End demo div -->



<div style="display: none;" class="demo-description">
<p>Default determinate progress bar.</p>
</div><!-- End demo-description -->

No comments:

Post a Comment