|
|
@ -1,16 +1,64 @@ |
|
|
|
/* eslint-disable max-len */ |
|
|
|
export const colors = ['#5470C6', '#91CC75', '#EE6666', '#5470C6', '#91CC75', '#EE6666', '#5470C6', '#91CC75', '#5470C6']; |
|
|
|
export const colors = ['#EAB308', '#F97316', '#EC4899', '#F43F5E', '#D946EF', '#06B6D4', '#0EA5E9', '#3B82F6', '#6366F1']; |
|
|
|
|
|
|
|
export const itemColor = { |
|
|
|
'钢腐蚀电流(nA)': colors[5], |
|
|
|
'铜腐蚀电流(nA)': colors[6], |
|
|
|
'铝腐蚀电流(nA)': colors[7], |
|
|
|
'锌腐蚀电流(nA)': colors[8], |
|
|
|
'SO2(ppb)': colors[0], |
|
|
|
'盐分阻抗(Ω)': colors[1], |
|
|
|
'盐分温度(℃)': colors[2], |
|
|
|
'环境温度(℃)': colors[3], |
|
|
|
'环境湿度(RH%)': colors[4], |
|
|
|
}; |
|
|
|
|
|
|
|
export const legendData = [ |
|
|
|
'SO2(ppb)', |
|
|
|
'盐分阻抗(Ω)', |
|
|
|
'盐分温度(℃)', |
|
|
|
'环境温度(℃)', |
|
|
|
'环境湿度(RH%)', |
|
|
|
'锌腐蚀电流(nA)', |
|
|
|
'铜腐蚀电流(nA)', |
|
|
|
'铝腐蚀电流(nA)', |
|
|
|
'钢腐蚀电流(nA)', |
|
|
|
{ |
|
|
|
name: 'SO2(ppb)', |
|
|
|
itemStyle: { color: colors[0] }, |
|
|
|
listStyle: { color: colors[0] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '盐分阻抗(Ω)', |
|
|
|
itemStyle: { color: colors[1] }, |
|
|
|
listStyle: { color: colors[1] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '盐分温度(℃)', |
|
|
|
itemStyle: { color: colors[2] }, |
|
|
|
listStyle: { color: colors[2] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '环境温度(℃)', |
|
|
|
itemStyle: { color: colors[3] }, |
|
|
|
listStyle: { color: colors[3] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '环境湿度(RH%)', |
|
|
|
itemStyle: { color: colors[4] }, |
|
|
|
listStyle: { color: colors[4] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '锌腐蚀电流(nA)', |
|
|
|
itemStyle: { color: colors[5] }, |
|
|
|
listStyle: { color: colors[5] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '铜腐蚀电流(nA)', |
|
|
|
itemStyle: { color: colors[6] }, |
|
|
|
listStyle: { color: colors[6] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '铝腐蚀电流(nA)', |
|
|
|
itemStyle: { color: colors[7] }, |
|
|
|
listStyle: { color: colors[7] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: '钢腐蚀电流(nA)', |
|
|
|
itemStyle: { color: colors[8] }, |
|
|
|
listStyle: { color: colors[8] }, |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
// 默认legend select
|
|
|
@ -35,7 +83,7 @@ export const yAxisData = [ |
|
|
|
position: 'left', |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { color: colors[0] }, |
|
|
|
lineStyle: { color: colors[6] }, |
|
|
|
}, |
|
|
|
axisLabel: { formatter: '{value}' }, |
|
|
|
axisPointer: { show: false }, |
|
|
@ -47,7 +95,7 @@ export const yAxisData = [ |
|
|
|
position: 'right', |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { color: colors[1] }, |
|
|
|
lineStyle: { color: colors[3] }, |
|
|
|
}, |
|
|
|
axisLabel: { formatter: '{value}' }, |
|
|
|
axisPointer: { show: false }, |
|
|
@ -59,7 +107,7 @@ export const yAxisData = [ |
|
|
|
position: 'right', |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { color: colors[2] }, |
|
|
|
lineStyle: { color: colors[4] }, |
|
|
|
}, |
|
|
|
axisLabel: { formatter: '{value}' }, |
|
|
|
axisPointer: { show: false }, |
|
|
@ -72,7 +120,7 @@ export const yAxisData = [ |
|
|
|
offset: 150, |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { color: colors[3] }, |
|
|
|
lineStyle: { color: colors[0] }, |
|
|
|
}, |
|
|
|
axisLabel: { formatter: '{value}' }, |
|
|
|
axisPointer: { show: false }, |
|
|
@ -85,7 +133,7 @@ export const yAxisData = [ |
|
|
|
offset: 220, |
|
|
|
axisLine: { |
|
|
|
show: true, |
|
|
|
lineStyle: { color: colors[4] }, |
|
|
|
lineStyle: { color: colors[1] }, |
|
|
|
}, |
|
|
|
axisLabel: { formatter: '{value}' }, |
|
|
|
axisPointer: { show: false }, |
|
|
|