You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config-ucharts.js 20 KiB

3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  1. /*
  2. * uCharts®
  3. * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
  4. * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
  5. * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  6. * 复制使用请保留本段注释,感谢支持开源!
  7. *
  8. * uCharts®官方网站
  9. * https://www.uCharts.cn
  10. *
  11. * 开源地址:
  12. * https://gitee.com/uCharts/uCharts
  13. *
  14. * uni-app插件市场地址:
  15. * http://ext.dcloud.net.cn/plugin?id=271
  16. *
  17. */
  18. // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
  19. const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
  20. //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
  21. const formatDateTime = (timeStamp, returnType)=>{
  22. var date = new Date();
  23. date.setTime(timeStamp * 1000);
  24. var y = date.getFullYear();
  25. var m = date.getMonth() + 1;
  26. m = m < 10 ? ('0' + m) : m;
  27. var d = date.getDate();
  28. d = d < 10 ? ('0' + d) : d;
  29. var h = date.getHours();
  30. h = h < 10 ? ('0' + h) : h;
  31. var minute = date.getMinutes();
  32. var second = date.getSeconds();
  33. minute = minute < 10 ? ('0' + minute) : minute;
  34. second = second < 10 ? ('0' + second) : second;
  35. if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;}
  36. if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;}
  37. if(returnType == 'h:m'){return h +':' + minute;}
  38. if(returnType == 'h:m:s'){return h +':' + minute +':' + second;}
  39. return [y, m, d, h, minute, second];
  40. }
  41. module.exports = {
  42. //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
  43. "type":["pie","ring","rose","word","funnel","map","arcbar","line","column","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],
  44. "range":["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],
  45. //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
  46. //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
  47. "categories":["line","column","area","radar","gauge","candle","mix","demotype"],
  48. //instance为实例变量承载属性,不要删除
  49. "instance":{},
  50. //option为opts及eopts承载属性,不要删除
  51. "option":{},
  52. //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
  53. "formatter":{
  54. "yAxisDemo1":function(val){return val+'元'},
  55. "yAxisDemo2":function(val){return val.toFixed(2)},
  56. "xAxisDemo1":function(val){return val+'年'},
  57. "xAxisDemo2":function(val){return formatDateTime(val,'h:m')},
  58. "seriesDemo1":function(val){return val+'元'},
  59. "tooltipDemo1":function(item, category, index, opts){
  60. if(index==0){
  61. return '随便用'+item.data+'年'
  62. }else{
  63. return '其他我没改'+item.data+'天'
  64. }
  65. },
  66. "pieDemo":function(val, index, series){
  67. if(index !== undefined){
  68. return series[index].name+':'+series[index].data+'元'
  69. }
  70. },
  71. },
  72. //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  73. "demotype":{
  74. //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
  75. "type": "line",
  76. "color": color,
  77. "padding": [15,10,0,15],
  78. "xAxis": {
  79. "disableGrid": true,
  80. },
  81. "yAxis": {
  82. "gridType": "dash",
  83. "dashLength": 2,
  84. },
  85. "legend": {
  86. },
  87. "extra": {
  88. "line": {
  89. "type": "curve",
  90. "width": 2
  91. },
  92. }
  93. },
  94. //下面是自定义配置,请添加项目所需的通用配置
  95. "pie":{
  96. "type": "pie",
  97. "color": color,
  98. "padding": [5,5,5,5],
  99. "extra": {
  100. "pie": {
  101. "activeOpacity": 0.5,
  102. "activeRadius": 10,
  103. "offsetAngle": 0,
  104. "labelWidth": 15,
  105. "border": true,
  106. "borderWidth": 3,
  107. "borderColor": "#FFFFFF"
  108. },
  109. }
  110. },
  111. "ring":{
  112. "type": "ring",
  113. "padding": [15,5,5,5],
  114. "rotate": false,
  115. "dataLabel": true,
  116. "color":[ '#66AFF5', '#FABD2B', '#6F8EDC', '#FFCF8F', '#F98120', '#1CC99E', '#9474FB',
  117. '#657292','#7A6A99','#BF5D52','#EE6666','#77B7E4','#E6A065','#9D5139','#C1AA88','#F87F7A',
  118. '#F6CF74','#7F5506','#88BB9B','#6E99AA','#5789D0'
  119. ],
  120. "legend": {
  121. "show": true,
  122. "position": "bottom",
  123. "float": "center",
  124. "padding": 5,
  125. "margin": 5,
  126. "backgroundColor": "rgba(0,0,0,0)",
  127. "borderColor": "rgba(0,0,0,0)",
  128. "borderWidth": 0,
  129. "fontSize": 10,
  130. "fontColor": "#666666",
  131. "lineHeight": 25,
  132. "hiddenColor": "#CECECE",
  133. "itemGap": 6
  134. },
  135. "title": {
  136. "name": "",
  137. "fontSize": 15,
  138. "color": "#666666"
  139. },
  140. "subtitle": {
  141. "name": "70",
  142. "fontSize": 25,
  143. "color": "#7cb5ec"
  144. },
  145. "extra": {
  146. "ring": {
  147. "ringWidth":30,
  148. "activeOpacity": 0.5,
  149. "activeRadius": 10,
  150. "offsetAngle": 0,
  151. "labelWidth": 15,
  152. "border": true,
  153. "borderWidth": 3,
  154. "borderColor": "#FFFFFF"
  155. },
  156. },
  157. },
  158. "rose":{
  159. "type": "rose",
  160. "color": color,
  161. "padding": [5,5,5,5],
  162. "legend": {
  163. "show": true,
  164. "position": "left",
  165. "lineHeight": 25,
  166. },
  167. "extra": {
  168. "rose": {
  169. "type": "area",
  170. "minRadius": 50,
  171. "activeOpacity": 0.5,
  172. "activeRadius": 10,
  173. "offsetAngle": 0,
  174. "labelWidth": 15,
  175. "border": false,
  176. "borderWidth": 2,
  177. "borderColor": "#FFFFFF"
  178. },
  179. }
  180. },
  181. "word":{
  182. "type": "word",
  183. "color": color,
  184. "extra": {
  185. "word": {
  186. "type": "normal",
  187. "autoColors": false
  188. }
  189. }
  190. },
  191. "funnel":{
  192. "type": "funnel",
  193. "color": color,
  194. "padding": [15,15,0,15],
  195. "extra": {
  196. "funnel": {
  197. "activeOpacity": 0.3,
  198. "activeWidth": 10,
  199. "border": true,
  200. "borderWidth": 2,
  201. "borderColor": "#FFFFFF",
  202. "fillOpacity": 1,
  203. "labelAlign": "right"
  204. },
  205. }
  206. },
  207. "map":{
  208. "type": "map",
  209. "color": color,
  210. "padding": [0,0,0,0],
  211. "dataLabel": true,
  212. "extra": {
  213. "map": {
  214. "border": true,
  215. "borderWidth": 1,
  216. "borderColor": "#666666",
  217. "fillOpacity": 0.6,
  218. "activeBorderColor": "#F04864",
  219. "activeFillColor": "#FACC14",
  220. "activeFillOpacity": 1
  221. },
  222. }
  223. },
  224. "arcbar":{
  225. "type": "arcbar",
  226. "color": color,
  227. "title": {
  228. "name": "百分比",
  229. "fontSize": 25,
  230. "color": "#00FF00"
  231. },
  232. "subtitle": {
  233. "name": "默认标题",
  234. "fontSize": 15,
  235. "color": "#666666"
  236. },
  237. "extra": {
  238. "arcbar": {
  239. "type": "default",
  240. "width": 12,
  241. "backgroundColor": "#E9E9E9",
  242. "startAngle": 0.75,
  243. "endAngle": 0.25,
  244. "gap": 2
  245. }
  246. }
  247. },
  248. // enableScroll // scrollShow
  249. "line":{
  250. "type": "line",
  251. "canvasId": "",
  252. "canvas2d": true,
  253. "background": "none",
  254. "animation": true,
  255. "timing": "easeOut",
  256. "duration": 1000,
  257. "color": [
  258. "#1890FF",
  259. "#91CB74",
  260. "#FAC858",
  261. "#EE6666",
  262. "#73C0DE",
  263. "#3CA272",
  264. "#FC8452",
  265. "#9A60B4",
  266. "#ea7ccc"
  267. ],
  268. "padding": [
  269. 15,
  270. 10,
  271. 0,
  272. 15
  273. ],
  274. "rotate": false,
  275. "errorReload": true,
  276. "fontSize": 13,
  277. "fontColor": "#666666",
  278. "enableScroll": false,
  279. "touchMoveLimit": 60,
  280. "enableMarkLine": false,
  281. "dataLabel": false,
  282. "dataPointShape": true,
  283. "dataPointShapeType": "solid",
  284. "tapLegend": true,
  285. "xAxis": {
  286. "disabled": false,
  287. "axisLine": true,
  288. "axisLineColor": "#CCCCCC",
  289. "calibration": false,
  290. "fontColor": "#666666",
  291. "fontSize": 13,
  292. "rotateLabel": false,
  293. // "itemCount": 3,
  294. 'labelCount':3,
  295. "boundaryGap": "center",
  296. "disableGrid": true,
  297. "gridColor": "#CCCCCC",
  298. "gridType": "solid",
  299. "dashLength": 4,
  300. "gridEval": 1,
  301. "scrollShow": false,
  302. "scrollAlign": "left",
  303. "scrollColor": "#A6A6A6",
  304. "scrollBackgroundColor": "#EFEBEF",
  305. "min": 0,
  306. "format": ""
  307. },
  308. "yAxis": {
  309. "disabled": false,
  310. "disableGrid": false,
  311. "splitNumber": 5,
  312. "gridType": "dash",
  313. "dashLength": 2,
  314. "gridColor": "#CCCCCC",
  315. "padding": 10,
  316. "showTitle": false,
  317. "min":0,
  318. "max":10,
  319. "data": []
  320. },
  321. "legend": {
  322. "show": true,
  323. "position": "bottom",
  324. "float": "center",
  325. "padding": 5,
  326. "margin": 5,
  327. "backgroundColor": "rgba(0,0,0,0)",
  328. "borderColor": "rgba(0,0,0,0)",
  329. "borderWidth": 0,
  330. "fontSize": 13,
  331. "fontColor": "#666666",
  332. "lineHeight": 11,
  333. "hiddenColor": "#CECECE",
  334. "itemGap": 10
  335. },
  336. "extra": {
  337. "line": {
  338. "type": "curve",
  339. "width": 2
  340. },
  341. "tooltip": {
  342. "showBox": true,
  343. "showArrow": true,
  344. "showCategory": false,
  345. "borderWidth": 0,
  346. "borderRadius": 0,
  347. "borderColor": "#000000",
  348. "borderOpacity": 0.7,
  349. "bgColor": "#000000",
  350. "bgOpacity": 0.7,
  351. "gridType": "solid",
  352. "dashLength": 4,
  353. "gridColor": "#CCCCCC",
  354. "fontColor": "#FFFFFF",
  355. "splitLine": true,
  356. "horizentalLine": false,
  357. "xAxisLabel": false,
  358. "yAxisLabel": false,
  359. "labelBgColor": "#FFFFFF",
  360. "labelBgOpacity": 0.7,
  361. "labelFontColor": "#666666"
  362. },
  363. "markLine": {
  364. "type": "solid",
  365. "dashLength": 4,
  366. "data": []
  367. }
  368. }
  369. },
  370. "tline":{
  371. "type": "line",
  372. "color": color,
  373. "padding": [15,10,0,15],
  374. "xAxis": {
  375. "disableGrid": false,
  376. "boundaryGap":"justify",
  377. },
  378. "yAxis": {
  379. "gridType": "dash",
  380. "dashLength": 2,
  381. "data":[
  382. {
  383. "min":0,
  384. "max":80
  385. }
  386. ]
  387. },
  388. "legend": {
  389. },
  390. "extra": {
  391. "line": {
  392. "type": "curve",
  393. "width": 2
  394. },
  395. }
  396. },
  397. "tarea":{
  398. "type": "area",
  399. "color": color,
  400. "padding": [15,10,0,15],
  401. "xAxis": {
  402. "disableGrid": true,
  403. "boundaryGap":"justify",
  404. },
  405. "yAxis": {
  406. "gridType": "dash",
  407. "dashLength": 2,
  408. "data":[
  409. {
  410. "min":0,
  411. "max":80
  412. }
  413. ]
  414. },
  415. "legend": {
  416. },
  417. "extra": {
  418. "area": {
  419. "type": "curve",
  420. "opacity": 0.2,
  421. "addLine": true,
  422. "width": 2,
  423. "gradient": true
  424. },
  425. }
  426. },
  427. "column":{
  428. "type": "column",
  429. "canvasId": "",
  430. "canvas2d": true,
  431. "background": "none",
  432. "animation": true,
  433. "timing": "easeOut",
  434. "duration": 1000,
  435. "color": [
  436. "#1890FF",
  437. "#91CB74",
  438. "#FAC858",
  439. "#EE6666",
  440. "#73C0DE",
  441. "#3CA272",
  442. "#FC8452",
  443. "#9A60B4",
  444. "#ea7ccc"
  445. ],
  446. "padding": [
  447. 15,
  448. 15,
  449. 0,
  450. 5
  451. ],
  452. "rotate": false,
  453. "errorReload": true,
  454. "fontSize": 13,
  455. "fontColor": "#666666",
  456. "enableScroll": true,
  457. "touchMoveLimit": 60,
  458. "enableMarkLine": false,
  459. "dataLabel": true,
  460. "dataPointShape": true,
  461. "dataPointShapeType": "solid",
  462. "xAxis": {
  463. "disabled": false,
  464. "axisLine": true,
  465. "axisLineColor": "#CCCCCC",
  466. "calibration": false,
  467. "fontColor": "#666666",
  468. "fontSize": 13,
  469. "rotateLabel": false,
  470. "itemCount": 7,
  471. "boundaryGap": "center",
  472. "disableGrid": true,
  473. "gridColor": "#CCCCCC",
  474. "gridType": "solid",
  475. "dashLength": 4,
  476. "gridEval": 1,
  477. "scrollShow": true,
  478. "scrollAlign": "left",
  479. "scrollColor": "#A6A6A6",
  480. "scrollBackgroundColor": "#EFEBEF"
  481. },
  482. "yAxis": {
  483. "disabled": false,
  484. "disableGrid": false,
  485. "splitNumber": 5,
  486. "gridType": "dash",
  487. "dashLength": 8,
  488. "gridColor": "#CCCCCC",
  489. "padding": 10,
  490. "showTitle": false,
  491. "min":0,
  492. "max":100,
  493. "data": []
  494. },
  495. "legend": {
  496. "show": true,
  497. "position": "bottom",
  498. "float": "center",
  499. "padding": 5,
  500. "margin": 5,
  501. "backgroundColor": "rgba(0,0,0,0)",
  502. "borderColor": "rgba(0,0,0,0)",
  503. "borderWidth": 0,
  504. "fontSize": 13,
  505. "fontColor": "#666666",
  506. "lineHeight": 11,
  507. "hiddenColor": "#CECECE",
  508. "itemGap": 10
  509. },
  510. "extra": {
  511. "column": {
  512. "type": "group",
  513. "width": 30,
  514. "seriesGap": 2,
  515. "categoryGap": 3,
  516. "barBorderCircle": false,
  517. "linearType": "none",
  518. "linearOpacity": 1,
  519. "colorStop": 0,
  520. "meterBorder": 1,
  521. "meterFillColor": "#FFFFFF",
  522. "activeBgColor": "#000000",
  523. "activeBgOpacity": 0.08,
  524. "meterBorde": 1
  525. },
  526. "tooltip": {
  527. "showBox": true,
  528. "showArrow": true,
  529. "showCategory": false,
  530. "borderWidth": 0,
  531. "borderRadius": 0,
  532. "borderColor": "#000000",
  533. "borderOpacity": 0.7,
  534. "bgColor": "#000000",
  535. "bgOpacity": 0.7,
  536. "gridType": "solid",
  537. "dashLength": 4,
  538. "gridColor": "#CCCCCC",
  539. "fontColor": "#FFFFFF",
  540. "splitLine": true,
  541. "horizentalLine": false,
  542. "xAxisLabel": false,
  543. "yAxisLabel": false,
  544. "labelBgColor": "#FFFFFF",
  545. "labelBgOpacity": 0.7,
  546. "labelFontColor": "#666666"
  547. },
  548. "markLine": {
  549. "type": "solid",
  550. "dashLength": 4,
  551. "data": []
  552. }
  553. }
  554. },
  555. "area":{
  556. "type": "area",
  557. "color": color,
  558. "padding": [15,15,0,15],
  559. "xAxis": {
  560. "disableGrid": true,
  561. },
  562. "yAxis": {
  563. "gridType": "dash",
  564. "dashLength": 2,
  565. },
  566. "legend": {
  567. },
  568. "extra": {
  569. "area": {
  570. "type": "straight",
  571. "opacity": 0.2,
  572. "addLine": true,
  573. "width": 2,
  574. "gradient": false
  575. },
  576. }
  577. },
  578. "radar":{
  579. "type": "radar",
  580. "canvasId": "",
  581. "canvas2d": false,
  582. "background": "none",
  583. "animation": true,
  584. "timing": "easeOut",
  585. "duration": 1000,
  586. "color": [
  587. "#1890FF",
  588. "#91CB74",
  589. "#FAC858",
  590. "#EE6666",
  591. "#73C0DE",
  592. "#3CA272",
  593. "#FC8452",
  594. "#9A60B4",
  595. "#ea7ccc"
  596. ],
  597. "padding": [
  598. 5,
  599. 5,
  600. 5,
  601. 5
  602. ],
  603. "rotate": false,
  604. "errorReload": true,
  605. "fontSize": 13,
  606. "fontColor": "#666666",
  607. "enableScroll": false,
  608. "touchMoveLimit": 60,
  609. "enableMarkLine": false,
  610. "dataLabel": true,
  611. "dataPointShape": true,
  612. "dataPointShapeType": "solid",
  613. "tapLegend": true,
  614. "legend": {
  615. "show": true,
  616. "position": "bottom",
  617. "float": "center",
  618. "padding": 5,
  619. "margin": 5,
  620. "backgroundColor": "rgba(0,0,0,0)",
  621. "borderColor": "rgba(0,0,0,0)",
  622. "borderWidth": 0,
  623. "fontSize": 13,
  624. "fontColor": "#666666",
  625. "lineHeight": 25,
  626. "hiddenColor": "#CECECE",
  627. "itemGap": 10
  628. },
  629. "extra": {
  630. "radar": {
  631. "gridType": "radar",
  632. "gridColor": "#CCCCCC",
  633. "gridCount": 3,
  634. "labelColor": "#666666",
  635. "opacity": 0.2,
  636. "border": false,
  637. "borderWidth": 2,
  638. "max": 200
  639. },
  640. "tooltip": {
  641. "showBox": true,
  642. "showArrow": true,
  643. "showCategory": false,
  644. "borderWidth": 0,
  645. "borderRadius": 0,
  646. "borderColor": "#000000",
  647. "borderOpacity": 0.7,
  648. "bgColor": "#000000",
  649. "bgOpacity": 0.7,
  650. "gridType": "solid",
  651. "dashLength": 4,
  652. "gridColor": "#CCCCCC",
  653. "fontColor": "#FFFFFF",
  654. "splitLine": true,
  655. "horizentalLine": false,
  656. "xAxisLabel": false,
  657. "yAxisLabel": false,
  658. "labelBgColor": "#FFFFFF",
  659. "labelBgOpacity": 0.7,
  660. "labelFontColor": "#666666"
  661. }
  662. }
  663. },
  664. "gauge":{
  665. "type": "gauge",
  666. "color": color,
  667. "title": {
  668. "name": "66Km/H",
  669. "fontSize": 25,
  670. "color": "#2fc25b",
  671. "offsetY": 50
  672. },
  673. "subtitle": {
  674. "name": "实时速度",
  675. "fontSize": 15,
  676. "color": "#1890ff",
  677. "offsetY": -50
  678. },
  679. "extra": {
  680. "gauge": {
  681. "type": "default",
  682. "width": 30,
  683. "labelColor": "#666666",
  684. "startAngle": 0.75,
  685. "endAngle": 0.25,
  686. "startNumber": 0,
  687. "endNumber": 100,
  688. "labelFormat": "",
  689. "splitLine": {
  690. "fixRadius": 0,
  691. "splitNumber": 10,
  692. "width": 30,
  693. "color": "#FFFFFF",
  694. "childNumber": 5,
  695. "childWidth": 12
  696. },
  697. "pointer": {
  698. "width": 24,
  699. "color": "auto"
  700. }
  701. }
  702. }
  703. },
  704. "candle":{
  705. "type": "candle",
  706. "color": color,
  707. "padding": [15,15,0,15],
  708. "enableScroll": true,
  709. "enableMarkLine": true,
  710. "dataLabel": false,
  711. "xAxis": {
  712. "labelCount": 4,
  713. "itemCount": 40,
  714. "disableGrid": true,
  715. "gridColor": "#CCCCCC",
  716. "gridType": "solid",
  717. "dashLength": 4,
  718. "scrollShow": true,
  719. "scrollAlign": "left",
  720. "scrollColor": "#A6A6A6",
  721. "scrollBackgroundColor": "#EFEBEF"
  722. },
  723. "yAxis": {
  724. },
  725. "legend": {
  726. },
  727. "extra": {
  728. "candle": {
  729. "color": {
  730. "upLine": "#f04864",
  731. "upFill": "#f04864",
  732. "downLine": "#2fc25b",
  733. "downFill": "#2fc25b"
  734. },
  735. "average": {
  736. "show": true,
  737. "name": ["MA5","MA10","MA30"],
  738. "day": [5,10,20],
  739. "color": ["#1890ff","#2fc25b","#facc14"]
  740. }
  741. },
  742. "markLine": {
  743. "type": "dash",
  744. "dashLength": 5,
  745. "data": [
  746. {
  747. "value": 2150,
  748. "lineColor": "#f04864",
  749. "showLabel": true
  750. },
  751. {
  752. "value": 2350,
  753. "lineColor": "#f04864",
  754. "showLabel": true
  755. }
  756. ]
  757. }
  758. }
  759. },
  760. "mix":{
  761. "type": "mix",
  762. "color": color,
  763. "padding": [15,15,0,15],
  764. "xAxis": {
  765. "disableGrid": true,
  766. },
  767. "yAxis": {
  768. "disabled": false,
  769. "disableGrid": false,
  770. "splitNumber": 5,
  771. "gridType": "dash",
  772. "dashLength": 4,
  773. "gridColor": "#CCCCCC",
  774. "padding": 10,
  775. "showTitle": true,
  776. "data": []
  777. },
  778. "legend": {
  779. },
  780. "extra": {
  781. "mix": {
  782. "column": {
  783. "width": 20
  784. }
  785. },
  786. }
  787. },
  788. "scatter":{
  789. "type": "scatter",
  790. "color":color,
  791. "padding":[15,15,0,15],
  792. "dataLabel":false,
  793. "xAxis": {
  794. "disableGrid": false,
  795. "gridType":"dash",
  796. "splitNumber":5,
  797. "boundaryGap":"justify",
  798. "min":0
  799. },
  800. "yAxis": {
  801. "disableGrid": false,
  802. "gridType":"dash",
  803. },
  804. "legend": {
  805. },
  806. "extra": {
  807. "scatter": {
  808. },
  809. }
  810. },
  811. "bubble":{
  812. "type": "bubble",
  813. "color":color,
  814. "padding":[15,15,0,15],
  815. "xAxis": {
  816. "disableGrid": false,
  817. "gridType":"dash",
  818. "splitNumber":5,
  819. "boundaryGap":"justify",
  820. "min":0,
  821. "max":250
  822. },
  823. "yAxis": {
  824. "disableGrid": false,
  825. "gridType":"dash",
  826. "data":[{
  827. "min":0,
  828. "max":150
  829. }]
  830. },
  831. "legend": {
  832. },
  833. "extra": {
  834. "bubble": {
  835. "border":2,
  836. "opacity": 0.5,
  837. },
  838. }
  839. }
  840. }