@@ -171,59 +171,63 @@ export function useECharts<T extends HTMLElement>({
171171 if ( ! echartsInstance ) return
172172
173173 if ( group ) echartsInstance . group = group
174- } , [ group , started ] )
174+ } , [ group , started , echartsInstance ] )
175175
176176 useEffect ( ( ) => {
177177 if ( ! echartsInstance ) return
178178
179179 echartsInstance . clear ( )
180180 echartsInstance . setOption (
181181 {
182- angleAxis,
183- animation,
184- animationDelay,
185- animationDelayUpdate,
186- animationDuration,
187- animationDurationUpdate,
188- animationEasing,
189- animationEasingUpdate,
190- animationThreshold,
191- aria,
192- axisPointer,
193- backgroundColor,
194- blendMode,
195- brush,
196- calendar,
197- color,
198- darkMode,
199- dataset,
200- dataZoom,
201- geo,
202- graphic,
203- grid,
204- hoverLayerThreshold,
205- legend,
206- media,
207- options,
208- parallel,
209- parallelAxis,
210- polar,
211- progressive,
212- progressiveThreshold,
213- radar,
214- radiusAxis,
215182 series,
216- singleAxis,
217- stateAnimation,
218- textStyle,
219- timeline,
220- title,
221- toolbox,
222- tooltip,
223183 useUTC,
224- visualMap,
225184 xAxis,
226- yAxis
185+ yAxis,
186+ progressive,
187+ blendMode,
188+ hoverLayerThreshold,
189+ progressiveThreshold,
190+ ...( angleAxis && { angleAxis } ) ,
191+ ...( animation && { animation } ) ,
192+ ...( animationDelay && { animationDelay } ) ,
193+ ...( animationDelayUpdate && { animationDelayUpdate } ) ,
194+ ...( animationDuration && { animationDuration } ) ,
195+ ...( animationDurationUpdate && { animationDurationUpdate } ) ,
196+ ...( animationEasing && { animationEasing } ) ,
197+ ...( animationEasingUpdate && { animationEasingUpdate } ) ,
198+ ...( animationThreshold && { animationThreshold } ) ,
199+ ...( aria && { aria } ) ,
200+ ...( axisPointer && { axisPointer } ) ,
201+ ...( backgroundColor && { backgroundColor } ) ,
202+ ...( brush && { brush } ) ,
203+ ...( calendar && { calendar } ) ,
204+ ...( color && { color } ) ,
205+ ...( darkMode && { darkMode } ) ,
206+ ...( dataset && { dataset } ) ,
207+ ...( dataZoom && { dataZoom } ) ,
208+ ...( geo && { geo } ) ,
209+ ...( graphic && { graphic } ) ,
210+ ...( grid && { grid } ) ,
211+ ...( legend && { legend } ) ,
212+ ...( media && { media } ) ,
213+ ...( options && { options } ) ,
214+ ...( parallel && { parallel } ) ,
215+ ...( parallelAxis && { parallelAxis } ) ,
216+ ...( polar && { polar } ) ,
217+ ...( radar && { radar } ) ,
218+ ...( radiusAxis && { radiusAxis } ) ,
219+ ...( series && { series } ) ,
220+ ...( singleAxis && { singleAxis } ) ,
221+ ...( stateAnimation && { stateAnimation } ) ,
222+ ...( textStyle && { textStyle } ) ,
223+ ...( timeline && { timeline } ) ,
224+ ...( title && { title } ) ,
225+ ...( toolbox && { toolbox } ) ,
226+ ...( tooltip && { tooltip } ) ,
227+ ...( useUTC && { useUTC } ) ,
228+ ...( visualMap && { visualMap } ) ,
229+ ...( xAxis && { xAxis } ) ,
230+ ...( yAxis && { yAxis } )
227231 } ,
228232 {
229233 lazyUpdate,
@@ -288,7 +292,8 @@ export function useECharts<T extends HTMLElement>({
288292 transition ,
289293
290294 //
291- started
295+ started ,
296+ echartsInstance
292297 ] )
293298
294299 useEffect ( ( ) => {
@@ -431,8 +436,8 @@ export function useECharts<T extends HTMLElement>({
431436 onTimelineChanged ,
432437 onTimelinePlayChanged ,
433438
434- //
435- started
439+ started ,
440+ echartsInstance
436441 ] )
437442
438443 return [ setContainerRef , echartsRef . current ]
0 commit comments