var dom = document.getElementById("siyi"); var myChart = echarts.init(dom); var app = {}; var option;option = { tooltip: { trigger: 'item', //formatter: "{b} : {c} ({d}%)" formatter: "{b} :{d}%" }, legend: { show: false, top: '5%', left: 'center' }, series: [ { name: '', type: 'pie', radius: ['40%', '70%'], avoidLabelOverlap: false, label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: '20', fontWeight: 'normal' } }, labelLine: { show: false }, data: [{"value":"10","name":"\u9a8c\u8bc1"},{"value":"9","name":"\u8bc1\u660e"},{"value":"8","name":"\u8bc1\u5b9e"},{"value":"5","name":"\u786e\u5b9a"},{"value":"5","name":"\u8bc1\u636e"},{"value":"5","name":"\u6821\u9a8c"},{"value":"10","name":"\u9a8c\u8bc1"},{"value":"10","name":"\u9274\u5b9a"},{"value":"10","name":"\u8bc1\u5b9e"},{"value":"10","name":"\u68c0\u9a8c"},{"value":"10","name":"\u6838\u5bf9"}] } ] };console.log(option); if (option && typeof option === 'object') { myChart.setOption(option); }