@octanejs/recharts 0.1.62 → 0.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/package.json +5 -5
  2. package/src/animation/AnimatedItems.tsrx +36 -31
  3. package/src/animation/CSSTransitionAnimate.tsrx +1 -2
  4. package/src/animation/JavascriptAnimate.tsrx +1 -2
  5. package/src/cartesian/Area.tsrx +414 -386
  6. package/src/cartesian/AreaRevealShape.tsrx +103 -84
  7. package/src/cartesian/Bar.tsrx +343 -317
  8. package/src/cartesian/BarStack.tsrx +33 -28
  9. package/src/cartesian/CartesianAxis.tsrx +168 -165
  10. package/src/cartesian/CartesianGrid.tsrx +256 -272
  11. package/src/cartesian/ErrorBar.tsrx +108 -104
  12. package/src/cartesian/Funnel.tsrx +405 -382
  13. package/src/cartesian/GraphicalItemClipPath.tsrx +4 -8
  14. package/src/cartesian/Line.tsrx +190 -177
  15. package/src/cartesian/LineDrawShape.tsrx +14 -15
  16. package/src/cartesian/ReferenceLine.tsrx +119 -105
  17. package/src/cartesian/Scatter.tsrx +416 -398
  18. package/src/cartesian/XAxis.tsrx +39 -32
  19. package/src/cartesian/YAxis.tsrx +47 -37
  20. package/src/cartesian/ZAxis.tsrx +76 -73
  21. package/src/chart/AreaChart.tsrx +15 -11
  22. package/src/chart/BarChart.tsrx +15 -11
  23. package/src/chart/CategoricalChart.tsrx +32 -26
  24. package/src/chart/ComposedChart.tsrx +15 -11
  25. package/src/chart/FunnelChart.tsrx +15 -11
  26. package/src/chart/LineChart.tsrx +15 -11
  27. package/src/chart/PieChart.tsrx +15 -11
  28. package/src/chart/PolarChart.tsrx +45 -48
  29. package/src/chart/RadarChart.tsrx +38 -32
  30. package/src/chart/RadialBarChart.tsrx +15 -11
  31. package/src/chart/RechartsWrapper.tsrx +214 -162
  32. package/src/chart/Sankey.tsrx +412 -378
  33. package/src/chart/ScatterChart.tsrx +15 -11
  34. package/src/chart/SunburstChart.tsrx +162 -155
  35. package/src/component/ActivePoints.tsrx +19 -13
  36. package/src/component/Cursor.tsrx +25 -18
  37. package/src/component/DefaultLegendContent.tsrx +131 -127
  38. package/src/component/DefaultTooltipContent.tsrx +46 -42
  39. package/src/component/Dots.tsrx +11 -5
  40. package/src/component/Label.tsrx +69 -55
  41. package/src/component/LabelList.tsrx +32 -27
  42. package/src/component/Legend.tsrx +120 -123
  43. package/src/component/ResponsiveContainer.tsrx +18 -11
  44. package/src/component/Text.tsrx +50 -43
  45. package/src/component/Tooltip.tsrx +234 -223
  46. package/src/component/TooltipBoundingBox.tsrx +34 -34
  47. package/src/container/ClipPathProvider.tsrx +1 -3
  48. package/src/container/Layer.tsrx +5 -1
  49. package/src/container/RootSurface.tsrx +31 -21
  50. package/src/container/Surface.tsrx +15 -13
  51. package/src/context/ErrorBarContext.tsrx +5 -5
  52. package/src/polar/Pie.tsrx +541 -487
  53. package/src/polar/PolarAngleAxis.tsrx +245 -227
  54. package/src/polar/PolarGrid.tsrx +139 -127
  55. package/src/polar/PolarRadiusAxis.tsrx +204 -185
  56. package/src/polar/Radar.tsrx +274 -264
  57. package/src/polar/RadialBar.tsrx +408 -361
  58. package/src/shape/Cross.tsrx +13 -7
  59. package/src/shape/Curve.tsrx +54 -44
  60. package/src/shape/Dot.tsrx +10 -8
  61. package/src/shape/Polygon.tsrx +38 -29
  62. package/src/shape/Rectangle.tsrx +73 -28
  63. package/src/shape/Sector.tsrx +30 -18
  64. package/src/shape/Symbols.tsrx +13 -11
  65. package/src/shape/Trapezoid.tsrx +16 -11
  66. package/src/state/RechartsStoreProvider.tsrx +5 -1
  67. package/src/synchronisation/useChartSynchronisation.tsrx +8 -7
  68. package/src/util/BarUtils.tsrx +43 -40
  69. package/src/util/FunnelUtils.tsrx +5 -5
  70. package/src/util/RadialBarUtils.tsrx +3 -4
  71. package/src/util/ScatterUtils.tsrx +13 -8
  72. package/src/zIndex/ZIndexLayer.tsrx +2 -2
  73. package/src/zIndex/ZIndexPortal.tsrx +2 -8
