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

(cherry picked from commit 1a7a381bd5)
This commit is contained in:
JUST.in DO IT
2025-08-02 04:41:53 -07:00
committed by Michael S. Molina
parent c2238b92cc
commit bcbf17bdf3

View File

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