diff --git a/frontend/src/frameworks/components/charts/EChartsBase.tsx b/frontend/src/frameworks/components/charts/EChartsBase.tsx index 665cf84..c4629e9 100644 --- a/frontend/src/frameworks/components/charts/EChartsBase.tsx +++ b/frontend/src/frameworks/components/charts/EChartsBase.tsx @@ -53,8 +53,12 @@ export const EChartsBase: React.FC = ({ // Update option useEffect(() => { - if (!chartRef.current) return; - chartRef.current.setOption(option, { notMerge: true }); + if (!chartRef.current || !option) return; + try { + chartRef.current.setOption(option, { notMerge: true }); + } catch (e) { + console.warn('ECharts setOption error:', e); + } }, [option]); // Handle loading state diff --git a/frontend/src/frameworks/hooks/useImportData.ts b/frontend/src/frameworks/hooks/useImportData.ts index d3a4cb8..07fa96f 100644 --- a/frontend/src/frameworks/hooks/useImportData.ts +++ b/frontend/src/frameworks/hooks/useImportData.ts @@ -60,8 +60,9 @@ export function useImportData() { try { const rowsResp = await dataServiceClient.getRows(dataSetId, 10000); rows = rowsResp.rows ?? rowsResp ?? []; - } catch { - // rows fetch failed, continue without + console.log(`[DataViz] Fetched ${rows.length} rows for dataset ${dataSetId}`); + } catch (e) { + console.error('[DataViz] Failed to fetch rows:', e); } const dataSet = mapBackendDataSet(rawDataSet, rows);