@@ -11,29 +11,26 @@ import type {
11
11
  import type { ExternalMouseEvents } from './types';
12
12
  import type { Percent } from '../util/types';
13
13
 
14
- export type RechartsWrapperProps =
15
- ExternalMouseEvents & {
16
- children: OctaneNode;
17
- width: number | Percent | undefined;
18
- height: number | Percent | undefined;
19
- responsive: boolean;
20
- className?: string;
21
- style?: CSSProperties;
22
- ref?: Ref<HTMLDivElement>;
23
- dispatchTouchEvents?: boolean;
24
- };
25
- type WrapperDivProps =
26
- Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
27
- width: number | string | undefined;
28
- height: number | string | undefined;
29
- style?: CSSProperties;
30
- ref?: Ref<HTMLDivElement>;
31
- };
32
- type StaticDivProps =
33
- Omit<WrapperDivProps, 'width' | 'height'> & {
34
- width: number;
35
- height: number;
36
- };
14
+ export type RechartsWrapperProps = ExternalMouseEvents & {
15
+ children: OctaneNode;
16
+ width: number | Percent | undefined;
17
+ height: number | Percent | undefined;
18
+ responsive: boolean;
19
+ className?: string;
20
+ style?: CSSProperties;
21
+ ref?: Ref<HTMLDivElement>;
22
+ dispatchTouchEvents?: boolean;
23
+ };
24
+ type WrapperDivProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
25
+ width: number | string | undefined;
26
+ height: number | string | undefined;
27
+ style?: CSSProperties;
28
+ ref?: Ref<HTMLDivElement>;
29
+ };
30
+ type StaticDivProps = Omit<WrapperDivProps, 'width' | 'height'> & {
31
+ width: number;
32
+ height: number;
33
+ };
37
34
  // Port of chart/RechartsWrapper.tsx — the outer <div class="recharts-wrapper">:
38
35
  // hosts the tooltip/legend portals, reports container size (static, read-once,
39
36
  // or ResizeObserver-driven), measures CSS scale, and feeds every user
@@ -46,9 +43,7 @@ import { clsx } from 'clsx';
46
43
  import { mouseLeaveChart } from '../state/tooltipSlice';
47
44
  import { useAppDispatch } from '../state/hooks';
48
45
  import { mouseClickAction, mouseMoveAction } from '../state/mouseEventsMiddleware';
49
- import {
50
- useSynchronisedEventsFromOtherCharts,
51
- } from '../synchronisation/useChartSynchronisation.tsrx';
46
+ import { useSynchronisedEventsFromOtherCharts } from '../synchronisation/useChartSynchronisation.tsrx';
52
47
  import { focusAction, keyDownAction, blurAction } from '../state/keyboardEventsMiddleware';
53
48
  import { useReportScale } from '../util/useReportScale.ts';
54
49
  import { externalEventAction } from '../state/externalEventsMiddleware';
@@ -88,40 +83,44 @@ function ResponsiveDiv(props: WrapperDivProps) {
88
83
  const roundedWidth = Math.round(newWidth);
89
84
  const roundedHeight = Math.round(newHeight);
90
85
  if (
91
- prevState.containerWidth === roundedWidth && prevState.containerHeight === roundedHeight
86
+ prevState.containerWidth === roundedWidth &&
87
+ prevState.containerHeight === roundedHeight
92
88
  ) {
93
89
  return prevState;
94
90
  }
95
91
  return { containerWidth: roundedWidth, containerHeight: roundedHeight };
96
92
  });
97
93
  }, []);
