|
@ -1,20 +1,28 @@ |
|
|
var option = { |
|
|
var option = { |
|
|
title: { |
|
|
title: { |
|
|
left: '10%', |
|
|
left: '10%', |
|
|
|
|
|
textStyle: { |
|
|
|
|
|
fontWeight: 'normal', |
|
|
|
|
|
color: '#fff', //标题颜色
|
|
|
|
|
|
}, |
|
|
text: '震动传感器', |
|
|
text: '震动传感器', |
|
|
}, |
|
|
}, |
|
|
legend: { |
|
|
legend: { |
|
|
x: 'center', |
|
|
x: 'center', |
|
|
y: 'top', |
|
|
y: 'top', |
|
|
data: ['传感器1', '传感器2'], |
|
|
data: ['传感器1', '传感器2'], |
|
|
|
|
|
textStyle: { |
|
|
|
|
|
fontWeight: 'normal', |
|
|
|
|
|
color: '#fff', //标题颜色
|
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
xAxis: { |
|
|
xAxis: { |
|
|
type: 'category', |
|
|
type: 'category', |
|
|
|
|
|
boundaryGap: false, |
|
|
axisLine: { |
|
|
axisLine: { |
|
|
//y轴
|
|
|
//y轴
|
|
|
show: false, |
|
|
show: false, |
|
|
}, |
|
|
}, |
|
|
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
|
|
|
|
}, |
|
|
}, |
|
|
yAxis: { |
|
|
yAxis: { |
|
|
show: true, |
|
|
show: true, |
|
@ -43,12 +51,56 @@ var option = { |
|
|
data: [120, 932, 401, 534, 290, 530, 320], |
|
|
data: [120, 932, 401, 534, 290, 530, 320], |
|
|
type: 'line', |
|
|
type: 'line', |
|
|
smooth: true, |
|
|
smooth: true, |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: { |
|
|
|
|
|
type: 'linear', |
|
|
|
|
|
x: 0, |
|
|
|
|
|
y: 0, |
|
|
|
|
|
x2: 0, |
|
|
|
|
|
y2: 1, |
|
|
|
|
|
colorStops: [ |
|
|
|
|
|
{ |
|
|
|
|
|
offset: 0, |
|
|
|
|
|
color: '#0A4982', // 0% 处的颜色
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
offset: 1, |
|
|
|
|
|
color: '#243859', // 100% 处的颜色
|
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
global: false, // 缺省为 false
|
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
areaStyle: {}, |
|
|
|
|
|
lineStyle: { normal: { width: 4 } }, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '传感器2', |
|
|
name: '传感器2', |
|
|
data: [220, 632, 101, 834, 490, 630, 220], |
|
|
data: [220, 632, 101, 834, 490, 630, 220], |
|
|
type: 'line', |
|
|
type: 'line', |
|
|
smooth: true, |
|
|
smooth: true, |
|
|
|
|
|
itemStyle: { |
|
|
|
|
|
color: { |
|
|
|
|
|
type: 'linear', |
|
|
|
|
|
x: 0, |
|
|
|
|
|
y: 0, |
|
|
|
|
|
x2: 0, |
|
|
|
|
|
y2: 1, |
|
|
|
|
|
colorStops: [ |
|
|
|
|
|
{ |
|
|
|
|
|
offset: 0, |
|
|
|
|
|
color: '#B2F2FC', // 0% 处的颜色
|
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
offset: 1, |
|
|
|
|
|
color: '#5BE1FB', // 100% 处的颜色
|
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
global: false, // 缺省为 false
|
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
areaStyle: {}, |
|
|
|
|
|
lineStyle: { normal: { width: 4 } }, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
}; |
|
|
}; |
|
|