option = {
backgroundColor: '#fff',
tooltip: {
trigger: 'axis'
},
legend: {
color: ["#F58080", "#47D8BE", "#F9A589"],
data: ['综合指数', '清朗指数', '负面指数'],
left: 'center',
bottom: '6%'
},
grid: {
top: 'middle',
left: '3%',
right: '4%',
bottom: '3%',
height: '70%',
containLabel: true
},
xAxis: {
type: 'category',
data: ['00:00','04:00','08:00','12:00','16:00','20:00'],
axisLine: {
lineStyle: {
color: "#999"
}
}
},
yAxis: {
type: 'value',
splitLine: {
lineStyle: {
type: 'dashed',
color: '#DDD'
}
},
axisLine: {
show: false,
lineStyle: {
color: "#333"
},
},
nameTextStyle: {
color: "#999"
},
splitArea: {
show: false
}
},
series: [{
name: '综合指数',
type: 'line',
data: [156,310,220,130,220,89],
color: "#F58080",
lineStyle: {
normal: {
width: 5,
color: {
type: 'linear',
colorStops: [{
offset: 0,
color: '#FFCAD4' // 0% 处的颜色
}, {
offset: 0.4,
color: '#F58080' // 100% 处的颜色
}, {
offset: 1,
color: '#F58080' // 100% 处的颜色
}],
globalCoord: false // 缺省为 false
},
shadowColor: 'rgba(245,128,128, 0.5)',
shadowBlur: 10,
shadowOffsetY: 7
}
},
itemStyle: {
normal: {
color: '#F58080',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: "#F58080"
}
},
smooth: true
},
{
name: '清朗指数',
type: 'line',
data: [189,310,111,222,123,156],
lineStyle: {
normal: {
width: 5,
color: {
type: 'linear',
colorStops: [{
offset: 0,
color: '#AAF487' // 0% 处的颜色
},
{
offset: 0.4,
color: '#47D8BE' // 100% 处的颜色
}, {
offset: 1,
color: '#47D8BE' // 100% 处的颜色
}
],
globalCoord: false // 缺省为 false
},
shadowColor: 'rgba(71,216,190, 0.5)',
shadowBlur: 10,
shadowOffsetY: 7
}
},
itemStyle: {
normal: {
color: '#AAF487',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: "#AAF487"
}
},
smooth: true
},
{
name: '负面指数',
type: 'line',
data: [125,310,160,150,280,56],
lineStyle: {
normal: {
width: 5,
color: {
type: 'linear',
colorStops: [{
offset: 0,
color: '#F6D06F' // 0% 处的颜色
},
{
offset: 0.4,
color: '#F9A589' // 100% 处的颜色
}, {
offset: 1,
color: '#F9A589' // 100% 处的颜色
}
],
globalCoord: false // 缺省为 false
},
shadowColor: 'rgba(249,165,137, 0.5)',
shadowBlur: 10,
shadowOffsetY: 7
}
},
itemStyle: {
normal: {
color: '#F6D06F',
borderWidth: 10,
/*shadowColor: 'rgba(72,216,191, 0.3)',
shadowBlur: 100,*/
borderColor: "#F6D06F"
}
},
smooth: true
}
]
};