98
- const innerRef = useCallback((node) => {
99
- // 1. First, call the external ref if it was provided
100
- if (typeof ref === 'function') {
101
- ref(node);
102
- }
103
- // 2. Disconnect any previously active ResizeObserver
104
- if (observerRef.current != null) {
105
- observerRef.current.disconnect();
106
- observerRef.current = null;
107
- }
108
- // 3. Observe the new node
109
- if (node != null && typeof ResizeObserver !== 'undefined') {
110
- const { width: containerWidth, height: containerHeight } = node.getBoundingClientRect();
111
- setContainerSize(containerWidth, containerHeight);
112
- const callback = (entries: ResizeObserverEntry[]) => {
113
- const entry = entries[0];
114
- if (entry == null) {
115
- return;
116
- }
117
- const { width, height } = entry.contentRect;
118
- setContainerSize(width, height);
119
- };
120
- const observer = new ResizeObserver(callback);
121
- observer.observe(node);
122
- observerRef.current = observer;
123
- }
124
- }, [ref, setContainerSize]);
94
+ const innerRef = useCallback(
95
+ (node) => {
96
+ // 1. First, call the external ref if it was provided
97
+ if (typeof ref === 'function') {
98
+ ref(node);
99
+ }
100
+ // 2. Disconnect any previously active ResizeObserver
101
+ if (observerRef.current != null) {
102
+ observerRef.current.disconnect();
103
+ observerRef.current = null;
104
+ }
105
+ // 3. Observe the new node
106
+ if (node != null && typeof ResizeObserver !== 'undefined') {
107
+ const { width: containerWidth, height: containerHeight } = node.getBoundingClientRect();
108
+ setContainerSize(containerWidth, containerHeight);
109
+ const callback = (entries: ResizeObserverEntry[]) => {
110
+ const entry = entries[0];
111
+ if (entry == null) {
112
+ return;
113
+ }
114
+ const { width, height } = entry.contentRect;
115
+ setContainerSize(width, height);
116
+ };
117
+ const observer = new ResizeObserver(callback);
118
+ observer.observe(node);
119
+ observerRef.current = observer;
120
+ }
121
+ },
122
+ [ref, setContainerSize],
123
+ );
125
124
  useEffect(() => {
126
125
  return () => {
127
126
  const observer = observerRef.current;
@@ -130,10 +129,12 @@ function ResponsiveDiv(props: WrapperDivProps) {
130
129
  }
131
130
  };
132
131
  }, [setContainerSize]);
133
- return <>
134
- <ReportChartSize width={sizes.containerWidth} height={sizes.containerHeight} />
135
- <div ref={innerRef} {...divProps} />
136
- </>;
132
+ return (
133
+ <>
134
+ <ReportChartSize width={sizes.containerWidth} height={sizes.containerHeight} />
135
+ <div ref={innerRef} {...divProps} />
136
+ </>
137
+ );
137
138
  }
138
139
 
139
140
  function ReadSizeOnceDiv(props: WrapperDivProps) {
@@ -150,35 +151,43 @@ function ReadSizeOnceDiv(props: WrapperDivProps) {
150
151
  const roundedWidth = Math.round(newWidth);
151
152
  const roundedHeight = Math.round(newHeight);
152
153
  if (
153
- prevState.containerWidth === roundedWidth && prevState.containerHeight === roundedHeight
154
+ prevState.containerWidth === roundedWidth &&
155
+ prevState.containerHeight === roundedHeight
154
156
  ) {
155
157
  return prevState;
156
158
  }
157
159
  return { containerWidth: roundedWidth, containerHeight: roundedHeight };
158
160
  });
159
161
  }, []);
