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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
ec = echarts . init ( document . getElementById ( "outside_diedAndcrued" ) )
var option1 = {
title : {
text : '国外累积治愈/累积死亡趋势' ,
subtext : '单位:例' ,
left : 'left' ,
textStyle : {
color : 'black' ,
}
} ,
tooltip : {
trigger : 'axis'
} ,
legend : {
left : 'right' ,
top : '30' ,
data : [ '死亡' , '治愈' ]
} ,
grid : {
left : '3%' ,
right : '4%' ,
bottom : '3%' ,
containLabel : true
} ,
toolbox : {
feature : {
saveAsImage : { }
}
} ,
xAxis : {
type : 'category' ,
boundaryGap : false ,
data : [ ]
} ,
yAxis : {
axisLine : {
show : false
} ,
type : 'value'
} ,
series : [
{
name : '死亡' ,
type : 'line' ,
stack : '总量' ,
data : [ ]
} ,
{
name : '治愈' ,
type : 'line' ,
stack : '总量' ,
data : [ ]
}
]
} ;
$ . ajax ( {
cache : false ,
type : "GET" ,
url : "/outside_diedAndcrued" ,
data : null ,
dataType : "json" ,
async : false ,
error : function ( request ) {
alert ( "发送请求失败! 13" ) ;
} ,
success : function ( result ) {
// confirmed,curConfirmed,date
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 )