1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240 |
- /*
- * uCharts®
- * 高性能跨平台图表库,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)、Vue、Taro等支持canvas的框架平台
- * Copyright (c) 2021 QIUN®秋云 https://www.ucharts.cn All rights reserved.
- * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- * 复制使用请保留本段注释,感谢支持开源!
- *
- * uCharts®官方网站
- * https://www.uCharts.cn
- *
- * 开源地址:
- * https://gitee.com/uCharts/uCharts
- *
- * uni-app插件市场地址:
- * http://ext.dcloud.net.cn/plugin?id=271
- *
- */
- // 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
- const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
- //事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
- const formatDateTime = (timeStamp, returnType) => {
- var date = new Date();
- date.setTime(timeStamp * 1000);
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? ('0' + m) : m;
- var d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var minute = date.getMinutes();
- var second = date.getSeconds();
- minute = minute < 10 ? ('0' + minute) : minute;
- second = second < 10 ? ('0' + second) : second;
- if (returnType == 'full') {
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
- }
- if (returnType == 'y-m-d') {
- return y + '-' + m + '-' + d;
- }
- if (returnType == 'h:m') {
- return h + ':' + minute;
- }
- if (returnType == 'h:m:s') {
- return h + ':' + minute + ':' + second;
- }
- return [y, m, d, h, minute, second];
- }
- const cfu = {
- //demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
- "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar",
- "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype", "mainline","mainradar"],
- "range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图",
- "混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型", "首页趋势图", "首页雷达图"],
- //增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
- //自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
- "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype", "mainline", "mainradar"],
- //instance为实例变量承载属性,不要删除
- "instance": {},
- //option为opts及eopts承载属性,不要删除
- "option": {},
- //下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
- "formatter": {
- "yAxisDemo1": function(val) {
- return val + '元'
- },
- "yAxisDemo2": function(val) {
- return val.toFixed(2)
- },
- "xAxisDemo1": function(val) {
- return val + '年'
- },
- "xAxisDemo2": function(val) {
- return formatDateTime(val, 'h:m')
- },
- "seriesDemo1": function(val) {
- return val + '元'
- },
- "tooltipDemo1": function(item, category, index, opts) {
- if (index == 0) {
- return '随便用' + item.data + '年'
- } else {
- return '其他我没改' + item.data + '天'
- }
- },
- "pieDemo": function(val, index, series) {
- if (index !== undefined) {
- return series[index].name + ':' + series[index].data + '元'
- }
- },
- },
- //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
- "demotype": {
- //我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
- "type": "line",
- "color": color,
- "padding": [15, 10, 0, 15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- },
- "legend": {},
- "extra": {
- "line": {
- "type": "curve",
- "width": 2
- },
- }
- },
- //下面是自定义配置,请添加项目所需的通用配置
- "pie": {
- "type": "pie",
- "color": color,
- "padding": [5, 5, 5, 5],
- "extra": {
- "pie": {
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": true,
- "borderWidth": 3,
- "borderColor": "#FFFFFF"
- },
- }
- },
- "ring": {
- "type": "ring",
- "color": color,
- "padding": [5, 5, 5, 5],
- "rotate": false,
- "dataLabel": true,
- "legend": {
- "show": true,
- "position": "right",
- "lineHeight": 25,
- },
- "title": {
- "name": "收益率",
- "fontSize": 15,
- "color": "#666666"
- },
- "subtitle": {
- "name": "70%",
- "fontSize": 25,
- "color": "#7cb5ec"
- },
- "extra": {
- "ring": {
- "ringWidth": 30,
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": true,
- "borderWidth": 3,
- "borderColor": "#FFFFFF"
- },
- },
- },
- "rose": {
- "type": "rose",
- "color": color,
- "padding": [5, 5, 5, 5],
- "legend": {
- "show": true,
- "position": "left",
- "lineHeight": 25,
- },
- "extra": {
- "rose": {
- "type": "area",
- "minRadius": 50,
- "activeOpacity": 0.5,
- "activeRadius": 10,
- "offsetAngle": 0,
- "labelWidth": 15,
- "border": false,
- "borderWidth": 2,
- "borderColor": "#FFFFFF"
- },
- }
- },
- "word": {
- "type": "word",
- "color": color,
- "extra": {
- "word": {
- "type": "normal",
- "autoColors": false
- }
- }
- },
- "funnel": {
- "type": "funnel",
- "color": color,
- "padding": [15, 15, 0, 15],
- "extra": {
- "funnel": {
- "activeOpacity": 0.3,
- "activeWidth": 10,
- "border": true,
- "borderWidth": 2,
- "borderColor": "#FFFFFF",
- "fillOpacity": 1,
- "labelAlign": "right"
- },
- }
- },
- "map": {
- "type": "map",
- "color": color,
- "padding": [0, 0, 0, 0],
- "dataLabel": true,
- "extra": {
- "map": {
- "border": true,
- "borderWidth": 1,
- "borderColor": "#666666",
- "fillOpacity": 0.6,
- "activeBorderColor": "#F04864",
- "activeFillColor": "#FACC14",
- "activeFillOpacity": 1
- },
- }
- },
- "arcbar": {
- "type": "arcbar",
- "color": color,
- "title": {
- "name": "百分比",
- "fontSize": 25,
- "color": "#00FF00"
- },
- "subtitle": {
- "name": "默认标题",
- "fontSize": 15,
- "color": "#666666"
- },
- "extra": {
- "arcbar": {
- "type": "default",
- "width": 12,
- "backgroundColor": "#E9E9E9",
- "startAngle": 0.75,
- "endAngle": 0.25,
- "gap": 2
- }
- }
- },
- "line": {
- "type": "line",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#ff5959",
- "#f9b248"
- ],
- "padding": [
- 1,
- 10,
- 8,
- 3
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 12,
- "fontColor": "#696969",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": true,
- "dataLabel": true,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": true,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#696969",
- "fontSize": 12,
- "rotateLabel": false,
- "labelCount": 6,
- "itemCount": 5,
- "boundaryGap": "center",
- "disableGrid": true,
- "gridColor": "#696969",
- "gridType": "solid",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#F5F5F5",
- "scrollBackgroundColor": "#D3D3D3",
- "format": ""
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 10,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": true,
- "position": "top",
- "float": "right",
- "padding": 5,
- "margin": 15,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 12,
- "fontColor": "#696969",
- "lineHeight": 10,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "line": {
- "type": "curve",
- "width": 2
- },
- "tooltip": {
- "showBox": true,
- "showArrow": false,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 6,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "dash",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "dash",
- "dashLength": 8,
- "data": []
- }
- }
- },
- "tline": {
- "type": "line",
- "color": color,
- "padding": [15, 10, 0, 15],
- "xAxis": {
- "disableGrid": false,
- "boundaryGap": "justify",
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- "data": [{
- "min": 0,
- "max": 80
- }]
- },
- "legend": {},
- "extra": {
- "line": {
- "type": "curve",
- "width": 2
- },
- }
- },
- "tarea": {
- "type": "area",
- "color": color,
- "padding": [15, 10, 0, 15],
- "xAxis": {
- "disableGrid": true,
- "boundaryGap": "justify",
- },
- "yAxis": {
- "gridType": "dash",
- "dashLength": 2,
- "data": [{
- "min": 0,
- "max": 80
- }]
- },
- "legend": {},
- "extra": {
- "area": {
- "type": "curve",
- "opacity": 0.2,
- "addLine": true,
- "width": 2,
- "gradient": true
- },
- }
- },
- "column": {
- "type": "column",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#ff5959",
- "#f9b248"
- ],
- "padding": [
- 1,
- 10,
- 8,
- 3
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 12,
- "fontColor": "#696969",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": true,
- "dataLabel": true,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": true,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#696969",
- "fontSize": 12,
- "rotateLabel": false,
- "labelCount": 6,
- "itemCount": 5,
- "boundaryGap": "center",
- "disableGrid": true,
- "gridColor": "#696969",
- "gridType": "dash",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#F5F5F5",
- "scrollBackgroundColor": "#D3D3D3",
- "format": ""
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 10,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": true,
- "position": "top",
- "float": "right",
- "padding": 5,
- "margin": 15,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 12,
- "fontColor": "#696969",
- "lineHeight": 10,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "column": {
- "type": "group",
- "width": 17,
- "seriesGap": 2,
- "categoryGap": 3,
- "barBorderCircle": false,
- "barBorderRadius": [
- 5,
- 5,
- 5,
- 5
- ],
- "linearType": "none",
- "linearOpacity": 1,
- "customColor": [
- "#0052d4",
- "#4364f7",
- "#6fb1fc",
- "#f5f5f5"
- ],
- "colorStop": 0,
- "meterBorder": 1,
- "meterFillColor": "#FFFFFF",
- "activeBgColor": "#000000",
- "activeBgOpacity": 0.05,
- "meterBorde": 1
- },
- "tooltip": {
- "showBox": true,
- "showArrow": false,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 6,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "dash",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "dash",
- "dashLength": 8,
- "data": []
- }
- }
- },
- "bar": {
- "type": "bar",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#20a162"
- ],
- "padding": [
- 1,
- 18,
- 3,
- 3
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#696969",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": false,
- "dataLabel": false,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": false,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#696969",
- "fontSize": 12,
- "rotateLabel": false,
- "itemCount": 5,
- "boundaryGap": "justify",
- "disableGrid": false,
- "gridColor": "#CCCCCC",
- "gridType": "dash",
- "dashLength": 8,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF",
- "min": 0,
- "format": ""
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": true,
- "position": "top",
- "float": "right",
- "padding": 5,
- "margin": 5,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 12,
- "fontColor": "#696969",
- "lineHeight": 10,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "bar": {
- "type": "group",
- "width": 14,
- "seriesGap": 2,
- "categoryGap": 4,
- "barBorderCircle": false,
- "barBorderRadius": [
- 3,
- 10,
- 3,
- 3
- ],
- "linearType": "none",
- "linearOpacity": 1,
- "colorStop": 0,
- "activeBgColor": "#000000",
- "activeBgOpacity": 0.08,
- "meterBorde": 1,
- "meterFillColor": "#FFFFFF"
- },
- "tooltip": {
- "showBox": true,
- "showArrow": false,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 6,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "solid",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "solid",
- "dashLength": 4,
- "data": []
- }
- }
- },
- "area": {
- "type": "area",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#ff5959",
- "#f9b248"
- ],
- "padding": [
- 1,
- 10,
- 8,
- 3
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#666666",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": true,
- "dataLabel": true,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": false,
- "axisLine": true,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#696969",
- "fontSize": 12,
- "rotateLabel": false,
- "labelCount": 6,
- "itemCount": 5,
- "boundaryGap": "center",
- "disableGrid": true,
- "gridColor": "#CCCCCC",
- "gridType": "solid",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF",
- "format": ""
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 10,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": true,
- "position": "top",
- "float": "right",
- "padding": 5,
- "margin": 15,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 12,
- "fontColor": "#696969",
- "lineHeight": 10,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "area": {
- "type": "straight",
- "opacity": 0.5,
- "addLine": true,
- "width": 2,
- "gradient": true
- },
- "tooltip": {
- "showBox": true,
- "showArrow": false,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 6,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "dash",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": true,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "dash",
- "dashLength": 8,
- "data": []
- }
- }
- },
- "radar": {
- "type": "radar",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#ff5959",
- "#f9b248"
- ],
- "padding": [
- 1,
- 2,
- 2,
- 2
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#696969",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": false,
- "dataLabel": false,
- "dataPointShape": true,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "legend": {
- "show": true,
- "position": "bottom",
- "float": "center",
- "padding": 5,
- "margin": 5,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 13,
- "fontColor": "#696969",
- "lineHeight": 10,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "radar": {
- "gridType": "circle",
- "gridColor": "#CCCCCC",
- "gridCount": 2,
- "labelColor": "#696969",
- "opacity": 0.3,
- "border": true,
- "borderWidth": 1,
- "max": 100
- },
- "tooltip": {
- "showBox": true,
- "showArrow": false,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 6,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "dash",
- "dashLength": 8,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": true,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.7,
- "labelFontColor": "#666666"
- }
- }
- },
- "gauge": {
- "type": "gauge",
- "color": color,
- "title": {
- "name": "66Km/H",
- "fontSize": 25,
- "color": "#2fc25b",
- "offsetY": 50
- },
- "subtitle": {
- "name": "实时速度",
- "fontSize": 15,
- "color": "#1890ff",
- "offsetY": -50
- },
- "extra": {
- "gauge": {
- "type": "default",
- "width": 30,
- "labelColor": "#666666",
- "startAngle": 0.75,
- "endAngle": 0.25,
- "startNumber": 0,
- "endNumber": 100,
- "labelFormat": "",
- "splitLine": {
- "fixRadius": 0,
- "splitNumber": 10,
- "width": 30,
- "color": "#FFFFFF",
- "childNumber": 5,
- "childWidth": 12
- },
- "pointer": {
- "width": 24,
- "color": "auto"
- }
- }
- }
- },
- "candle": {
- "type": "candle",
- "color": color,
- "padding": [15, 15, 0, 15],
- "enableScroll": true,
- "enableMarkLine": true,
- "dataLabel": false,
- "xAxis": {
- "labelCount": 4,
- "itemCount": 40,
- "disableGrid": true,
- "gridColor": "#CCCCCC",
- "gridType": "solid",
- "dashLength": 4,
- "scrollShow": true,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF"
- },
- "yAxis": {},
- "legend": {},
- "extra": {
- "candle": {
- "color": {
- "upLine": "#f04864",
- "upFill": "#f04864",
- "downLine": "#2fc25b",
- "downFill": "#2fc25b"
- },
- "average": {
- "show": true,
- "name": ["MA5", "MA10", "MA30"],
- "day": [5, 10, 20],
- "color": ["#1890ff", "#2fc25b", "#facc14"]
- }
- },
- "markLine": {
- "type": "dash",
- "dashLength": 5,
- "data": [{
- "value": 2150,
- "lineColor": "#f04864",
- "showLabel": true
- },
- {
- "value": 2350,
- "lineColor": "#f04864",
- "showLabel": true
- }
- ]
- }
- }
- },
- "mix": {
- "type": "mix",
- "color": color,
- "padding": [15, 15, 0, 15],
- "xAxis": {
- "disableGrid": true,
- },
- "yAxis": {
- "disabled": false,
- "disableGrid": false,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": true,
- "data": []
- },
- "legend": {},
- "extra": {
- "mix": {
- "column": {
- "width": 20
- }
- },
- }
- },
- "scatter": {
- "type": "scatter",
- "color": color,
- "padding": [15, 15, 0, 15],
- "dataLabel": false,
- "xAxis": {
- "disableGrid": false,
- "gridType": "dash",
- "splitNumber": 5,
- "boundaryGap": "justify",
- "min": 0
- },
- "yAxis": {
- "disableGrid": false,
- "gridType": "dash",
- },
- "legend": {},
- "extra": {
- "scatter": {},
- }
- },
- "bubble": {
- "type": "bubble",
- "color": color,
- "padding": [15, 15, 0, 15],
- "xAxis": {
- "disableGrid": false,
- "gridType": "dash",
- "splitNumber": 5,
- "boundaryGap": "justify",
- "min": 0,
- "max": 250
- },
- "yAxis": {
- "disableGrid": false,
- "gridType": "dash",
- "data": [{
- "min": 0,
- "max": 150
- }]
- },
- "legend": {},
- "extra": {
- "bubble": {
- "border": 2,
- "opacity": 0.5,
- },
- }
- },
- "mainline": {
- "type": "area",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#6495ed"
- ],
- "padding": [
- 0,
- 0,
- 0,
- 0
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#666666",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": false,
- "dataLabel": false,
- "dataPointShape": false,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "xAxis": {
- "disabled": true,
- "axisLine": false,
- "axisLineColor": "#CCCCCC",
- "calibration": false,
- "fontColor": "#666666",
- "fontSize": 13,
- "rotateLabel": false,
- "itemCount": 5,
- "boundaryGap": "center",
- "disableGrid": true,
- "gridColor": "#CCCCCC",
- "gridType": "solid",
- "dashLength": 4,
- "gridEval": 1,
- "scrollShow": false,
- "scrollAlign": "left",
- "scrollColor": "#A6A6A6",
- "scrollBackgroundColor": "#EFEBEF",
- "format": ""
- },
- "yAxis": {
- "disabled": true,
- "disableGrid": true,
- "splitNumber": 5,
- "gridType": "dash",
- "dashLength": 2,
- "gridColor": "#CCCCCC",
- "padding": 10,
- "showTitle": false,
- "data": []
- },
- "legend": {
- "show": false,
- "position": "bottom",
- "float": "center",
- "padding": 10,
- "margin": 0,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 13,
- "fontColor": "#666666",
- "lineHeight": 11,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "area": {
- "type": "curve",
- "opacity": 1,
- "addLine": true,
- "width": 4,
- "gradient": true
- },
- "tooltip": {
- "showBox": true,
- "showArrow": true,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 5,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "solid",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": false,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.5,
- "labelFontColor": "#666666"
- },
- "markLine": {
- "type": "solid",
- "dashLength": 4,
- "data": []
- }
- }
- },
- "mainradar":{
- "type": "radar",
- "canvasId": "",
- "canvas2d": false,
- "background": "none",
- "animation": true,
- "timing": "easeOut",
- "duration": 1000,
- "color": [
- "#0052d4",
- "#ff5959",
- "#f9b248"
- ],
- "padding": [
- 5,
- 5,
- 5,
- 5
- ],
- "rotate": false,
- "errorReload": true,
- "fontSize": 13,
- "fontColor": "#666666",
- "enableScroll": false,
- "touchMoveLimit": 60,
- "enableMarkLine": false,
- "dataLabel": false,
- "dataPointShape": false,
- "dataPointShapeType": "solid",
- "tapLegend": true,
- "legend": {
- "show": false,
- "position": "right",
- "float": "center",
- "padding": 5,
- "margin": 5,
- "backgroundColor": "rgba(0,0,0,0)",
- "borderColor": "rgba(0,0,0,0)",
- "borderWidth": 0,
- "fontSize": 13,
- "fontColor": "#666666",
- "lineHeight": 25,
- "hiddenColor": "#CECECE",
- "itemGap": 10
- },
- "extra": {
- "radar": {
- "gridType": "radar",
- "gridColor": "#CCCCCC",
- "gridCount": 1,
- "labelColor": "#f1f3f5",
- "opacity": 0.2,
- "border": true,
- "borderWidth": 2,
- "max": 100
- },
- "tooltip": {
- "showBox": true,
- "showArrow": true,
- "showCategory": false,
- "borderWidth": 0,
- "borderRadius": 5,
- "borderColor": "#000000",
- "borderOpacity": 0.5,
- "bgColor": "#000000",
- "bgOpacity": 0.5,
- "gridType": "solid",
- "dashLength": 4,
- "gridColor": "#CCCCCC",
- "fontColor": "#FFFFFF",
- "splitLine": false,
- "horizentalLine": false,
- "xAxisLabel": false,
- "yAxisLabel": false,
- "labelBgColor": "#FFFFFF",
- "labelBgOpacity": 0.5,
- "labelFontColor": "#666666"
- }
- }
- }
- }
- export default cfu;
|