160
- const innerRef = useCallback((node) => {
161
- if (typeof ref === 'function') {
162
- ref(node);
163
- }
164
- if (node != null) {
165
- const { width: containerWidth, height: containerHeight } = node.getBoundingClientRect();
166
- setContainerSize(containerWidth, containerHeight);
167
- }
168
- }, [ref, setContainerSize]);
169
- return <>
170
- <ReportChartSize width={sizes.containerWidth} height={sizes.containerHeight} />
171
- <div ref={innerRef} {...divProps} />
172
- </>;
162
+ const innerRef = useCallback(
163
+ (node) => {
164
+ if (typeof ref === 'function') {
165
+ ref(node);
166
+ }
167
+ if (node != null) {
168
+ const { width: containerWidth, height: containerHeight } = node.getBoundingClientRect();
169
+ setContainerSize(containerWidth, containerHeight);
170
+ }
171
+ },
172
+ [ref, setContainerSize],
173
+ );
174
+ return (
175
+ <>
176
+ <ReportChartSize width={sizes.containerWidth} height={sizes.containerHeight} />
177
+ <div ref={innerRef} {...divProps} />
178
+ </>
179
+ );
173
180
  }
174
181
 
175
182
  function StaticDiv(props: StaticDivProps) {
176
183
  const { ref, width, height, ...rest } = props;
177
184
  const divProps = { width, height, ...rest };
178
- return <>
179
- <ReportChartSize width={width} height={height} />
180
- <div ref={ref} {...divProps} />
181
- </>;
185
+ return (
186
+ <>
187
+ <ReportChartSize width={width} height={height} />
188
+ <div ref={ref} {...divProps} />
189
+ </>
190
+ );
182
191
  }
183
192
 
184
193
  function NonResponsiveDiv(props: WrapperDivProps) {
@@ -194,10 +203,12 @@ function NonResponsiveDiv(props: WrapperDivProps) {
194
203
  // Undefined sizes: report as-is (renders no SVG — intentional back-compat).
195
204
  const { ref, ...divProps } = props;
196
205
  // (width/height are undefined here, so nothing extra lands on the div.)
197
- return <>
198
- <ReportChartSize width={width} height={height} />
199
- <div ref={ref} {...divProps} />
200
- </>;
206
+ return (
207
+ <>
208
+ <ReportChartSize width={width} height={height} />
209
+ <div ref={ref} {...divProps} />
210
+ </>
211
+ );
201
212
  }
202
213
 
203
214
  export function RechartsWrapper(props: RechartsWrapperProps) {
@@ -236,95 +247,136 @@ export function RechartsWrapper(props: RechartsWrapperProps) {
236
247
  responsiveContainerCalculations?.height > 0
237
248
  ? responsiveContainerCalculations.height
238
249
  : heightFromProps;
239
- const innerRef = useCallback((node) => {
240
- setScaleRef(node);
241
- if (typeof ref === 'function') {
242
- ref(node);
243
- }
244
- setTooltipPortal(node);
245
- setLegendPortal(node);
246
- if (node != null) {
247
- containerRef.current = node;
248
- }
249
- }, [setScaleRef, ref, setTooltipPortal, setLegendPortal]);
250
- const myOnClick = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
251
- dispatch(mouseClickAction(e));
252
- dispatch(externalEventAction({ handler: onClick, reactEvent: e }));
253
- }, [dispatch, onClick]);
254
- const myOnMouseEnter = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
255
- dispatch(mouseMoveAction(e));
256
- dispatch(externalEventAction({ handler: onMouseEnter, reactEvent: e }));
257
- }, [dispatch, onMouseEnter]);
258
- const myOnMouseLeave = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
259
- dispatch(mouseLeaveChart());
260
- dispatch(externalEventAction({ handler: onMouseLeave, reactEvent: e }));
261
- }, [dispatch, onMouseLeave]);
262
- const myOnMouseMove = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
263
- dispatch(mouseMoveAction(e));
264
- dispatch(externalEventAction({ handler: onMouseMove, reactEvent: e }));
265
- }, [dispatch, onMouseMove]);
250
+ const innerRef = useCallback(
251
+ (node) => {
252
+ setScaleRef(node);
253
+ if (typeof ref === 'function') {
254
+ ref(node);
255
+ }
256
+ setTooltipPortal(node);
257
+ setLegendPortal(node);
258
+ if (node != null) {
259
+ containerRef.current = node;
260
+ }
261
+ },
262
+ [setScaleRef, ref, setTooltipPortal, setLegendPortal],
263
+ );
264
+ const myOnClick = useCallback(
265
+ (e: NativeMouseEvent<HTMLDivElement>) => {
266
+ dispatch(mouseClickAction(e));
267
+ dispatch(externalEventAction({ handler: onClick, reactEvent: e }));
268
+ },
269
+ [dispatch, onClick],
270
+ );
271
+ const myOnMouseEnter = useCallback(
272
+ (e: NativeMouseEvent<HTMLDivElement>) => {
273
+ dispatch(mouseMoveAction(e));
274
+ dispatch(externalEventAction({ handler: onMouseEnter, reactEvent: e }));
275
+ },
276
+ [dispatch, onMouseEnter],
277
+ );
278
+ const myOnMouseLeave = useCallback(
279
+ (e: NativeMouseEvent<HTMLDivElement>) => {
280
+ dispatch(mouseLeaveChart());
281
+ dispatch(externalEventAction({ handler: onMouseLeave, reactEvent: e }));
282
+ },
283
+ [dispatch, onMouseLeave],
284
+ );
285
+ const myOnMouseMove = useCallback(
286
+ (e: NativeMouseEvent<HTMLDivElement>) => {
287
+ dispatch(mouseMoveAction(e));
288
+ dispatch(externalEventAction({ handler: onMouseMove, reactEvent: e }));
289
+ },
290
+ [dispatch, onMouseMove],
291
+ );
266
292
  const onFocus = useCallback(() => {
267
293
  dispatch(focusAction());
268
294
  }, [dispatch]);
