From 4300a8f6f504f2ea42642639fcd05d413bc1dd0e Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 15 May 2024 06:30:42 +0200 Subject: [PATCH] improve agcharts2 --- .../apps/components/display/charts/AppAgCharts.svelte | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/apps/components/display/charts/AppAgCharts.svelte b/frontend/src/lib/components/apps/components/display/charts/AppAgCharts.svelte index 3f690a4fe1..00bc7fa134 100644 --- a/frontend/src/lib/components/apps/components/display/charts/AppAgCharts.svelte +++ b/frontend/src/lib/components/apps/components/display/charts/AppAgCharts.svelte @@ -48,7 +48,7 @@ loading: false }) - let result: undefined = undefined + let result: undefined | any = undefined const resolvedConfig = initConfig( components['agchartscomponent'].initialData.configuration, @@ -215,10 +215,12 @@ return } + if (typeof result !== 'object') { + return + } const options = { container: document.getElementById(`agchart-${id}`) as HTMLElement, - data: result?.['data'], - series: result?.['series'] + ...result } outputs.result.set({