option = { backgroundColor: '#fff', tooltip: { trigger: 'item', formatter: '{b}:({d}%)', }, legend: [ { top: 'center', orient: 'vertical', right: '10%', itemWidth: 16, itemHeight: 16, icon: 'circle', itemGap: 20, textStyle: { color: '#4E5969', fontSize: 18, padding: [0, 0, 0, 10], }, data: ['商品房', '集资房', '房改房', '安居工程房', '存量房'], }], grid: { containLabel: true, }, title: { text: `{a| 建筑物 }`, textStyle: { rich: { a: { fontSize: 14, color: '#1D2129', }, }, }, subtext: `{a|分类}`, subtextStyle: { rich: { a: { fontSize: 14, color: '#1D2129', padding: [0, 0, 0, 7], }, }, }, x: '37%', y: '46%', }, series: [ { type: 'pie', radius: ['40%', '60%'], center: ['40%', '50%'], color: [ '#86DF6C', '#249EFF', '#0E42D2', '#846BCE', '#21CCFF', ], label: { position: 'outside', show: true, color: '#4E5969', fontSize: 16, formatter: function (params) { if (params.name !== '') { return params.percent + '%'; } }, }, labelLine: { show: true, length2: 30, length: 10, }, itemStyle: { normal: { borderWidth: 2, borderColor: '#fff', }, }, data: [ { value: '36', name: '商品房' }, { value: '48', name: '集资房' }, { value: '31', name: '房改房' }, { value: '29', name: '安居工程房' }, { value: '44', name: '存量房' }, ], }, ], }