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.
 
 
 
 
 

110 lines
2.2 KiB

var option = {
// title: {
// left: '10%',
// textStyle: {
// fontWeight: 'normal',
// color: '#ccc', //标题颜色
// },
// text: '震动传感器',
// },
legend: {
x: 'center',
y: 'top',
data: ['传感器1', '传感器2'],
textStyle: {
fontWeight: 'normal',
color: '#ccc', //标题颜色
},
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: {
//y轴
show: false,
},
},
yAxis: {
show: true,
type: 'value',
splitLine: { show: false }, //去除网格线
nameTextStyle: {
color: '#abb8ce',
show: false,
},
axisLabel: {
color: '#abb8ce',
show: false,
},
axisTick: {
//y轴刻度线
show: false,
},
axisLine: {
//y轴
show: false,
},
},
series: [
{
name: '传感器1',
data: [320, 932, 401, 834, 290, 530, 620],
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(10,73,130,1)', // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(10,73,130,0)', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
areaStyle: {},
lineStyle: { normal: { color: 'rgb(39,149,243)', width: 2 } },
},
{
name: '传感器2',
data: [420, 232, 401, 234, 490, 230, 420],
type: 'line',
smooth: true,
symbol: 'none',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(91,225,251,1)', // 0% 处的颜色
},
{
offset: 1,
color: 'rgba(91,225,251,0)', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
areaStyle: {},
lineStyle: { normal: { color: 'rgb(91,225,251)', width: 2 } },
},
],
};
export default option;