console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>各年级参赛成绩分析</title>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.3.3/echarts.js"script></script>
</head>
<body>
<div id="one" style="width:700px; height:400px;"></div>
<div id="two" style="width:700px; height:300px;"></div>
<script type="text/javascript">
var myChart1=echarts.init(document.getElementById("one"));
var option1 ={
title:{
text:'各年级竞赛成绩分析',
top:'6%',
left:'center',
},
tooltip:{
trigger:'item',
formatter:'{a} <br/>{b}:{c}'
},
legend:{
left: 'right',
top:'6%',
data: ['大三','大二','大一']
},
series: [
{
name:'人数:',
type: 'pie',
radius: ['5%','20%'],
data: [{
value:5,
name:'大三'
},
{
value: 3,
name:'大二'
},
{
value: 2,
name:'大一'
},
],
label:{
position:'inner',
fontSize:10
},
emphasis:{
itemStyle:{
shadowBlur:20,
shadowOffsetx:10,
shadowColor:'rgba(0,0,0,0.5)'
}
}
},
{
name:'成绩',
type: 'pie',
radius: ['30%', '40%'],
labelLine:{
length:30,
},
label:{
},
data:[{
value:165,
name:'20054080-高狄'
},
{
value: 113,
name:'20668801-白蓉'
},
{
value: 119,
name:'20668802-李思真'
},
{
value: 116,
name:'20668803-金紫萱'
},
{
value:103,
name:'21668801-李宏卓',
},
{
value: 111,
name:'21668802-张晓凡'
},
{
value: 101,
name:'21668803-赵鸿飞'
},
{
value: 105,
name:'22668802-马腾飞'
},
{
value: 108,
name:'22668803-张振海'
},
],
},
]
};
</script>
</body>
</html>