You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
ec=echarts.init(document.getElementById("inside_cruedAnddied"))
|
|
|
|
|
|
|
|
|
|
var option1 = {
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis'
|
|
|
|
|
},
|
|
|
|
|
title:{
|
|
|
|
|
subtext:'单位:例',
|
|
|
|
|
text:"全国 累计治愈/死亡 趋势",
|
|
|
|
|
left: 'left',
|
|
|
|
|
textStyle:{
|
|
|
|
|
color:'black',
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
left:'right',
|
|
|
|
|
top:'30',
|
|
|
|
|
data: ['治愈', '死亡']
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
left: '3%',
|
|
|
|
|
right: '4%',
|
|
|
|
|
bottom: '3%',
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
toolbox: {
|
|
|
|
|
feature: {
|
|
|
|
|
saveAsImage: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
xAxis: {
|
|
|
|
|
type: 'category',
|
|
|
|
|
data: []
|
|
|
|
|
},
|
|
|
|
|
yAxis: {
|
|
|
|
|
axisLine: {
|
|
|
|
|
show: false
|
|
|
|
|
},
|
|
|
|
|
type: 'value'
|
|
|
|
|
},
|
|
|
|
|
series: [{
|
|
|
|
|
name:'治愈',
|
|
|
|
|
data: [],
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true
|
|
|
|
|
},{
|
|
|
|
|
name:'死亡',
|
|
|
|
|
data: [],
|
|
|
|
|
type: 'line',
|
|
|
|
|
smooth: true
|
|
|
|
|
}]
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
cache: false,
|
|
|
|
|
type:"GET",
|
|
|
|
|
url:"/inside_cruedAnddied",
|
|
|
|
|
data: null,
|
|
|
|
|
dataType : "json",
|
|
|
|
|
async: false,
|
|
|
|
|
error: function(request) {
|
|
|
|
|
alert("发送请求失败!8");
|
|
|
|
|
},
|
|
|
|
|
success: function(result) {
|
|
|
|
|
// crued,died,date
|
|
|
|
|
console.info(result)
|
|
|
|
|
for(i=0;i<result.date.length;++i) {
|
|
|
|
|
option1.series[0].data.push(result.crued[i])
|
|
|
|
|
option1.series[1].data.push(result.died[i])
|
|
|
|
|
option1.xAxis.data.push(result.date[i])
|
|
|
|
|
}
|
|
|
|
|
console.info(result)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ec.setOption(option1)
|
|
|
|
|
|
|
|
|
|
|