269
295
  const onBlur = useCallback(() => {
270
296
  dispatch(blurAction());
271
297
  }, [dispatch]);
272
- const onKeyDown = useCallback((e: NativeKeyboardEvent<HTMLDivElement>) => {
273
- dispatch(keyDownAction(e.key));
274
- }, [dispatch]);
275
- const myOnContextMenu = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
276
- dispatch(externalEventAction({ handler: onContextMenu, reactEvent: e }));
277
- }, [dispatch, onContextMenu]);
278
- const myOnDoubleClick = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
279
- dispatch(externalEventAction({ handler: onDoubleClick, reactEvent: e }));
280
- }, [dispatch, onDoubleClick]);
281
- const myOnMouseDown = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
282
- dispatch(externalEventAction({ handler: onMouseDown, reactEvent: e }));
283
- }, [dispatch, onMouseDown]);
284
- const myOnMouseUp = useCallback((e: NativeMouseEvent<HTMLDivElement>) => {
285
- dispatch(externalEventAction({ handler: onMouseUp, reactEvent: e }));
286
- }, [dispatch, onMouseUp]);
287
- const myOnTouchStart = useCallback((e: NativeTouchEvent<HTMLDivElement>) => {
288
- dispatch(externalEventAction({ handler: onTouchStart, reactEvent: e }));
289
- }, [dispatch, onTouchStart]);
298
+ const onKeyDown = useCallback(
299
+ (e: NativeKeyboardEvent<HTMLDivElement>) => {
300
+ dispatch(keyDownAction(e.key));
301
+ },
302
+ [dispatch],
303
+ );
304
+ const myOnContextMenu = useCallback(
305
+ (e: NativeMouseEvent<HTMLDivElement>) => {
306
+ dispatch(externalEventAction({ handler: onContextMenu, reactEvent: e }));
307
+ },
308
+ [dispatch, onContextMenu],
309
+ );
310
+ const myOnDoubleClick = useCallback(
311
+ (e: NativeMouseEvent<HTMLDivElement>) => {
312
+ dispatch(externalEventAction({ handler: onDoubleClick, reactEvent: e }));
313
+ },
314
+ [dispatch, onDoubleClick],
315
+ );
316
+ const myOnMouseDown = useCallback(
317
+ (e: NativeMouseEvent<HTMLDivElement>) => {
318
+ dispatch(externalEventAction({ handler: onMouseDown, reactEvent: e }));
319
+ },
320
+ [dispatch, onMouseDown],
321
+ );
322
+ const myOnMouseUp = useCallback(
323
+ (e: NativeMouseEvent<HTMLDivElement>) => {
324
+ dispatch(externalEventAction({ handler: onMouseUp, reactEvent: e }));
325
+ },
326
+ [dispatch, onMouseUp],
327
+ );
328
+ const myOnTouchStart = useCallback(
329
+ (e: NativeTouchEvent<HTMLDivElement>) => {
330
+ dispatch(externalEventAction({ handler: onTouchStart, reactEvent: e }));
331
+ },
332
+ [dispatch, onTouchStart],
333
+ );
290
334
  // Touch has no enter/leave; the middleware resolves the touched element via
