config.js 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. /*
  2. * uCharts组件 默认配置文件,如有修改,更新前请备份此文件!!
  3. * Copyright (c) 2021 QIUN秋云 https://www.ucharts.cn All rights reserved.
  4. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  5. *
  6. * uCharts官方网站
  7. * https://www.uCharts.cn
  8. *
  9. * 开源地址:
  10. * https://gitee.com/uCharts/uCharts
  11. *
  12. * uni-app插件市场地址:
  13. * http://ext.dcloud.net.cn/plugin?id=271
  14. *
  15. */
  16. module.exports = {
  17. "type":["pie","ring","rose","word","funnel","map","arcbar","line","column","area","radar","gauge","candle","mix","point","bubble"],
  18. "categories":["line","column","area","radar","gauge","candle","mix","point","bubble"],
  19. //以上数据请勿改动,下面是自定义默认配置,请添加项目所需的个性配置
  20. "pie":{
  21. type: 'pie',
  22. padding:[15,15,0,15],
  23. legend:{
  24. show:true,
  25. padding:5,
  26. lineHeight:11,
  27. margin:0,
  28. },
  29. dataLabel: true,
  30. extra: {
  31. pie: {
  32. border:true,
  33. borderColor:'#FFFFFF',
  34. borderWidth:3
  35. }
  36. }
  37. },
  38. "ring":{
  39. type: 'ring',
  40. padding:[5,5,5,5],
  41. legend:{
  42. show:true,
  43. position:'right',
  44. float:'center',
  45. itemGap:10,
  46. padding:5,
  47. lineHeight:26,
  48. margin:5,
  49. borderWidth :1
  50. },
  51. disablePieStroke: true,
  52. dataLabel: true,
  53. subtitle: {
  54. name: '70%',
  55. color: '#7cb5ec',
  56. fontSize: 25,
  57. },
  58. title: {
  59. name: '收益率',
  60. color: '#666666',
  61. fontSize: 15,
  62. },
  63. extra: {
  64. pie: {
  65. offsetAngle: 0,
  66. ringWidth: 40,
  67. labelWidth:15
  68. }
  69. }
  70. },
  71. "rose":{
  72. type: 'rose',
  73. padding:[15,15,0,15],
  74. legend:{
  75. show:true,
  76. position:'left',
  77. float:'center',
  78. itemGap:10,
  79. padding:5,
  80. lineHeight:26,
  81. margin:5,
  82. borderWidth :1
  83. },
  84. dataLabel: true,
  85. extra: {
  86. rose: {
  87. type:'area',
  88. minRadius:50,
  89. activeOpacity:0.5,
  90. offsetAngle:0,
  91. labelWidth:15
  92. }
  93. }
  94. },
  95. "word":{
  96. type: 'word',
  97. extra: {
  98. word: {
  99. type: 'normal'
  100. }
  101. }
  102. },
  103. "funnel":{
  104. type: 'funnel',
  105. padding:[15,15,0,15],
  106. legend:{
  107. show:true,
  108. padding:5,
  109. lineHeight:11,
  110. margin:0,
  111. },
  112. dataLabel: true,
  113. extra: {
  114. funnel: {
  115. border:true,
  116. borderWidth:2,
  117. borderColor:'#FFFFFF'
  118. }
  119. }
  120. },
  121. "map":{
  122. type: 'map',
  123. padding:[0,0,0,0],
  124. legend:{
  125. show:false
  126. },
  127. dataLabel:true,
  128. extra: {
  129. map: {
  130. border:true,
  131. borderWidth:1,
  132. borderColor:'#666666',
  133. fillOpacity:0.6
  134. }
  135. }
  136. },
  137. "arcbar":{
  138. type: 'arcbar',
  139. legend:{show:false},
  140. dataLabel: true,
  141. title: {
  142. name: "百分比",
  143. color: '#00FF00',
  144. fontSize: 25
  145. },
  146. subtitle: {
  147. name: "默认标题",
  148. color: '#666666',
  149. fontSize: 15
  150. },
  151. extra: {
  152. arcbar:{
  153. type:'default',
  154. width: 12,
  155. }
  156. }
  157. },
  158. "line":{
  159. type: 'line',
  160. padding:[15,30,0,15],
  161. legend:{
  162. show:true,
  163. padding:5,
  164. lineHeight:11,
  165. margin:0,
  166. },
  167. dataLabel: true,
  168. dataPointShape:true,
  169. xAxis: {
  170. disableGrid: true,
  171. },
  172. yAxis: {
  173. gridType: 'dash',
  174. gridColor: '#CCCCCC',
  175. dashLength: 8,
  176. splitNumber: 4,
  177. format: val => {
  178. return val.toFixed(0);
  179. }
  180. },
  181. extra: {
  182. line:{
  183. type: 'straight'
  184. }
  185. }
  186. },
  187. "column":{
  188. type: 'column',
  189. padding:[15,5,0,15],
  190. legend:{
  191. show:true,
  192. padding:5,
  193. lineHeight:11,
  194. margin:0,
  195. },
  196. animation: true,
  197. dataLabel: true,
  198. xAxis: {
  199. disableGrid:true,
  200. },
  201. yAxis: {
  202. data:[{
  203. position:'right',
  204. axisLine:false,
  205. format:(val)=>{return val.toFixed(0)},
  206. }]
  207. },
  208. extra: {
  209. column: {
  210. type:'group',
  211. width:30
  212. }
  213. }
  214. },
  215. "area":{
  216. type: 'area',
  217. padding:[15,15,0,15],
  218. legend:{
  219. show:true,
  220. },
  221. dataLabel:true,
  222. dataPointShape:true,
  223. xAxis: {
  224. disableGrid:true,
  225. },
  226. yAxis: {
  227. gridType:'dash',
  228. gridColor:'#CCCCCC',
  229. dashLength:8,
  230. splitNumber:5,
  231. },
  232. extra: {
  233. area:{
  234. type: 'straight',
  235. opacity:0.2,
  236. addLine:true,
  237. width:2,
  238. gradient:false
  239. }
  240. }
  241. },
  242. "radar":{
  243. type: 'radar',
  244. padding:[15,15,0,15],
  245. legend:{
  246. show:true,
  247. padding:5,
  248. lineHeight:11,
  249. margin:0,
  250. },
  251. animation: true,
  252. dataLabel: true,
  253. extra: {
  254. radar: {
  255. max: 200,
  256. gridType:'radar'//radar或者circle可选,网格样式,默认radar
  257. }
  258. }
  259. },
  260. "gauge":{
  261. type: 'gauge',
  262. legend:{show:false},
  263. animation: true,
  264. dataLabel: true,
  265. title: {
  266. name: "字符串类型",
  267. color: '#00FF00',
  268. fontSize: 25,
  269. offsetY:50,
  270. },
  271. subtitle: {
  272. name: "字符串类型",
  273. color: '#666666',
  274. fontSize: 15,
  275. offsetY:-50,
  276. },
  277. extra: {
  278. gauge:{
  279. type:'default',
  280. width: 30,
  281. startAngle:0.75,
  282. endAngle:0.25,
  283. startNumber:0,
  284. endNumber:100,
  285. splitLine:{
  286. fixRadius:0,
  287. splitNumber:10,
  288. width: 30,
  289. color:'#FFFFFF',
  290. childNumber:5,
  291. childWidth:30*0.4,
  292. },
  293. pointer:{
  294. width: 30*0.8,
  295. color:'auto'
  296. }
  297. }
  298. }
  299. },
  300. "candle":{
  301. type: 'candle',
  302. padding:[15,15,0,15],
  303. legend:{
  304. show:true,
  305. padding:5,
  306. lineHeight:11,
  307. margin:8,
  308. },
  309. enableMarkLine: true,
  310. enableScroll: true,
  311. dataLabel: false,
  312. dataPointShape: true,
  313. xAxis: {
  314. disableGrid:true,
  315. labelCount:4,
  316. itemCount:5,
  317. scrollShow:true,
  318. scrollAlign:'right',
  319. },
  320. yAxis: {
  321. gridType:'dash',
  322. splitNumber:5,
  323. format:(val)=>{return val.toFixed(0)}
  324. },
  325. extra: {
  326. candle:{
  327. color:{
  328. upLine:'#f04864',
  329. upFill:'#f04864',
  330. downLine:'#2fc25b',
  331. downFill:'#2fc25b'
  332. },
  333. average:{
  334. show:true,
  335. name:['MA5','MA10','MA30'],
  336. day:[5,10,20],
  337. color:['#1890ff', '#2fc25b', '#facc14']
  338. }
  339. },
  340. tooltip:{
  341. bgColor:'#000000',
  342. bgOpacity:0.7,
  343. gridType:'dash',
  344. dashLength:5,
  345. gridColor:'#1890ff',
  346. fontColor:'#FFFFFF',
  347. horizentalLine:true,
  348. xAxisLabel:true,
  349. yAxisLabel:true,
  350. labelBgColor:'#DFE8FF',
  351. labelBgOpacity:0.95,
  352. labelAlign:'left',
  353. labelFontColor:'#666666'
  354. },
  355. markLine: {
  356. type: 'dash',
  357. dashLength: 5,
  358. data: [{
  359. value:2150,
  360. lineColor: '#f04864',
  361. showLabel:true
  362. },{
  363. value:2350,
  364. lineColor: '#f04864',
  365. showLabel:true
  366. }]
  367. }
  368. }
  369. },
  370. "mix":{
  371. type: 'mix',
  372. padding:[15,15,0,15],
  373. legend:{
  374. show:true,
  375. position:'bottom',
  376. float:'center',
  377. padding:5,
  378. lineHeight:11,
  379. margin:6,
  380. },
  381. dataLabel: true,
  382. dataPointShape: true,
  383. xAxis: {
  384. disableGrid:true,
  385. },
  386. yAxis: {
  387. data:[{
  388. calibration:true,
  389. position:'left',
  390. title:'折线',
  391. titleFontSize:12,
  392. format:(val)=>{return val.toFixed(0)+'度'}
  393. },{
  394. calibration:true,
  395. position:'right',
  396. min:0,
  397. max:200,
  398. title:'柱状图',
  399. titleFontSize:12,
  400. format:(val)=>{return val.toFixed(0)+'元'}
  401. },{
  402. calibration:true,
  403. position:'right',
  404. min:0,
  405. max:200,
  406. title:'点',
  407. titleFontSize:12
  408. }],
  409. showTitle:true,
  410. gridType:'dash',
  411. dashLength:4,
  412. splitNumber:5
  413. },
  414. extra: {
  415. column:{
  416. width:20
  417. }
  418. }
  419. },
  420. "point":{
  421. type: 'point',
  422. padding:[15,30,0,15],
  423. legend:{
  424. show:true
  425. },
  426. dataLabel: false,
  427. dataPointShape:true,
  428. xAxis: {
  429. disableGrid: true,
  430. labelCount: 4
  431. },
  432. yAxis: {
  433. gridType: 'dash',
  434. gridColor: '#CCCCCC',
  435. dashLength: 8,
  436. splitNumber: 4,
  437. format: val => {
  438. return val.toFixed(1);
  439. }
  440. },
  441. extra: {
  442. point:{
  443. }
  444. }
  445. },
  446. "bubble":{
  447. type: 'bubble',
  448. padding:[15,30,0,15],
  449. legend:{
  450. show:true
  451. },
  452. dataLabel: true,
  453. xAxis: {
  454. disableGrid: true,
  455. labelCount: 4
  456. },
  457. yAxis: {
  458. gridType: 'dash',
  459. gridColor: '#CCCCCC',
  460. dashLength: 8,
  461. splitNumber: 4,
  462. format: val => {
  463. return val.toFixed(1);
  464. }
  465. },
  466. extra: {
  467. bubble:{
  468. }
  469. }
  470. }
  471. }