var myCharts7 = echarts.init(document.getElementById("main7")); var option7 = { title: { text: '全国各地区现有确诊人数', subtext: '', left: 'center', textStyle:{ fontFamily:'微软雅黑' } }, tooltip: {}, xAxis: { type: 'category', data: [], axisLabel:{ interval:0,//横轴信息全部显示 } }, yAxis: { type: 'value' }, series: [{ name:'现有确诊病例:', data: [], type: 'bar', label: { //每个柱子顶端显示数值 normal: { show: true, position: 'top' } } }] }; // 向后台发起请求,获取数据 $.ajax({ cache: false, type:"GET", url:"/province_curconfirm", data: null, dataType : "json", async: false, error: function(request) { alert("发送请求失败!"); }, success: function(result) { // pub_date, privinces, curConfirms option7.title.subtext = "数据更新时间: " + result.pub_date for(i=0; i