291
335
  // document.elementFromPoint.
292
- const myOnTouchMove = useCallback((e: NativeTouchEvent<HTMLDivElement>) => {
293
- if (dispatchTouchEvents) {
294
- dispatch(touchEventAction(e));
295
- }
296
- dispatch(externalEventAction({ handler: onTouchMove, reactEvent: e }));
297
- }, [dispatch, dispatchTouchEvents, onTouchMove]);
298
- const myOnTouchEnd = useCallback((e: NativeTouchEvent<HTMLDivElement>) => {
299
- dispatch(externalEventAction({ handler: onTouchEnd, reactEvent: e }));
300
- }, [dispatch, onTouchEnd]);
336
+ const myOnTouchMove = useCallback(
337
+ (e: NativeTouchEvent<HTMLDivElement>) => {
338
+ if (dispatchTouchEvents) {
339
+ dispatch(touchEventAction(e));
340
+ }
341
+ dispatch(externalEventAction({ handler: onTouchMove, reactEvent: e }));
342
+ },
343
+ [dispatch, dispatchTouchEvents, onTouchMove],
344
+ );
345
+ const myOnTouchEnd = useCallback(
346
+ (e: NativeTouchEvent<HTMLDivElement>) => {
347
+ dispatch(externalEventAction({ handler: onTouchEnd, reactEvent: e }));
348
+ },
349
+ [dispatch, onTouchEnd],
350
+ );
301
351
  const WrapperDiv = responsive ? ResponsiveDiv : NonResponsiveDiv;
302
- return <TooltipPortalContext value={tooltipPortal}>
303
- <LegendPortalContext value={legendPortal}>
304
- <WrapperDiv
305
- width={width ?? style?.width}
306
- height={height ?? style?.height}
307
- className={clsx('recharts-wrapper', className)}
308
- style={{ position: 'relative', cursor: 'default', width, height, ...style }}
309
- onClick={myOnClick}
310
- onContextMenu={myOnContextMenu}
311
- onDoubleClick={myOnDoubleClick}
312
- onFocus={onFocus}
313
- onBlur={onBlur}
314
- onKeyDown={onKeyDown}
315
- onMouseDown={myOnMouseDown}
316
- onMouseEnter={myOnMouseEnter}
317
- onMouseLeave={myOnMouseLeave}
318
- onMouseMove={myOnMouseMove}
319
- onMouseUp={myOnMouseUp}
320
- onTouchEnd={myOnTouchEnd}
321
- onTouchMove={myOnTouchMove}
322
- onTouchStart={myOnTouchStart}
323
- ref={innerRef}
324
- >
325
- <EventSynchronizer />
326
- {children}
327
- </WrapperDiv>
328
- </LegendPortalContext>
329
- </TooltipPortalContext>;
352
+ return (
353
+ <TooltipPortalContext value={tooltipPortal}>
354
+ <LegendPortalContext value={legendPortal}>
355
+ <WrapperDiv
356
+ width={width ?? style?.width}
357
+ height={height ?? style?.height}
358
+ className={clsx('recharts-wrapper', className)}
359
+ style={{ position: 'relative', cursor: 'default', width, height, ...style }}
360
+ onClick={myOnClick}
361
+ onContextMenu={myOnContextMenu}
362
+ onDoubleClick={myOnDoubleClick}
363
+ onFocus={onFocus}
364
+ onBlur={onBlur}
365
+ onKeyDown={onKeyDown}
366
+ onMouseDown={myOnMouseDown}
367
+ onMouseEnter={myOnMouseEnter}
368
+ onMouseLeave={myOnMouseLeave}
369
+ onMouseMove={myOnMouseMove}
370
+ onMouseUp={myOnMouseUp}
371
+ onTouchEnd={myOnTouchEnd}
372
+ onTouchMove={myOnTouchMove}
373
+ onTouchStart={myOnTouchStart}
374
+ ref={innerRef}
375
+ >
376
+ <EventSynchronizer />
377
+ {children}
378
+ </WrapperDiv>
379
+ </LegendPortalContext>
380
+ </TooltipPortalContext>
381
+ );
330
382
  }