2025年01月29日 建站教程
百度echarts如何实现多条折线效果图,下面web建站小编给大家简单介绍一下具体代码!
代码如下:
var option = {
tooltip: {
trigger: 'axis',
},
grid: {
left: '1%',
right: '2%',
bottom: '20%',
containLabel: true,
},
legend: {
padding: 10,
tooltip: {
show: true,
},
y: 'bottom',
data: ['门诊', '住院', '体检'],
},
xAxis: {
type: 'category',
data: [
'1月11日',
'1月12日',
'1月13日',
'1月14日',
'1月15日',
'1月16日',
'1月17日',
'1月18日',
'1月19日',
'1月20日'
]
},
yAxis: {
type: 'value'
},
series: [{
name: '门诊',
data: [190, 160, 170, 210, 207, 176, 176, 210, 170, 180],
type: 'line',
itemStyle: {
normal: {
color: 'yellow',
lineStyle: {
color: 'yellow'
}
}
},
},
{
name: '住院',
data: [103, 98, 120, 130, 125, 175, 130, 125, 75, 115],
type: 'line',
itemStyle: {
normal: {
color: 'blue',
lineStyle: {
color: 'blue'
}
}
},
},
{
name: '体检',
data: [110, 98, 120, 65, 63, 130, 125, 75, 130, 125],
type: 'line',
itemStyle: {
normal: {
color: 'green',
lineStyle: {
color: 'green'
}
}
},
},
],
}
本文链接:http://so.lmcjl.com/news/22281/