We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 965315e commit e90687cCopy full SHA for e90687c
src/components/ChartInner.js
@@ -4,6 +4,8 @@ import Raf from '../utils/Raf'
4
import Utils from '../utils/Utils'
5
import ChartContext from '../utils/ChartContext'
6
7
+import useIsomorphicLayoutEffect from '../hooks/useIsomorphicLayoutEffect'
8
+
9
import Rectangle from '../primitives/Rectangle'
10
11
import Voronoi from './Voronoi'
@@ -158,6 +160,16 @@ export default React.forwardRef(function ChartInner(
158
160
)
159
161
})
162
163
+ useIsomorphicLayoutEffect(() => {
164
+ if (
165
+ ref.current &&
166
+ ref.current.parentElement &&
167
+ !ref.current.parentElement.style.position
168
+ ) {
169
+ ref.current.parentElement.style.position = 'relative'
170
+ }
171
+ })
172
173
return (
174
<div
175
ref={ref}
0 commit comments