File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function defaultChartOptions<TDatum>(
70
70
interactionMode : options . interactionMode ?? 'primary' ,
71
71
showVoronoi : options . showVoronoi ?? false ,
72
72
defaultColors : options . defaultColors ?? defaultColorScheme ,
73
- useIntersectionObserver : options . useIntersectionObserver ?? true ,
73
+ useIntersectionObserver : options . useIntersectionObserver ?? false ,
74
74
intersectionObserverRootMargin :
75
75
options . intersectionObserverRootMargin ?? '1000px' ,
76
76
primaryCursor : options . primaryCursor ?? true ,
@@ -162,7 +162,7 @@ export function Chart<TDatum>({
162
162
}
163
163
} , [ containerEl ] )
164
164
165
- const [ isIntersecting , setIsIntersecting ] = React . useState ( false )
165
+ const [ isIntersecting , setIsIntersecting ] = React . useState ( true )
166
166
167
167
React . useEffect ( ( ) => {
168
168
if ( ! containerEl || ! options . useIntersectionObserver ) return
@@ -208,9 +208,9 @@ export function Chart<TDatum>({
208
208
height,
209
209
} }
210
210
>
211
- { isIntersecting ? (
211
+ { options . useIntersectionObserver && ! isIntersecting ? null : (
212
212
< ChartInner options = { options } { ...{ width, height } } />
213
- ) : null }
213
+ ) }
214
214
</ div >
215
215
)
216
216
}
You can’t perform that action at this time.
0 commit comments