|
@@ -1,23 +1,38 @@
|
|
-/*
|
|
|
|
- * 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属性
|
|
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性
|
|
const color = ["#0052d4", "#ff5959", "#f9b248", "#c1cbf7", "#3CA272", "#5fb7ff", "#FC8452", "#9A60B4"];
|
|
const color = ["#0052d4", "#ff5959", "#f9b248", "#c1cbf7", "#3CA272", "#5fb7ff", "#FC8452", "#9A60B4"];
|
|
|
|
+// 提示窗配置
|
|
|
|
+const tooltip = {
|
|
|
|
+ "showBox": true,
|
|
|
|
+ "showArrow": false,
|
|
|
|
+ "showCategory": false,
|
|
|
|
+ "borderRadius": 6,
|
|
|
|
+ "bgOpacity": 0.5,
|
|
|
|
+ "splitLine": true,
|
|
|
|
+};
|
|
|
|
+//x轴配置
|
|
|
|
+const X = {
|
|
|
|
+ "disableGrid": true,
|
|
|
|
+ "fontSize": 11,
|
|
|
|
+ "scrollColor": "#F5F5F5",
|
|
|
|
+ "scrollBackgroundColor": "#D3D3D3",
|
|
|
|
+ "format": ""
|
|
|
|
+};
|
|
|
|
+//y轴配置
|
|
|
|
+const Y = {
|
|
|
|
+ "data": [{
|
|
|
|
+ // "fontSize": 11,
|
|
|
|
+ }]
|
|
|
|
+};
|
|
|
|
+//图例配置
|
|
|
|
+const legend = {
|
|
|
|
+ "show": true,
|
|
|
|
+ "position": "top",
|
|
|
|
+ "float": "right",
|
|
|
|
+ "padding": 5,
|
|
|
|
+ "margin": 15,
|
|
|
|
+ "fontSize": 13,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
|
|
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
|
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
|
|
const formatDateTime = (timeStamp, returnType) => {
|
|
const formatDateTime = (timeStamp, returnType) => {
|
|
@@ -51,19 +66,13 @@ const formatDateTime = (timeStamp, returnType) => {
|
|
|
|
|
|
const cfu = {
|
|
const cfu = {
|
|
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
|
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
|
|
- "type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "bar", "area", "radar",
|
|
|
|
- "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype", "mainline", "mainradar",
|
|
|
|
- "mini-line", "mini-area", "mini-column", "mini-rose", "home-arcbar"
|
|
|
|
- ],
|
|
|
|
- "range": ["饼状图", "圆环图", "玫瑰图", "圆弧进度条", "折线图", "柱状图", "条状图", "区域图", "雷达图", "仪表盘", "K线图",
|
|
|
|
- "散点图", "气泡图", "自定义类型", "首页趋势图", "首页雷达图", "折线缩略图", "区域缩略图", "柱状缩略图", "玫瑰缩略图",
|
|
|
|
- "条状图缩略图", "雷达缩略图", "首页进度圆环"
|
|
|
|
|
|
+ "type": ["pie", "ring", "rose", "arcbar", "line", "column", "area", "radar", "mainline", "mini-line",
|
|
|
|
+ "mini-area", "mini-column"
|
|
],
|
|
],
|
|
|
|
+ "range": [],
|
|
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
|
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
|
|
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
|
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
|
|
- "categories": ["line", "column", "bar", "area", "radar", "gauge", "candle", "mix", "demotype", "mainline",
|
|
|
|
- "mainradar", "mini-line", "mini-area", "mini-column", "home-arcbar"
|
|
|
|
- ],
|
|
|
|
|
|
+ "categories": ["line", "column", "bar", "area", "radar", "mainline", "mini-line", "mini-area", "mini-column"],
|
|
//instance为实例变量承载属性,不要删除
|
|
//instance为实例变量承载属性,不要删除
|
|
"instance": {},
|
|
"instance": {},
|
|
//option为opts及eopts承载属性,不要删除
|
|
//option为opts及eopts承载属性,不要删除
|
|
@@ -85,206 +94,44 @@ const cfu = {
|
|
"seriesDemo1": function(val) {
|
|
"seriesDemo1": function(val) {
|
|
return val + '元'
|
|
return val + '元'
|
|
},
|
|
},
|
|
- "tooltipDemo1": function(item, category, index, opts) {
|
|
|
|
- if (index == 0) {
|
|
|
|
- return '随便用' + item.data + '年'
|
|
|
|
- } else {
|
|
|
|
- return '其他我没改' + item.data + '天'
|
|
|
|
- }
|
|
|
|
|
|
+ "tooltipScore": function(item, category, index, opts) {
|
|
|
|
+ return category + ' ' + item.name + ': ' + item.data + ' 分 '
|
|
},
|
|
},
|
|
- "pieDemo": function(val, index, series) {
|
|
|
|
- if (index !== undefined) {
|
|
|
|
- return series[index].name + ':' + series[index].data + '元'
|
|
|
|
- }
|
|
|
|
|
|
+ "tooltipScoreShort": function(item, category, index, opts) {
|
|
|
|
+ return item.name + ': ' + item.data + ' 分 '
|
|
},
|
|
},
|
|
- },
|
|
|
|
- //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
|
|
|
- //下面是自定义配置,请添加项目所需的通用配置
|
|
|
|
- "rose": {
|
|
|
|
- "type": "rose",
|
|
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
- "animation": true,
|
|
|
|
- "timing": "easeOut",
|
|
|
|
- "duration": 500,
|
|
|
|
- "color": [
|
|
|
|
- "#0052d4", "#ff5959", "#f9b248", "#c1cbf7", "#3CA272", "#5fb7ff", "#FC8452", "#9A60B4"
|
|
|
|
- ],
|
|
|
|
- "padding": [
|
|
|
|
- -20,
|
|
|
|
- 0,
|
|
|
|
- 0,
|
|
|
|
- 0
|
|
|
|
- ],
|
|
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
- "fontSize": 13,
|
|
|
|
- "fontColor": "#666666",
|
|
|
|
- "enableScroll": false,
|
|
|
|
- "touchMoveLimit": 60,
|
|
|
|
- "enableMarkLine": false,
|
|
|
|
- "dataLabel": false,
|
|
|
|
- "dataPointShape": false,
|
|
|
|
- "dataPointShapeType": "hollow",
|
|
|
|
- "tapLegend": true,
|
|
|
|
- "legend": {
|
|
|
|
- "show": true,
|
|
|
|
- "position": "bottom",
|
|
|
|
- "float": "center",
|
|
|
|
-
|
|
|
|
|
|
+ "tooltipPercent": function(item, category, index, opts) {
|
|
|
|
+ return category + ' ' + item.name + ': ' + item.data + ' % '
|
|
},
|
|
},
|
|
- "extra": {
|
|
|
|
- "rose": {
|
|
|
|
- "type": "radius",
|
|
|
|
- "minRadius": 50,
|
|
|
|
- "activeOpacity": 0.5,
|
|
|
|
- "activeRadius": 10,
|
|
|
|
- "offsetAngle": 0,
|
|
|
|
- "labelWidth": 15,
|
|
|
|
- "border": true,
|
|
|
|
- "borderWidth": 2,
|
|
|
|
- "borderColor": "#FFFFFF",
|
|
|
|
- "linearType": "none"
|
|
|
|
- },
|
|
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- },
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- "arcbar": {
|
|
|
|
- "type": "arcbar",
|
|
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
- "animation": true,
|
|
|
|
- "timing": "easeOut",
|
|
|
|
- "duration": 500,
|
|
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
- "fontSize": 13,
|
|
|
|
- "fontColor": "#666666",
|
|
|
|
- "enableScroll": false,
|
|
|
|
- "touchMoveLimit": 60,
|
|
|
|
- "enableMarkLine": false,
|
|
|
|
- "dataLabel": true,
|
|
|
|
- "dataPointShape": true,
|
|
|
|
- "dataPointShapeType": "solid",
|
|
|
|
- "tapLegend": true,
|
|
|
|
- "title": {
|
|
|
|
- "name": "总成绩占比",
|
|
|
|
- "fontSize": 20,
|
|
|
|
- "color": "#0052d4",
|
|
|
|
|
|
+ "tooltipHour": function(item, category, index, opts) {
|
|
|
|
+ return item.name + ': ' + item.data + ' 小时 '
|
|
},
|
|
},
|
|
- "subtitle": {
|
|
|
|
- "name": "年级与班级",
|
|
|
|
- "fontSize": 15,
|
|
|
|
- "color": "#666666",
|
|
|
|
|
|
+ "pieMinute": function(item, category, index, opts) {
|
|
|
|
+ return item.name + ': ' + item.data + ' 分钟 '
|
|
},
|
|
},
|
|
- "extra": {
|
|
|
|
- "arcbar": {
|
|
|
|
- "type": "default",
|
|
|
|
- "width": 16,
|
|
|
|
- "backgroundColor": "#E9E9E9",
|
|
|
|
- "startAngle": 0.75,
|
|
|
|
- "endAngle": 0.25,
|
|
|
|
- "gap": 2,
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+ //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
|
|
|
|
+ //下面是自定义配置,请添加项目所需的通用配置
|
|
"line": {
|
|
"line": {
|
|
"type": "line",
|
|
"type": "line",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
- 0, 15, 15, 10
|
|
|
|
|
|
+ 0, 10, 15, 5
|
|
],
|
|
],
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
"fontSize": 12,
|
|
"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": "solid",
|
|
|
|
- "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
|
|
|
|
- },
|
|
|
|
|
|
+ "xAxis": X,
|
|
|
|
+ "yAxis": Y,
|
|
|
|
+ "legend": legend,
|
|
"extra": {
|
|
"extra": {
|
|
"line": {
|
|
"line": {
|
|
"type": "curve",
|
|
"type": "curve",
|
|
"width": 2
|
|
"width": 2
|
|
},
|
|
},
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- },
|
|
|
|
|
|
+ "tooltip": tooltip,
|
|
"markLine": {
|
|
"markLine": {
|
|
"type": "dash",
|
|
"type": "dash",
|
|
"dashLength": 8,
|
|
"dashLength": 8,
|
|
@@ -294,115 +141,26 @@ const cfu = {
|
|
},
|
|
},
|
|
"column": {
|
|
"column": {
|
|
"type": "column",
|
|
"type": "column",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
- 0, 15, 15, 10
|
|
|
|
|
|
+ 0, 10, 15, 5
|
|
],
|
|
],
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
"fontSize": 12,
|
|
"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": "solid",
|
|
|
|
- "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
|
|
|
|
- },
|
|
|
|
|
|
+ "xAxis": X,
|
|
|
|
+ "yAxis": Y,
|
|
|
|
+ "legend": legend,
|
|
"extra": {
|
|
"extra": {
|
|
"column": {
|
|
"column": {
|
|
"type": "group",
|
|
"type": "group",
|
|
"width": 17,
|
|
"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,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
|
|
+ "seriesGap": 3,
|
|
|
|
+ "categoryGap": 5,
|
|
|
|
+ "barBorderCircle": true,
|
|
},
|
|
},
|
|
|
|
+ "tooltip": tooltip,
|
|
"markLine": {
|
|
"markLine": {
|
|
"type": "dash",
|
|
"type": "dash",
|
|
"dashLength": 8,
|
|
"dashLength": 8,
|
|
@@ -412,83 +170,17 @@ const cfu = {
|
|
},
|
|
},
|
|
"area": {
|
|
"area": {
|
|
"type": "area",
|
|
"type": "area",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248",
|
|
|
|
- "#c1cbf7",
|
|
|
|
- "#3CA272",
|
|
|
|
- "#5fb7ff"
|
|
|
|
-
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
- 0, 15, 15, 10
|
|
|
|
|
|
+ 0, 10, 15, 5
|
|
],
|
|
],
|
|
- "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": "solid",
|
|
|
|
- "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
|
|
|
|
- },
|
|
|
|
|
|
+ "fontSize": 12,
|
|
|
|
+ "xAxis": X,
|
|
|
|
+ "yAxis": Y,
|
|
|
|
+ "legend": legend,
|
|
"extra": {
|
|
"extra": {
|
|
"area": {
|
|
"area": {
|
|
"type": "curve",
|
|
"type": "curve",
|
|
@@ -497,14 +189,7 @@ const cfu = {
|
|
"width": 2,
|
|
"width": 2,
|
|
"gradient": true
|
|
"gradient": true
|
|
},
|
|
},
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- },
|
|
|
|
|
|
+ "tooltip": tooltip,
|
|
"markLine": {
|
|
"markLine": {
|
|
"type": "dash",
|
|
"type": "dash",
|
|
"dashLength": 8,
|
|
"dashLength": 8,
|
|
@@ -512,100 +197,105 @@ const cfu = {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ "rose": {
|
|
|
|
+ "type": "rose",
|
|
|
|
+ "animation": true,
|
|
|
|
+ "timing": "easeOut",
|
|
|
|
+ "duration": 500,
|
|
|
|
+ "color": color,
|
|
|
|
+ "padding": [
|
|
|
|
+ -20,
|
|
|
|
+ 0,
|
|
|
|
+ 0,
|
|
|
|
+ 0
|
|
|
|
+ ],
|
|
|
|
+ "dataLabel": false,
|
|
|
|
+ "dataPointShape": false,
|
|
|
|
+ "dataPointShapeType": "hollow",
|
|
|
|
+ "legend": {
|
|
|
|
+ "show": true,
|
|
|
|
+ "position": "bottom",
|
|
|
|
+ "float": "center",
|
|
|
|
+ },
|
|
|
|
+ "extra": {
|
|
|
|
+ "rose": {
|
|
|
|
+ "type": "radius",
|
|
|
|
+ "minRadius": 50,
|
|
|
|
+ "activeOpacity": 0.5,
|
|
|
|
+ "activeRadius": 10,
|
|
|
|
+ "offsetAngle": 0,
|
|
|
|
+ "labelWidth": 15,
|
|
|
|
+ "border": true,
|
|
|
|
+ "borderWidth": 2,
|
|
|
|
+ "borderColor": "#FFFFFF",
|
|
|
|
+ "linearType": "none"
|
|
|
|
+ },
|
|
|
|
+ "tooltip": tooltip,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ "arcbar": {
|
|
|
|
+ "type": "arcbar",
|
|
|
|
+ "animation": true,
|
|
|
|
+ "timing": "easeOut",
|
|
|
|
+ "duration": 500,
|
|
|
|
+ "title": {
|
|
|
|
+ "name": "总成绩占比",
|
|
|
|
+ "fontSize": 20,
|
|
|
|
+ "color": "#0052d4",
|
|
|
|
+ },
|
|
|
|
+ "subtitle": {
|
|
|
|
+ "name": "年级与班级",
|
|
|
|
+ "fontSize": 15,
|
|
|
|
+ "color": "#666666",
|
|
|
|
+ },
|
|
|
|
+ "extra": {
|
|
|
|
+ "arcbar": {
|
|
|
|
+ "width": 16,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
"radar": {
|
|
"radar": {
|
|
"type": "radar",
|
|
"type": "radar",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
0, 15, 10, 15
|
|
0, 15, 10, 15
|
|
],
|
|
],
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
- "fontSize": 13,
|
|
|
|
- "fontColor": "#696969",
|
|
|
|
- "enableScroll": false,
|
|
|
|
- "touchMoveLimit": 60,
|
|
|
|
|
|
+ "fontSize": 12,
|
|
"enableMarkLine": false,
|
|
"enableMarkLine": false,
|
|
"dataLabel": false,
|
|
"dataLabel": false,
|
|
- "dataPointShape": true,
|
|
|
|
- "dataPointShapeType": "solid",
|
|
|
|
- "tapLegend": true,
|
|
|
|
"legend": {
|
|
"legend": {
|
|
"show": true,
|
|
"show": true,
|
|
"position": "bottom",
|
|
"position": "bottom",
|
|
"float": "right",
|
|
"float": "right",
|
|
"padding": 5,
|
|
"padding": 5,
|
|
"margin": 5,
|
|
"margin": 5,
|
|
- "backgroundColor": "rgba(0,0,0,0)",
|
|
|
|
- "borderColor": "rgba(0,0,0,0)",
|
|
|
|
- "borderWidth": 0,
|
|
|
|
- "fontSize": 13,
|
|
|
|
"fontColor": "#696969",
|
|
"fontColor": "#696969",
|
|
- "lineHeight": 10,
|
|
|
|
- "hiddenColor": "#CECECE",
|
|
|
|
- "itemGap": 10
|
|
|
|
},
|
|
},
|
|
"extra": {
|
|
"extra": {
|
|
"radar": {
|
|
"radar": {
|
|
"gridType": "circle",
|
|
"gridType": "circle",
|
|
- "gridColor": "#CCCCCC",
|
|
|
|
"gridCount": 2,
|
|
"gridCount": 2,
|
|
- "labelColor": "#696969",
|
|
|
|
"opacity": 0.3,
|
|
"opacity": 0.3,
|
|
"border": true,
|
|
"border": true,
|
|
"borderWidth": 1,
|
|
"borderWidth": 1,
|
|
- "max": 100
|
|
|
|
},
|
|
},
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- }
|
|
|
|
|
|
+ "tooltip": tooltip,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
"pie": {
|
|
"pie": {
|
|
"type": "pie",
|
|
"type": "pie",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248",
|
|
|
|
- "#3CA272",
|
|
|
|
- "#5fb7ff",
|
|
|
|
- "#ff8caf",
|
|
|
|
- "#9A60B4"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
0, 3, 0, 3
|
|
0, 3, 0, 3
|
|
],
|
|
],
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
- "fontSize": 13,
|
|
|
|
- "fontColor": "#666666",
|
|
|
|
- "enableScroll": false,
|
|
|
|
- "touchMoveLimit": 60,
|
|
|
|
- "enableMarkLine": false,
|
|
|
|
|
|
+ "fontSize": 12,
|
|
"dataLabel": false,
|
|
"dataLabel": false,
|
|
- "dataPointShape": true,
|
|
|
|
- "dataPointShapeType": "solid",
|
|
|
|
- "tapLegend": true,
|
|
|
|
"legend": {
|
|
"legend": {
|
|
"show": false,
|
|
"show": false,
|
|
},
|
|
},
|
|
@@ -621,47 +311,20 @@ const cfu = {
|
|
"borderColor": "#FFFFFF",
|
|
"borderColor": "#FFFFFF",
|
|
"linearType": "none"
|
|
"linearType": "none"
|
|
},
|
|
},
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- }
|
|
|
|
|
|
+ "tooltip": tooltip,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
"ring": {
|
|
"ring": {
|
|
"type": "ring",
|
|
"type": "ring",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248",
|
|
|
|
- "#3CA272",
|
|
|
|
- "#5fb7ff",
|
|
|
|
- "#ff8caf",
|
|
|
|
- "#9A60B4"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
0, 3, 0, 3
|
|
0, 3, 0, 3
|
|
],
|
|
],
|
|
- "rotate": false,
|
|
|
|
- "errorReload": true,
|
|
|
|
- "fontSize": 13,
|
|
|
|
- "fontColor": "#666666",
|
|
|
|
- "enableScroll": false,
|
|
|
|
- "touchMoveLimit": 60,
|
|
|
|
- "enableMarkLine": false,
|
|
|
|
|
|
+ "fontSize": 12,
|
|
"dataLabel": false,
|
|
"dataLabel": false,
|
|
- "dataPointShape": true,
|
|
|
|
- "dataPointShapeType": "solid",
|
|
|
|
- "tapLegend": true,
|
|
|
|
"legend": {
|
|
"legend": {
|
|
"show": false,
|
|
"show": false,
|
|
},
|
|
},
|
|
@@ -679,21 +342,11 @@ const cfu = {
|
|
"borderColor": "#FFFFFF",
|
|
"borderColor": "#FFFFFF",
|
|
"linearType": "none"
|
|
"linearType": "none"
|
|
},
|
|
},
|
|
- "tooltip": {
|
|
|
|
- "showBox": true,
|
|
|
|
- "showArrow": false,
|
|
|
|
- "showCategory": false,
|
|
|
|
- "borderRadius": 6,
|
|
|
|
- "bgOpacity": 0.5,
|
|
|
|
- "splitLine": true,
|
|
|
|
- }
|
|
|
|
|
|
+ "tooltip": tooltip,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
"mainline": {
|
|
"mainline": {
|
|
"type": "area",
|
|
"type": "area",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
@@ -746,17 +399,10 @@ const cfu = {
|
|
},
|
|
},
|
|
"mini-line": {
|
|
"mini-line": {
|
|
"type": "line",
|
|
"type": "line",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
10,
|
|
10,
|
|
0,
|
|
0,
|
|
@@ -796,17 +442,10 @@ const cfu = {
|
|
},
|
|
},
|
|
"mini-area": {
|
|
"mini-area": {
|
|
"type": "area",
|
|
"type": "area",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
10,
|
|
10,
|
|
0,
|
|
0,
|
|
@@ -849,22 +488,15 @@ const cfu = {
|
|
},
|
|
},
|
|
"mini-column": {
|
|
"mini-column": {
|
|
"type": "column",
|
|
"type": "column",
|
|
- "canvasId": "",
|
|
|
|
- "canvas2d": false,
|
|
|
|
- "background": "none",
|
|
|
|
"animation": true,
|
|
"animation": true,
|
|
"timing": "easeOut",
|
|
"timing": "easeOut",
|
|
"duration": 500,
|
|
"duration": 500,
|
|
- "color": [
|
|
|
|
- "#0052d4",
|
|
|
|
- "#ff5959",
|
|
|
|
- "#f9b248"
|
|
|
|
- ],
|
|
|
|
|
|
+ "color": color,
|
|
"padding": [
|
|
"padding": [
|
|
0,
|
|
0,
|
|
- 13,
|
|
|
|
|
|
+ 12,
|
|
0,
|
|
0,
|
|
- 13
|
|
|
|
|
|
+ 12
|
|
],
|
|
],
|
|
"dataLabel": false,
|
|
"dataLabel": false,
|
|
"dataPointShape": false,
|
|
"dataPointShape": false,
|