趋势图修改

This commit is contained in:
hzz 2023-06-08 16:12:49 +08:00
parent 644dc8a06e
commit 7a9efc72a8
2 changed files with 4 additions and 5 deletions

View File

@ -62,6 +62,9 @@ async function ajax() {
let tempData = {}
res.data.forEach((item: any) => {
if (unit) {
item.name = item.name + '(' + unit + ')'
}
if (tempData.hasOwnProperty(item.id)) {
tempData[item.id].data.push({
name: item.type,

View File

@ -77,11 +77,7 @@ function init() {
watch(() => prop.calc.data, (newVal) => {
data = newVal
myChart.setOption({
series: [
{
data: data
}
]
series: data
})
})