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":"\u803d\u8bef"},{"value":"10","name":"\u62a2\u52ab"},{"value":"10","name":"\u9f9f\u7f29"},{"value":"10","name":"\u963b\u6321"},{"value":"10","name":"\u803d\u6401"},{"value":"10","name":"\u7ad6\u8d77"},{"value":"10","name":"\u652f"},{"value":"10","name":"\u4e3e"},{"value":"10","name":"\u63a8\u4e3e"},{"value":"10","name":"\u4e3e\u8d77"}] } ] };console.log(option); if (option && typeof option === 'object') { myChart.setOption(option); }