136 lines
2.5 KiB
JavaScript
136 lines
2.5 KiB
JavaScript
export default function drpOption(data) {
|
|
return {
|
|
|
|
tooltip: {
|
|
trigger: 'axis',
|
|
},
|
|
grid: [
|
|
{
|
|
top: "15%",
|
|
left: "10%",
|
|
right: "8%",
|
|
width: '80%',
|
|
height: '75%'
|
|
}
|
|
],
|
|
legend: {
|
|
// 显示图例
|
|
show: true,
|
|
textStyle: {
|
|
color: '#fff',
|
|
},
|
|
// 图例的位置
|
|
data: ['渗压水位', '库水位'],
|
|
},
|
|
xAxis: [
|
|
{
|
|
type: 'category',
|
|
data: data.map(o => o.dt),//.reverse(),
|
|
splitLine: {
|
|
show: false
|
|
},
|
|
axisLabel: {
|
|
color: '#fff',
|
|
fontSize: 12,
|
|
show:false,
|
|
},
|
|
axisLine: {
|
|
lineStyle: {
|
|
color: '#07a6ff',
|
|
width: 0.5,
|
|
}
|
|
},
|
|
axisTick: {
|
|
show: false,
|
|
},
|
|
},
|
|
],
|
|
yAxis: [
|
|
{
|
|
inverse: false,
|
|
type: 'value',
|
|
position: 'left',
|
|
name: "渗压水位(m)",
|
|
nameTextStyle: {
|
|
color: '#fff'
|
|
},
|
|
// nameLocation: "start",
|
|
axisLabel: {
|
|
color: '#fff',
|
|
fontSize: 12,
|
|
},
|
|
splitLine: {
|
|
show: true,
|
|
lineStyle: {
|
|
color: '#07a6ff',
|
|
width: 0.25,
|
|
type: 'dotted'
|
|
}
|
|
},
|
|
axisLine: {
|
|
show: false
|
|
},
|
|
axisTick: {
|
|
show: false,
|
|
},
|
|
min: 0,
|
|
max:300
|
|
},
|
|
{
|
|
// gridIndex: 1,
|
|
type: 'value',
|
|
position: 'right',
|
|
name: "库水位(m)",
|
|
nameTextStyle: {
|
|
color: '#fff'
|
|
},
|
|
splitLine: {
|
|
show: false,
|
|
lineStyle: {
|
|
color: '#07a6ff',
|
|
width: 0.25,
|
|
type: 'dotted'
|
|
}
|
|
},
|
|
axisLabel: {
|
|
color: '#fff',
|
|
fontSize: 12,
|
|
},
|
|
axisLine: {
|
|
show: false
|
|
},
|
|
axisTick: {
|
|
show: false,
|
|
},
|
|
min: 0,
|
|
max: 300
|
|
}
|
|
],
|
|
series: [
|
|
{
|
|
yAxisIndex: 0,
|
|
name: '渗压水位',
|
|
type: 'line',
|
|
symbol: 'none',
|
|
color: "#0AE0B5",
|
|
label: {
|
|
show: false,
|
|
},
|
|
data:data.map(o => o.du_value),
|
|
},
|
|
{
|
|
yAxisIndex: 1,
|
|
name: '库水位',
|
|
type: 'line',
|
|
color: "#007AFD",
|
|
symbol: 'none',
|
|
showSymbol: false,
|
|
label: {
|
|
show: false,
|
|
},
|
|
data: data.map(o => o.rz),
|
|
}
|
|
]
|
|
};
|
|
}
|