2023.1.6今天我学习了如何使用echarts pie饼图,效果如:
首先是给容器设置id,宽高
然后是
var pieChart = echarts.init(document.getElementById('pie'));
pieChart.setOption({
title: {
text: '当前行业总体分布',
textStyle: {
color: 'white'
},
left: "20px",
top: "10px"
},
tooltip: {
show: true,
},
legend: {
show: true,
textStyle: {
color: 'white'
},
top: '40px'
},
series: [{
name: '其他',
type: 'pie',
color: 'rgb(0,143,187)',
//设置环形效果
radius: ['35%', '50%'],
data: [100],
}]
});