function jkzb(zb_guiji, zb_gongxiang) { var myChart_eventPie = echarts.init(document.getElementById('jkzb')); option_eventPie = { color: ['#0ad5c8', '#89ca75'], tooltip: { trigger: 'item', formatter: '{a}
{b}: {c} ({d}%)' }, legend: { orient: 'horizontal', top: '160', left: 'center', data: ['归集接口', '共享接口'], textStyle: { fontSize: 12, color: '#00cdef' }, }, series: [ { name: '接口占比', type: 'pie', center: ['50%', '40%'], radius: ['50%', '60%'], avoidLabelOverlap: false, label: { show: false, position: 'center' }, emphasis: { label: { show: true, fontSize: '25', fontWeight: 'bold' } }, labelLine: { show: false }, data: [ {value: zb_guiji, name: '归集接口'}, {value: zb_gongxiang, name: '共享接口'}, ], } ] }; myChart_eventPie.setOption(option_eventPie); }