bar.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*=========================================================================================
  2. File Name: bar.js
  3. Description: Flot bar chart
  4. ----------------------------------------------------------------------------------------
  5. Item Name: Robust - Responsive Admin Theme
  6. Version: 1.2
  7. Author: PIXINVENT
  8. Author URL: http://www.themeforest.net/user/pixinvent
  9. ==========================================================================================*/
  10. // Bar chart
  11. // ------------------------------
  12. $(window).on("load", function(){
  13. var data = [ ["January", 10], ["February", 8], ["March", 4], ["April", 13], ["May", 17], ["June", 9] ];
  14. $.plot("#bar-chart", [ data ], {
  15. series: {
  16. bars: {
  17. show: true,
  18. barWidth: 0.6,
  19. align: "center",
  20. lineWidth: 0,
  21. fill: true,
  22. fillColor: { colors: [ { opacity: 0.2 }, { opacity: 0.8 } ] }
  23. }
  24. },
  25. xaxis: {
  26. mode: "categories",
  27. tickLength: 0
  28. },
  29. yaxis: {
  30. tickSize: 4
  31. },
  32. grid: {
  33. borderWidth: 1,
  34. borderColor: "transparent",
  35. color: '#999',
  36. minBorderMargin: 20,
  37. labelMargin: 10,
  38. margin: {
  39. top: 8,
  40. bottom: 20,
  41. left: 20
  42. },
  43. },
  44. colors: ['#00bfc7']
  45. });
  46. });