LeftRoundChart.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. export default {
  2. mName : "LeftRoundChart123",
  3. edit : "Echarts",
  4. keys : {
  5. dataInterface:{
  6. _name:"数据接口配置",
  7. url:"接口连接",
  8. params:{
  9. _name:"请求参数",
  10. value:"接口参数名称(需有父级数据关联)"
  11. },
  12. dataSource:{
  13. _name:"数据源结构关联",
  14. SourceKey:"源数据结构",
  15. AimsKey:"目标数据结构",
  16. keyRelated:"集合键关联"
  17. }
  18. },
  19. config: {
  20. title: {
  21. text: "中心标题",
  22. subtext: "副标题"
  23. },
  24. legend: {
  25. data: {
  26. _name: "图例列表",
  27. name: "对应数据名称"
  28. }
  29. },
  30. series: {
  31. data: {
  32. name: "名称",
  33. value: "数据",
  34. color: "颜色"
  35. }
  36. }
  37. }
  38. },
  39. option : {
  40. title: {
  41. x: '54%',
  42. y: '38%',
  43. textAlign:"center",
  44. textStyle: {
  45. fontWeight: 300,
  46. fontSize: 10,
  47. color: 'rgba(174, 220, 244, 1)',
  48. align:"center"
  49. },
  50. subtextStyle: {
  51. color:"rgba(174, 220, 244, 1)",
  52. fontSize:14,
  53. align:"center"
  54. }
  55. },
  56. legend: {
  57. left:"5%",
  58. right: "0%",
  59. top:"auto",
  60. bottom:"5%",
  61. itemHeight: 8,
  62. itemWidth: 16,
  63. itemGap: 10,
  64. textStyle: {
  65. fontSize: 12,
  66. color: '{c}'
  67. }
  68. },
  69. tooltip: {
  70. show: false
  71. },
  72. series: [
  73. {
  74. radius: [
  75. '35%', '60%'
  76. ],
  77. center: [
  78. '55%', '45%'
  79. ],
  80. type: 'pie',
  81. label: {
  82. normal: {
  83. show: false
  84. },
  85. emphasis: {
  86. show: false
  87. }
  88. },
  89. labelLine: {
  90. normal: {
  91. show: false
  92. },
  93. emphasis: {
  94. show: false
  95. }
  96. },
  97. animation: false,
  98. tooltip: {
  99. show: false
  100. },
  101. itemStyle: {
  102. normal: {
  103. color: 'rgba(68, 102, 244, 0.2)'
  104. }
  105. },
  106. data: [
  107. {
  108. value: 1
  109. }
  110. ]
  111. }, {
  112. radius: [
  113. '28%', '35%'
  114. ],
  115. center: [
  116. '55%', '45%'
  117. ],
  118. type: 'pie',
  119. label: {
  120. normal: {
  121. show: false
  122. },
  123. emphasis: {
  124. show: false
  125. }
  126. },
  127. labelLine: {
  128. normal: {
  129. show: false
  130. },
  131. emphasis: {
  132. show: false
  133. }
  134. },
  135. animation: false,
  136. tooltip: {
  137. show: false
  138. },
  139. itemStyle: {
  140. normal: {
  141. color: 'rgba(68, 102, 244, 0.2)'
  142. }
  143. },
  144. data: [
  145. {
  146. value: 1
  147. }
  148. ]
  149. }, {
  150. radius: [
  151. '35%', "55%"
  152. ],
  153. center: [
  154. '55%', '45%'
  155. ],
  156. type: 'pie',
  157. roseType: 'area',
  158. itemStyle: {
  159. normal: {
  160. color: params => params.data.color
  161. }
  162. },
  163. labelLine: {
  164. normal: {
  165. show: true,
  166. length: 4,
  167. length2: 4
  168. },
  169. emphasis: {
  170. show: true
  171. }
  172. },
  173. label: {
  174. normal: {
  175. show: true,
  176. formatter: "{d}%",
  177. textStyle: {
  178. fontSize: 12
  179. }
  180. },
  181. emphasis: {
  182. show: true
  183. }
  184. }
  185. }
  186. ]
  187. },
  188. data : {
  189. dataInterface:{
  190. url:"",
  191. params:[{
  192. value:"typeId"
  193. }],
  194. dataSource:[{
  195. SourceKey:"data.list",
  196. AimsKey:"data.config.legend.data",
  197. keyRelated:'name.name'
  198. },{
  199. SourceKey:"data.list",
  200. AimsKey:"data.config.series.2.data",
  201. keyRelated:'name.name|value.value|color.color'
  202. }],
  203. },
  204. config: {
  205. title: {
  206. text: '销售额(万元)',
  207. subtext:"8999"
  208. },
  209. legend: {
  210. data: [
  211. {
  212. name: '野谷米'
  213. }
  214. ]
  215. },
  216. series: [
  217. null,
  218. null, {
  219. data: [
  220. {
  221. value: 435,
  222. name: '野谷米',
  223. color: "rgba(76, 132, 255, 1)"
  224. }
  225. ]
  226. }
  227. ]
  228. }
  229. }
  230. }