修改测试bug

This commit is contained in:
GGJ
2024-11-13 09:21:26 +08:00
parent 27e0dd3abd
commit 2101d03126
12 changed files with 90 additions and 63 deletions

View File

@@ -120,7 +120,13 @@ const init = () => {
echartsData.value = {
options: {
legend: {
right: 70,
top: 5,
data: res.data.map((item: any[]) => {
return item[0]?.anotherName
})
},
grid: {
top: '60px',
left: '10px',
@@ -176,11 +182,7 @@ const init = () => {
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0
},
legend: {
data: res.data.map((item: any[]) => {
return item[0]?.anotherName
})
},
yAxis: {
name: `单位:(${arr[0].unit == null ? ' / ' : arr[0].unit})`,
type: 'value',
@@ -271,6 +273,7 @@ const init = () => {
if ((echartsData.value.legend = ['A相', 'B相', 'C相'])) {
echartsData.value.color = ['#FFCC00', '#009900', '#CC0000']
}
} else {
echartsData.value = null
}