fix(echart): initial chart animation (#34516)

This commit is contained in:
JUST.in DO IT
2025-08-02 04:41:53 -07:00
committed by GitHub
parent daf207e5c2
commit 1a7a381bd5

View File

@@ -174,6 +174,8 @@ function Echart(
if (!chartRef.current) {
chartRef.current = init(divRef.current, null, { locale });
}
// did mount
handleSizeChange({ width, height });
setDidMount(true);
});
}, [locale]);
@@ -235,9 +237,6 @@ function Echart(
echartOptions,
);
chartRef.current?.setOption(themedEchartOptions, true);
// did mount
handleSizeChange({ width, height });
}
}, [didMount, echartOptions, eventHandlers, zrEventHandlers, theme]);