bar.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. export default {
  20. title: {
  21. text: 'Bar Chart',
  22. left: 'center',
  23. top: '3%',
  24. textStyle: {
  25. fontWeight: 'normal'
  26. }
  27. },
  28. toolbox: {
  29. top: '3%',
  30. feature: {
  31. magicType: {
  32. type: ['line', 'bar', 'stack', 'tiled']
  33. },
  34. restore: {},
  35. dataZoom: {},
  36. saveAsImage: {}
  37. }
  38. },
  39. grid: {
  40. left: '13%',
  41. right: '5%',
  42. bottom: '5%',
  43. textStyle: {
  44. fontWeight: 'normal'
  45. }
  46. },
  47. xAxis: {
  48. type: 'value'
  49. },
  50. yAxis: {
  51. type: 'category',
  52. data: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday','Sunday']
  53. },
  54. series: [
  55. {
  56. name:'直接访问',
  57. type:'bar',
  58. stack: '总量',
  59. label: {
  60. normal: {
  61. show: true,
  62. position: 'insideRight'
  63. }
  64. },
  65. data:[320, 302, 301, 334, 390, 330, 320]
  66. },
  67. {
  68. name:'邮件营销',
  69. type:'bar',
  70. stack: '总量',
  71. label: {
  72. normal: {
  73. show: true,
  74. position: 'insideRight'
  75. }
  76. },
  77. data:[120, 132, 101, 134, 90, 230, 210]
  78. },
  79. {
  80. name:'联盟广告',
  81. type:'bar',
  82. stack: '总量',
  83. label: {
  84. normal: {
  85. show: true,
  86. position: 'insideRight'
  87. }
  88. },
  89. data:[220, 182, 191, 234, 290, 330, 310]
  90. },
  91. {
  92. name:'视频广告',
  93. type:'bar',
  94. stack: '总量',
  95. label: {
  96. normal: {
  97. show: true,
  98. position: 'insideRight'
  99. }
  100. },
  101. data:[150, 212, 201, 154, 190, 330, 410]
  102. },
  103. {
  104. name:'搜索引擎',
  105. type:'bar',
  106. stack: '总量',
  107. label: {
  108. normal: {
  109. show: true,
  110. position: 'insideRight'
  111. }
  112. },
  113. data:[820, 832, 901, 934, 1290, 1330, 1320]
  114. }
  115. ]
  116. };