修改测试bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user