Toggle navigation
全国大学生数学建模竞赛
By
y***人
2018-03-27 05:21:51
脚本
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
图表已生成
整理代码
刷新
代码
var scale = 1; //国家一等奖7项、国家二等奖50项, //省一等奖85项、省二等奖56项、省三等奖41项。 //提名奖(Finalist Winner)一项、 //一等奖(Meritorious Winner)11项、二等奖(Honorable Mention)39项 var echartData =[{ name: '国家一等奖', value: 7 },{ name: '国家二等奖', value: 50 },{ name: '省一等奖', value: 85 },{ name: '省二等奖', value: 56 },{ name: '省三等奖', value: 41 }] var echartData2 =[{ name: '提名奖', value: 1 },{ name: '一等奖', value: 11 },{ name: '二等奖', value: 39 }] var rich = { yellow: { color: "#659F83", fontSize: 18 * scale, padding: [5, 4], align: 'center' }, total: { color: "#659F83", fontSize: 18 * scale, align: 'center' }, white: { color:'#333333', align: 'center', fontSize: 14 * scale, padding: [5, 0] }, blue: { color: '#222222', fontSize: 14 * scale, align: 'left' } } option = { title: [{ text:'全国大学生数学建模竞赛', left:'19%', top:'10%', padding:[24,0], textStyle:{ fontSize:18*scale, align:'center' } },{ text:'美国大学生数学建模竞赛', left:'57%', top:'10%', padding:[24,0], textStyle:{ fontSize:18*scale, align:'center' } }], legend: [{ selectedMode:false, formatter: function(name) { var total = 0; //各科正确率总和 var averagePercent; //综合正确率 echartData.forEach(function(value, index, array) { total += value.value; }); return '{total|' + total +'人'+ '}'; }, data: [echartData[0].name], // data: ['高等教育学'], // itemGap: 50, left: '23%', top: 'center', icon: 'none', align:'center', textStyle: { fontSize: 16 * scale, rich: rich }, },{ formatter: function(name) { var total = 0; //各科正确率总和 var averagePercent; //综合正确率 echartData2.forEach(function(value, index, array) { total += value.value; }); return '{total|' + total +'人'+ '}'; }, data: [echartData[1].name], // data: ['高等教育学'], // itemGap: 50, left: '63%', top: 'center', icon: 'none', align:'center', textStyle: { fontSize: 16 * scale, rich: rich }, }], series: [{ name: '课程满意度', type: 'pie', center:['25%','50%'], radius: ['20%', '30%'], hoverAnimation: false, color: ['#c487ee', '#deb140', '#49dff0', '#034079', '#6f81da', '#00ffb4','#659F83','#08C7AE'], label: { normal: { formatter: function(params, ticket, callback) { var total = 0; //考生总数量 var percent = 0; //考生占比 echartData.forEach(function(value, index, array) { total += value.value; }); percent = ((params.value / total) * 100).toFixed(1); return '{white|' + params.name + '}\n{white|' + params.value +'人'+ '}:{blue|' + percent + '%}'; }, rich: rich }, }, labelLine: { normal: { length: 25 * scale, length2: 0, lineStyle: { color: '#0b5263' } } }, data: echartData },{ name: '课程满意度', type: 'pie', center:['65%','50%'], radius: ['20%', '30%'], hoverAnimation: false, color: ['#c487ee', '#deb140', '#49dff0', '#034079', '#6f81da', '#00ffb4','#659F83','#08C7AE'], label: { normal: { formatter: function(params, ticket, callback) { var total = 0; //考生总数量 var percent = 0; //考生占比 echartData2.forEach(function(value, index, array) { total += value.value; }); percent = ((params.value / total) * 100).toFixed(1); return '{white|' + params.name + '}:{yellow|' + params.value +'人'+ '}\n{blue|' +'('+ percent + '%)}'; }, rich: rich }, }, labelLine: { normal: { length: 25 * scale, length2: 0, lineStyle: { color: '#0b5263' } } }, data: echartData2 }] };