Toggle navigation
环形完成占比
By
雨***1
2019-05-21 02:26:05
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
let result = { "msg": "success", "code": 0, "count": 123, //同等级书籍数量 "avg": 82.12, //学员平均成绩 "didCount": 12 //学员做过的书籍数量 }; let stuName = "张三"; option = { backgroundColor: "#eee", title: { text: result.avg.toFixed(2), subtext: '该级别平均成绩', x: 'center', y: 'center', textStyle: { color: "#000", fontSize: 30, fontWeight: 'normal' }, subtextStyle: { color: "rgba(0,0,0,.8)", fontSize: 14, fontWeight: 'normal' } }, tooltip: { trigger: "item", formatter: "{a}
{b} : {c}本,占同级别书籍{d}%" }, legend: { x: 'center', y: 'bottom', data: ['rose3', 'rose5', 'rose6', 'rose7', 'rose8'] }, calculable: true, series: [{ name: '占比', type: 'pie', radius: [100, 130], center: ['50%', '50%'], data: [{ value: result.didCount, name: '已做', itemStyle: { color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ offset: 0, color: '#f6e3a1' }, { offset: 1, color: '#ff4236' }]) }, label: { color: "rgba(0,0,0,.8)", fontSize: 14, formatter: '学员 ' + stuName + ' 已做此级别\n' + result.didCount + '本', rich: { a: { color: "#000", fontSize: 20, lineHeight: 30 }, } } }, { value: result.count - result.didCount, name: '未做', itemStyle: { color: "transparent" } } ] }, { name: '暂未定义', type: 'pie', radius: [110, 120], center: ['50%', '50%'], data: [{ value: result.didCount, name: '已做次级别', itemStyle: { color: "transparent" } }, { value: result.count - result.didCount, name: '未做解蔽', itemStyle: { color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ offset: 0, color: '#348fe6' }, { offset: 1, color: '#625bef' }]) }, label: { color: "rgba(0,0,0,.8)", fontSize: 14, formatter: '该级别共有书籍\n' + result.count + '本', rich: { a: { color: "#000", fontSize: 20, lineHeight: 30 }, } } } ] } ] };