Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. jQuery( document ).ready(function() {
  2.  
  3. var chartData = new Array([0]);
  4. showChart(chartData);
  5.  
  6. jQuery('#update').live("click", function() {
  7. var qtyArr = [];
  8.  
  9. jQuery('input[name=qty]').each(function(i) {
  10.  
  11. qty = Number(jQuery(this).val());
  12.  
  13. if(qty > 0){
  14. qtyArr.push(qty);
  15. }
  16.  
  17. });
  18.  
  19.  
  20.  
  21. chartData = new Array(
  22. [qtyArr]
  23. );
  24.  
  25. showChart(chartData);
  26. });
  27.  
  28. });
  29.  
  30. function showChart(chartData){
  31.  
  32. jQuery("#chart").jqBarGraph({
  33. data: chartData,
  34. width: 200,
  35. height: 300
  36. });
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement