line.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*=========================================================================================
  2. File Name: line.js
  3. Description: Flot line 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. // Line chart
  11. // ------------------------------
  12. $(window).on("load", function(){
  13. var options = {
  14. legend: {
  15. show: false
  16. },
  17. grid: {
  18. borderWidth: 1,
  19. borderColor: {
  20. top: "#e9e9e9",
  21. right:"transparent",
  22. bottom:"transparent",
  23. left:"transparent",
  24. },
  25. color: '#999',
  26. hoverable: true,
  27. minBorderMargin: 20,
  28. labelMargin: 10,
  29. margin: {
  30. top: 8,
  31. bottom: 20,
  32. left: 20
  33. },
  34. },
  35. series: {
  36. lines: {
  37. show: true,
  38. lineWidth: 0,
  39. fill: true,
  40. fillColor: { colors: [ { opacity: 0.8 }, { opacity: 0.1 } ] }
  41. },
  42. points: {
  43. show: false
  44. },
  45. },
  46. xaxis: {
  47. tickLength: 0,
  48. tickDecimals: 0,
  49. },
  50. yaxis: {
  51. tickSize: 50
  52. },
  53. colors: ['#00bfc7']
  54. };
  55. var data = [{
  56. "label": "Europe (EU27)",
  57. "data": [[2011, 0], [2012, 100], [2013, 75], [2014, 175], [2015, 125], [2016, 150]]
  58. }];
  59. $.plot("#line-chart", data, options);
  60. });