Skip to content

Commit c0dc5bc

Browse files
committed
feature/1.8-Improve system observability
1 parent d50fbcd commit c0dc5bc

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

frontend/packages/core/src/pages/serviceOverview/charts/ServiceAreaChart.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ const ServiceAreaChart = ({ customClassNames, dataInfo, height, showAvgLine }: S
211211
}
212212
]
213213
}
214-
setOption(option)
214+
const echartsInstance = chartRef.current?.getEchartsInstance()
215+
if (echartsInstance) {
216+
echartsInstance.setOption(option)
217+
}
215218
}
216219
// 使用深度监听来确保图表数据更新
217220
useEffect(() => {

frontend/packages/core/src/pages/serviceOverview/charts/ServiceBarChar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ const ServiceBarChar = ({ customClassNames, dataInfo, height, showAvgLine, showL
308308
data: item.value
309309
}))
310310
}
311-
setOption(option)
311+
const echartsInstance = chartRef.current?.getEchartsInstance()
312+
if (echartsInstance) {
313+
echartsInstance.setOption(option)
314+
}
312315
}
313316

314317
// 使用深度监听来确保图表数据更新

0 commit comments

Comments
 (0)