option = {
title: {
text: '疫情防控数据(虚拟)',
subtext: '2019-nCov虚拟数据'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['确诊人数','治愈人数']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
yAxis: {
type: 'category',
data: ['湖北', '广东', '河南', '浙江', '湖南']
},
series: [
{
name: '确诊人数',
type: 'bar',
data: [4495, 1294,1212 , 1162, 1744, 1001]
},
{
name: '治愈人数',
type: 'line',
data: [4791, 408, 2034, 386, 419, 428]
},
]
};
Done!