bar.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. module.exports = {
  2. title: {
  3. text: 'Bar Chart',
  4. left: 'center',
  5. top: '3%',
  6. textStyle: {
  7. fontWeight: 'normal'
  8. }
  9. },
  10. toolbox: {
  11. top: '3%',
  12. feature: {
  13. magicType: {
  14. type: ['line', 'bar', 'stack', 'tiled']
  15. },
  16. restore: {},
  17. dataZoom: {},
  18. saveAsImage: {}
  19. }
  20. },
  21. grid: {
  22. left: '13%',
  23. right: '5%',
  24. bottom: '5%',
  25. textStyle: {
  26. fontWeight: 'normal'
  27. }
  28. },
  29. xAxis: {
  30. type: 'value'
  31. },
  32. yAxis: {
  33. type: 'category',
  34. data: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday','Sunday']
  35. },
  36. series: [
  37. {
  38. name:'直接访问',
  39. type:'bar',
  40. stack: '总量',
  41. label: {
  42. normal: {
  43. show: true,
  44. position: 'insideRight'
  45. }
  46. },
  47. data:[320, 302, 301, 334, 390, 330, 320]
  48. },
  49. {
  50. name:'邮件营销',
  51. type:'bar',
  52. stack: '总量',
  53. label: {
  54. normal: {
  55. show: true,
  56. position: 'insideRight'
  57. }
  58. },
  59. data:[120, 132, 101, 134, 90, 230, 210]
  60. },
  61. {
  62. name:'联盟广告',
  63. type:'bar',
  64. stack: '总量',
  65. label: {
  66. normal: {
  67. show: true,
  68. position: 'insideRight'
  69. }
  70. },
  71. data:[220, 182, 191, 234, 290, 330, 310]
  72. },
  73. {
  74. name:'视频广告',
  75. type:'bar',
  76. stack: '总量',
  77. label: {
  78. normal: {
  79. show: true,
  80. position: 'insideRight'
  81. }
  82. },
  83. data:[150, 212, 201, 154, 190, 330, 410]
  84. },
  85. {
  86. name:'搜索引擎',
  87. type:'bar',
  88. stack: '总量',
  89. label: {
  90. normal: {
  91. show: true,
  92. position: 'insideRight'
  93. }
  94. },
  95. data:[820, 832, 901, 934, 1290, 1330, 1320]
  96. }
  97. ]
  98. };