var myChart3 = echarts.init(document.getElementById("main3")); //画现有确诊人数top5省份饼图 var option3 = { title: { text: '现有确诊人数Top5的省份', subtext: '', left: 'center', textStyle:{ color:'#FF0000', fontFamily:'微软雅黑' } }, tooltip: { trigger: 'item', formatter: '{a}
{b} : {c} ({d}%)' }, legend: { type: 'scroll', orient: 'vertical', right: 10, top: 20, bottom: 20, data: [] }, series: [ { name: '省份', type: 'pie', radius: '55%', center: ['40%', '50%'], data: [], emphasis: { itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ] }; // 向后台发起请求,获取数据 $.ajax({ cache: false, type:"GET", url:"/ProvinceConfirmed_top5", data: null, dataType : "json", async: false, error: function(request) { alert("发送请求失败!4"); }, success: function(result) { // pub_date, privinces, curConfirms option3.title.subtext = "数据更新时间: " + result.pub_date for(i=0; i