data.ts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. export const mapData: any = [
  2. {
  3. name: '北京',
  4. value: Math.round(Math.random() * 1000),
  5. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  6. },
  7. {
  8. name: '天津',
  9. value: Math.round(Math.random() * 1000),
  10. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  11. },
  12. {
  13. name: '上海',
  14. value: Math.round(Math.random() * 1000),
  15. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  16. },
  17. {
  18. name: '重庆',
  19. value: Math.round(Math.random() * 1000),
  20. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  21. },
  22. {
  23. name: '河北',
  24. value: Math.round(Math.random() * 1000),
  25. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  26. },
  27. {
  28. name: '河南',
  29. value: Math.round(Math.random() * 1000),
  30. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  31. },
  32. {
  33. name: '云南',
  34. value: Math.round(Math.random() * 1000),
  35. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  36. },
  37. {
  38. name: '辽宁',
  39. value: Math.round(Math.random() * 1000),
  40. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  41. },
  42. {
  43. name: '黑龙江',
  44. value: Math.round(Math.random() * 1000),
  45. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  46. },
  47. {
  48. name: '湖南',
  49. value: Math.round(Math.random() * 1000),
  50. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  51. },
  52. {
  53. name: '安徽',
  54. value: Math.round(Math.random() * 1000),
  55. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  56. },
  57. {
  58. name: '山东',
  59. value: Math.round(Math.random() * 1000),
  60. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  61. },
  62. {
  63. name: '新疆',
  64. value: Math.round(Math.random() * 1000),
  65. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  66. },
  67. {
  68. name: '江苏',
  69. value: Math.round(Math.random() * 1000),
  70. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  71. },
  72. {
  73. name: '浙江',
  74. value: Math.round(Math.random() * 1000),
  75. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  76. },
  77. {
  78. name: '江西',
  79. value: Math.round(Math.random() * 1000),
  80. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  81. },
  82. {
  83. name: '湖北',
  84. value: Math.round(Math.random() * 1000),
  85. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  86. },
  87. {
  88. name: '广西',
  89. value: Math.round(Math.random() * 1000),
  90. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  91. },
  92. {
  93. name: '甘肃',
  94. value: Math.round(Math.random() * 1000),
  95. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  96. },
  97. {
  98. name: '山西',
  99. value: Math.round(Math.random() * 1000),
  100. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  101. },
  102. {
  103. name: '内蒙古',
  104. value: Math.round(Math.random() * 1000),
  105. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  106. },
  107. {
  108. name: '陕西',
  109. value: Math.round(Math.random() * 1000),
  110. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  111. },
  112. {
  113. name: '吉林',
  114. value: Math.round(Math.random() * 1000),
  115. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  116. },
  117. {
  118. name: '福建',
  119. value: Math.round(Math.random() * 1000),
  120. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  121. },
  122. {
  123. name: '贵州',
  124. value: Math.round(Math.random() * 1000),
  125. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  126. },
  127. {
  128. name: '广东',
  129. value: Math.round(Math.random() * 1000),
  130. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  131. },
  132. {
  133. name: '青海',
  134. value: Math.round(Math.random() * 1000),
  135. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  136. },
  137. {
  138. name: '西藏',
  139. value: Math.round(Math.random() * 1000),
  140. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  141. },
  142. {
  143. name: '四川',
  144. value: Math.round(Math.random() * 1000),
  145. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  146. },
  147. {
  148. name: '宁夏',
  149. value: Math.round(Math.random() * 1000),
  150. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  151. },
  152. {
  153. name: '海南',
  154. value: Math.round(Math.random() * 1000),
  155. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  156. },
  157. {
  158. name: '台湾',
  159. value: Math.round(Math.random() * 1000),
  160. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  161. },
  162. {
  163. name: '香港',
  164. value: Math.round(Math.random() * 1000),
  165. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  166. },
  167. {
  168. name: '澳门',
  169. value: Math.round(Math.random() * 1000),
  170. tipData: [Math.round(Math.random() * 1000), Math.round(Math.random() * 1000)],
  171. },
  172. ];
  173. export const getLineData = (() => {
  174. const category: any[] = [];
  175. let dottedBase = +new Date();
  176. const lineData: any[] = [];
  177. const barData: any[] = [];
  178. for (let i = 0; i < 20; i++) {
  179. const date = new Date((dottedBase += 1000 * 3600 * 24));
  180. category.push([date.getFullYear(), date.getMonth() + 1, date.getDate()].join('-'));
  181. const b = Math.random() * 200;
  182. const d = Math.random() * 200;
  183. barData.push(b);
  184. lineData.push(d + b);
  185. }
  186. return { barData, category, lineData };
  187. })();