Theme Inspinia
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dashboard-demo.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. $(function() {
  2. Morris.Area({
  3. element: 'morris-area-chart',
  4. data: [{
  5. period: '2010 Q1',
  6. iphone: 2666,
  7. ipad: null,
  8. itouch: 2647
  9. }, {
  10. period: '2010 Q2',
  11. iphone: 2778,
  12. ipad: 2294,
  13. itouch: 2441
  14. }, {
  15. period: '2010 Q3',
  16. iphone: 4912,
  17. ipad: 1969,
  18. itouch: 2501
  19. }, {
  20. period: '2010 Q4',
  21. iphone: 3767,
  22. ipad: 3597,
  23. itouch: 5689
  24. }, {
  25. period: '2011 Q1',
  26. iphone: 6810,
  27. ipad: 1914,
  28. itouch: 2293
  29. }, {
  30. period: '2011 Q2',
  31. iphone: 5670,
  32. ipad: 4293,
  33. itouch: 1881
  34. }, {
  35. period: '2011 Q3',
  36. iphone: 4820,
  37. ipad: 3795,
  38. itouch: 1588
  39. }, {
  40. period: '2011 Q4',
  41. iphone: 15073,
  42. ipad: 5967,
  43. itouch: 5175
  44. }, {
  45. period: '2012 Q1',
  46. iphone: 10687,
  47. ipad: 4460,
  48. itouch: 2028
  49. }, {
  50. period: '2012 Q2',
  51. iphone: 8432,
  52. ipad: 5713,
  53. itouch: 1791
  54. }],
  55. xkey: 'period',
  56. ykeys: ['iphone', 'ipad', 'itouch'],
  57. labels: ['iPhone', 'iPad', 'iPod Touch'],
  58. pointSize: 2,
  59. hideHover: 'auto',
  60. resize: true
  61. });
  62. Morris.Donut({
  63. element: 'morris-donut-chart',
  64. data: [{
  65. label: "Download Sales",
  66. value: 12
  67. }, {
  68. label: "In-Store Sales",
  69. value: 30
  70. }, {
  71. label: "Mail-Order Sales",
  72. value: 20
  73. }],
  74. resize: true
  75. });
  76. Morris.Bar({
  77. element: 'morris-bar-chart',
  78. data: [{
  79. y: '2006',
  80. a: 100,
  81. b: 90
  82. }, {
  83. y: '2007',
  84. a: 75,
  85. b: 65
  86. }, {
  87. y: '2008',
  88. a: 50,
  89. b: 40
  90. }, {
  91. y: '2009',
  92. a: 75,
  93. b: 65
  94. }, {
  95. y: '2010',
  96. a: 50,
  97. b: 40
  98. }, {
  99. y: '2011',
  100. a: 75,
  101. b: 65
  102. }, {
  103. y: '2012',
  104. a: 100,
  105. b: 90
  106. }],
  107. xkey: 'y',
  108. ykeys: ['a', 'b'],
  109. labels: ['Series A', 'Series B'],
  110. hideHover: 'auto',
  111. resize: true
  112. });
  113. });