Amy0104 commented on code in PR #2136:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2136#discussion_r914338911


##########
seatunnel-ui/src/components/chart/index.ts:
##########
@@ -42,6 +47,22 @@ function initChart<Opt extends ECBasicOption>(
     chart && chart.resize()
   }, 20)
 
+  watch(
+    () => themeStore.darkTheme,
+    () => {
+      chart?.dispose()
+      init()
+    }

Review Comment:
   Why not put the chart.dipose() into the init function?



##########
seatunnel-ui/src/components/chart/index.ts:
##########
@@ -42,6 +47,22 @@ function initChart<Opt extends ECBasicOption>(
     chart && chart.resize()
   }, 20)
 
+  watch(
+    () => themeStore.darkTheme,
+    () => {
+      chart?.dispose()
+      init()
+    }

Review Comment:
   Why not put the chart.dipose() into the init function?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to