@octanejs/recharts 0.1.62 → 0.1.63

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
@@ -114,34 +114,34 @@ export interface ScatterPointNode {
114
114
  */
115
115
  export interface ScatterPointItem {
116
116
  /**
117
- * The x coordinate of the point center in pixels.
118
- */
117
+ * The x coordinate of the point center in pixels.
118
+ */
119
119
  cx: number | null | undefined;
120
120
  /**
121
- * The y coordinate of the point center in pixels.
122
- */
121
+ * The y coordinate of the point center in pixels.
122
+ */
123
123
  cy: number | null | undefined;
124
124
  /**
125
- * The x coordinate (in pixels) of the top-left corner of the rectangle that wraps the point.
126
- */
125
+ * The x coordinate (in pixels) of the top-left corner of the rectangle that wraps the point.
126
+ */
127
127
  x: number | undefined;
128
128
  /**
129
- * The y coordinate (in pixels) of the top-left corner of the rectangle that wraps the point.
130
- */
129
+ * The y coordinate (in pixels) of the top-left corner of the rectangle that wraps the point.
130
+ */
131
131
  y: number | undefined;
132
132
  /**
133
- * ScatterPointItem size is an abstract number that is used to calculate the radius of the point.
134
- * It's not the radius itself, but rather a value that is used to calculate the radius.
135
- * Interacts with the zAxis range.
136
- */
133
+ * ScatterPointItem size is an abstract number that is used to calculate the radius of the point.
134
+ * It's not the radius itself, but rather a value that is used to calculate the radius.
135
+ * Interacts with the zAxis range.
136
+ */
137
137
  size: number | undefined;
138
138
  /**
139
- * Width of the point in pixels.
140
- */
139
+ * Width of the point in pixels.
140
+ */
141
141
  width: number;
142
142
  /**
143
- * Height of the point in pixels.
144
- */
143
+ * Height of the point in pixels.
144
+ */
145
145
  height: number;
146
146
  node: ScatterPointNode;
147
147
  payload?: any;
@@ -191,215 +191,214 @@ interface ScatterInternalProps extends ZIndexable {
191
191
  /**
192
192
  * External props, intended for end users to fill in
193
193
  */
194
- interface ScatterProps<DataPointType = any, DataValueType = any> extends DataProvider<
195
- DataPointType
196
- >, DataConsumer<DataPointType, DataValueType>, ZIndexable {
194
+ interface ScatterProps<DataPointType = any, DataValueType = any>
195
+ extends DataProvider<DataPointType>, DataConsumer<DataPointType, DataValueType>, ZIndexable {
197
196
  /**
198
- * Unique identifier of this component.
199
- * Used as an HTML attribute `id`, and also to identify this element internally.
200
- *
201
- * If undefined, Recharts will generate a unique ID automatically.
202
- */
197
+ * Unique identifier of this component.
198
+ * Used as an HTML attribute `id`, and also to identify this element internally.
199
+ *
200
+ * If undefined, Recharts will generate a unique ID automatically.
201
+ */
203
202
  id?: string;
204
203
  /**
205
- * The id of XAxis which is corresponding to the data. Required when there are multiple XAxes.
206
- * @defaultValue 0
207
- */
204
+ * The id of XAxis which is corresponding to the data. Required when there are multiple XAxes.
205
+ * @defaultValue 0
206
+ */
208
207
  xAxisId?: AxisId;
209
208
  /**
210
- * The id of YAxis which is corresponding to the data. Required when there are multiple YAxes.
211
- * @defaultValue 0
212
- */
209
+ * The id of YAxis which is corresponding to the data. Required when there are multiple YAxes.
210
+ * @defaultValue 0
211
+ */
213
212
  yAxisId?: AxisId;
214
213
  /**
215
- * The id of ZAxis which is corresponding to the data. Required when there are multiple ZAxes.
216
- *
217
- * ZAxis does not render directly, has no ticks and no tick line.
218
- * It is used to control the size of each scatter point.
219
- *
220
- * @defaultValue 0
221
- * @see {@link https://recharts.github.io/en-US/examples/ThreeDimScatterChart/ Scatter chart with Z axis}
222
- */
214
+ * The id of ZAxis which is corresponding to the data. Required when there are multiple ZAxes.
215
+ *
216
+ * ZAxis does not render directly, has no ticks and no tick line.
217
+ * It is used to control the size of each scatter point.
218
+ *
219
+ * @defaultValue 0
220
+ * @see {@link https://recharts.github.io/en-US/examples/ThreeDimScatterChart/ Scatter chart with Z axis}
221
+ */
223
222
  zAxisId?: AxisId;
224
223
  /**
225
- * Renders line connecting individual points.
226
- * Options:
227
- * - `false`: no line is drawn.
228
- * - `true`: a default line is drawn.
229
- * - `OctaneElement`: the option is the custom line element.
230
- * - `function`: the function will be called to render customized line.
231
- * - `object`: the option is the props of Curve element.
232
- *
233
- * Also see the `lineType` prop which controls how is this line calculated.
234
- *
235
- * @defaultValue false
236
- * @example <Scatter line />
237
- * @example <Scatter line={CustomizedLineComponent} />
238
- * @example <Scatter line={{ strokeDasharray: '5 5' }} />
239
- *
240
- * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
241
- */
224
+ * Renders line connecting individual points.
225
+ * Options:
226
+ * - `false`: no line is drawn.
227
+ * - `true`: a default line is drawn.
228
+ * - `OctaneElement`: the option is the custom line element.
229
+ * - `function`: the function will be called to render customized line.
230
+ * - `object`: the option is the props of Curve element.
231
+ *
232
+ * Also see the `lineType` prop which controls how is this line calculated.
233
+ *
234
+ * @defaultValue false
235
+ * @example <Scatter line />
236
+ * @example <Scatter line={CustomizedLineComponent} />
237
+ * @example <Scatter line={{ strokeDasharray: '5 5' }} />
238
+ *
239
+ * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
240
+ */
242
241
  line?: OctaneElement<CurveProps> | ((props: CurveProps) => OctaneNode) | CurveProps | boolean;
243
242
  /**
244
- * Determines calculation method of the line if the `line` prop is set.
245
- * Options:
246
- * - `'joint'`: line will be generated by connecting all the points.
247
- * - `'fitting'`: line will be generated by fitting algorithm (linear regression).
248
- *
249
- * Has no effect if `line` prop is not set or is false.
250
- *
251
- * @defaultValue joint
252
- * @example <Scatter line lineType="fitting" />
253
- * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
254
- */
243
+ * Determines calculation method of the line if the `line` prop is set.
244
+ * Options:
245
+ * - `'joint'`: line will be generated by connecting all the points.
246
+ * - `'fitting'`: line will be generated by fitting algorithm (linear regression).
247
+ *
248
+ * Has no effect if `line` prop is not set or is false.
249
+ *
250
+ * @defaultValue joint
251
+ * @example <Scatter line lineType="fitting" />
252
+ * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
253
+ */
255
254
  lineType?: 'fitting' | 'joint';
256
255
  /**
257
- * Determines the shape of joint line.
258
- * Same as `type` prop on Curve, Line and Area components.
259
- *
260
- * Has no effect if `line` prop is not set or is false or if `lineType` is 'fitting'.
261
- *
262
- * @defaultValue linear
263
- * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
264
- */
256
+ * Determines the shape of joint line.
257
+ * Same as `type` prop on Curve, Line and Area components.
258
+ *
259
+ * Has no effect if `line` prop is not set or is false or if `lineType` is 'fitting'.
260
+ *
261
+ * @defaultValue linear
262
+ * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with joint line}
263
+ */
265
264
  lineJointType?: CurveType;
266
265
  /**
267
- * The type of icon in legend.
268
- * If set to 'none', no legend item will be rendered.
269
- *
270
- * @defaultValue 'circle'
271
- * @example <Scatter legendType="diamond" />
272
- */
266
+ * The type of icon in legend.
267
+ * If set to 'none', no legend item will be rendered.
268
+ *
269
+ * @defaultValue 'circle'
270
+ * @example <Scatter legendType="diamond" />
271
+ */
273
272
  legendType?: LegendType;
274
273
  tooltipType?: TooltipType;
275
274
  /**
276
- * Formats the value displayed in the tooltip for this Scatter.
277
- * When set, takes precedence over the `formatter` prop on the Tooltip component.
278
- */
275
+ * Formats the value displayed in the tooltip for this Scatter.
276
+ * When set, takes precedence over the `formatter` prop on the Tooltip component.
277
+ */
279
278
  formatter?: Formatter;
280
279
  className?: string;
281
280
  /**
282
- * The name of data.
283
- * This option will be used in tooltip and legend to represent this graphical item.
284
- * If no value was set to this option, the value of dataKey will be used alternatively.
285
- */
281
+ * The name of data.
282
+ * This option will be used in tooltip and legend to represent this graphical item.
283
+ * If no value was set to this option, the value of dataKey will be used alternatively.
284
+ */
286
285
  name?: string;
287
286
  /**
288
- * This component is rendered when this graphical item is activated
289
- * (could be by mouse hover, touch, keyboard, programmatically).
290
- *
291
- * @see {@link https://recharts.github.io/en-US/examples/SimpleScatterChart/ Scatter chart with custom active shape}
292
- * @example <Scatter activeShape={{ fill: 'red' }} />
293
- */
287
+ * This component is rendered when this graphical item is activated
288
+ * (could be by mouse hover, touch, keyboard, programmatically).
289
+ *
290
+ * @see {@link https://recharts.github.io/en-US/examples/SimpleScatterChart/ Scatter chart with custom active shape}
291
+ * @example <Scatter activeShape={{ fill: 'red' }} />
292
+ */
294
293
  activeShape?: ScatterCustomizedShape;
295
294
  /**
296
- * Determines the shape of individual data points.
297
- * - Can be one of the predefined shapes as a string, which will be passed to {@link Symbols} component.
298
- * - If set a OctaneElement, the shape of point can be customized.
299
- * - If set a function, the function will be called to render customized shape.
300
- * - During animations, the function shape also receives `animationElapsedTime`, `isAnimating`, and `isEntrance`.
301
- * @defaultValue circle
302
- *
303
- * @example <Scatter shape={CustomizedShapeComponent} />
304
- * @example <Scatter shape="diamond" />
305
- *
306
- * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with custom shapes}
307
- */
295
+ * Determines the shape of individual data points.
296
+ * - Can be one of the predefined shapes as a string, which will be passed to {@link Symbols} component.
297
+ * - If set a OctaneElement, the shape of point can be customized.
298
+ * - If set a function, the function will be called to render customized shape.
299
+ * - During animations, the function shape also receives `animationElapsedTime`, `isAnimating`, and `isEntrance`.
300
+ * @defaultValue circle
301
+ *
302
+ * @example <Scatter shape={CustomizedShapeComponent} />
303
+ * @example <Scatter shape="diamond" />
304
+ *
305
+ * @see {@link https://recharts.github.io/en-US/examples/JointLineScatterChart/ Scatter chart with custom shapes}
306
+ */
308
307
  shape?: ScatterCustomizedShape;
309
308
  /**
310
- * Hides the whole graphical element when true.
311
- *
312
- * Hiding an element is different from removing it from the chart:
313
- * Hidden graphical elements are still visible in Legend,
314
- * and can be included in axis domain calculations,
315
- * depending on `includeHidden` props of your XAxis/YAxis.
316
- *
317
- * @defaultValue false
318
- */
309
+ * Hides the whole graphical element when true.
310
+ *
311
+ * Hiding an element is different from removing it from the chart:
312
+ * Hidden graphical elements are still visible in Legend,
313
+ * and can be included in axis domain calculations,
314
+ * depending on `includeHidden` props of your XAxis/YAxis.
315
+ *
316
+ * @defaultValue false
317
+ */
319
318
  hide?: boolean;
320
319
  /**
321
- * Renders one label for each data point. Options:
322
- * - `true`: renders default labels;
323
- * - `false`: no labels are rendered;
324
- * - `object`: the props of LabelList component;
325
- * - `OctaneElement`: a custom SVG label element, such as `<text>` or `<g>`.
326
- * HTML elements such as `<div>` are not valid inside the chart SVG and may trigger React DOM warnings.
327
- * - `function`: a render function of custom label.
328
- *
329
- * @defaultValue false
330
- */
320
+ * Renders one label for each data point. Options:
321
+ * - `true`: renders default labels;
322
+ * - `false`: no labels are rendered;
323
+ * - `object`: the props of LabelList component;
324
+ * - `OctaneElement`: a custom SVG label element, such as `<text>` or `<g>`.
325
+ * HTML elements such as `<div>` are not valid inside the chart SVG and may trigger React DOM warnings.
326
+ * - `function`: a render function of custom label.
327
+ *
328
+ * @defaultValue false
329
+ */
331
330
  label?: ImplicitLabelListType;
332
331
  /**
333
- * If set false, animation of Scatter points will be disabled.
334
- * If set "auto", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.
335
- * @defaultValue 'auto'
336
- */
332
+ * If set false, animation of Scatter points will be disabled.
333
+ * If set "auto", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.
334
+ * @defaultValue 'auto'
335
+ */
337
336
  isAnimationActive?: boolean | 'auto';
338
337
  /**
339
- * Specifies when the animation should begin, the unit of this option is ms.
340
- * @defaultValue 0
341
- */
338
+ * Specifies when the animation should begin, the unit of this option is ms.
339
+ * @defaultValue 0
340
+ */
342
341
  animationBegin?: number;
343
342
  /**
344
- * Specifies the duration of animation, the unit of this option is ms.
345
- * @defaultValue 400
346
- */
343
+ * Specifies the duration of animation, the unit of this option is ms.
344
+ * @defaultValue 400
345
+ */
347
346
  animationDuration?: AnimationDuration;
348
347
  /**
349
- * The type of easing function.
350
- * @defaultValue 'linear'
351
- */
348
+ * The type of easing function.
349
+ * @defaultValue 'linear'
350
+ */
352
351
  animationEasing?: EasingInput;
353
352
  /**
354
- * Custom animation function for interpolating data items.
355
- * When provided, this replaces the default animation interpolation.
356
- *
357
- * @param prevItems The items from the previous animation frame, or null on first render
358
- * @param nextItems The target items to animate towards
359
- * @param animationElapsedTime A normalized time value (0 = start, 1 = end)
360
- * @returns The interpolated items at time animationElapsedTime
361
- *
362
- * @since 3.9
363
- * @see {@link https://recharts.github.io/en-US/guide/animations/ Animations guide}
364
- */
353
+ * Custom animation function for interpolating data items.
354
+ * When provided, this replaces the default animation interpolation.
355
+ *
356
+ * @param prevItems The items from the previous animation frame, or null on first render
357
+ * @param nextItems The target items to animate towards
358
+ * @param animationElapsedTime A normalized time value (0 = start, 1 = end)
359
+ * @returns The interpolated items at time animationElapsedTime
360
+ *
361
+ * @since 3.9
362
+ * @see {@link https://recharts.github.io/en-US/guide/animations/ Animations guide}
363
+ */
365
364
  animationInterpolateFn?: AnimationInterpolateFn<ScatterPointItem, CartesianLayout>;
366
365
  /**
367
- * Strategy for matching previous items to next items during animation.
368
- * Determines how Recharts pairs old data points with new data points
369
- * to create smooth transitions.
370
- *
371
- * - `matchAppend` (default): match sequentially by index and treat newly appended items as new
372
- * - `matchByIndex`: match by array position with proportional stretching
373
- * - `matchByDataKey('someKey')`: match by a data key from the payload
374
- * - Custom function `(item, index) => key`: match by the returned key
375
- *
376
- * @defaultValue append
377
- * @see matchByIndex
378
- * @see matchByDataKey
379
- * @see matchAppend
380
- *
381
- * @since 3.9
382
- * @see {@link https://recharts.github.io/en-US/guide/animations/ Animations guide}
383
- */
366
+ * Strategy for matching previous items to next items during animation.
367
+ * Determines how Recharts pairs old data points with new data points
368
+ * to create smooth transitions.
369
+ *
370
+ * - `matchAppend` (default): match sequentially by index and treat newly appended items as new
371
+ * - `matchByIndex`: match by array position with proportional stretching
372
+ * - `matchByDataKey('someKey')`: match by a data key from the payload
373
+ * - Custom function `(item, index) => key`: match by the returned key
374
+ *
375
+ * @defaultValue append
376
+ * @see matchByIndex
377
+ * @see matchByDataKey
378
+ * @see matchAppend
379
+ *
380
+ * @since 3.9
381
+ * @see {@link https://recharts.github.io/en-US/guide/animations/ Animations guide}
382
+ */
384
383
  animationMatchBy?: AnimationMatchByProp<ScatterPointItem>;
385
384
  /**
386
- * Called when the Scatter animation starts.
387
- */
385
+ * Called when the Scatter animation starts.
386
+ */
388
387
  onAnimationStart?: () => void;
389
388
  /**
390
- * Called when the Scatter animation finishes.
391
- */
389
+ * Called when the Scatter animation finishes.
390
+ */
392
391
  onAnimationEnd?: () => void;
393
392
  /**
394
- * Z-Index of this component and its children. The higher the value,
395
- * the more on top it will be rendered.
396
- * Components with higher zIndex will appear in front of components with lower zIndex.
397
- * If undefined or 0, the content is rendered in the default layer without portals.
398
- *
399
- * @since 3.4
400
- * @defaultValue 600
401
- * @see {@link https://recharts.github.io/en-US/guide/zIndex/ Z-Index and layers guide}
402
- */
393
+ * Z-Index of this component and its children. The higher the value,
394
+ * the more on top it will be rendered.
395
+ * Components with higher zIndex will appear in front of components with lower zIndex.
396
+ * If undefined or 0, the content is rendered in the default layer without portals.
397
+ *
398
+ * @since 3.4
399
+ * @defaultValue 600
400
+ * @see {@link https://recharts.github.io/en-US/guide/zIndex/ Z-Index and layers guide}
401
+ */
403
402
  zIndex?: number;
404
403
  children?: OctaneNode;
405
404
  }
@@ -407,16 +406,15 @@ interface ScatterProps<DataPointType = any, DataValueType = any> extends DataPro
407
406
  /**
408
407
  * Because of naming conflict, we are forced to ignore certain (valid) SVG attributes.
409
408
  */
410
- type BaseScatterSvgProps =
411
- Omit<
412
- PresentationAttributesAdaptChildEvent<ScatterPointItem, SVGGraphicsElement>,
413
- 'points' | 'ref' | 'children' | 'dangerouslySetInnerHTML'
414
- >;
409
+ type BaseScatterSvgProps = Omit<
410
+ PresentationAttributesAdaptChildEvent<ScatterPointItem, SVGGraphicsElement>,
411
+ 'points' | 'ref' | 'children' | 'dangerouslySetInnerHTML'
412
+ >;
415
413
 
416
414
  type InternalProps = BaseScatterSvgProps & ScatterInternalProps;
417
415
 
418
- export type Props<DataPointType = any, ValueAxisType = any> =
419
- BaseScatterSvgProps & ScatterProps<DataPointType, ValueAxisType>;
416
+ export type Props<DataPointType = any, ValueAxisType = any> = BaseScatterSvgProps &
417
+ ScatterProps<DataPointType, ValueAxisType>;
420
418
 
421
419
  const computeLegendPayloadFromScatterProps = (props: Props): ReadonlyArray<LegendPayload> => {
422
420
  const { dataKey, name, fill, legendType, hide } = props;
@@ -445,45 +443,46 @@ type InputRequiredToComputeTooltipEntrySettings = {
445
443
  id: GraphicalItemId;
446
444
  };
447
445
 
448
- const SetScatterTooltipEntrySettings = React.memo(({
449
- dataKey,
450
- points,
451
- stroke,
452
- strokeWidth,
453
- fill,
454
- name,
455
- hide,
456
- formatter,
457
- tooltipType,
458
- id,
459
- }: InputRequiredToComputeTooltipEntrySettings) => {
460
- const tooltipEntrySettings: TooltipPayloadConfiguration = {
461
- dataDefinedOnItem: points?.map((p: ScatterPointItem) => p.tooltipPayload),
462
- getPosition: (index) => points?.[Number(index)]?.tooltipPosition,
463
- settings: {
464
- stroke,
465
- strokeWidth,
466
- fill,
467
- nameKey: undefined,
468
- dataKey,
469
- name: getTooltipNameProp(name, dataKey),
470
- hide,
471
- type: tooltipType,
472
- color: fill,
473
- unit: '', // why doesn't Scatter support unit?
474
- formatter,
475
- graphicalItemId: id,
476
- },
477
- };
478
- return <SetTooltipEntrySettings tooltipEntrySettings={tooltipEntrySettings} />;
479
- });
446
+ const SetScatterTooltipEntrySettings = React.memo(
447
+ ({
448
+ dataKey,
449
+ points,
450
+ stroke,
451
+ strokeWidth,
452
+ fill,
453
+ name,
454
+ hide,
455
+ formatter,
456
+ tooltipType,
457
+ id,
458
+ }: InputRequiredToComputeTooltipEntrySettings) => {
459
+ const tooltipEntrySettings: TooltipPayloadConfiguration = {
460
+ dataDefinedOnItem: points?.map((p: ScatterPointItem) => p.tooltipPayload),
461
+ getPosition: (index) => points?.[Number(index)]?.tooltipPosition,
462
+ settings: {
463
+ stroke,
464
+ strokeWidth,
465
+ fill,
466
+ nameKey: undefined,
467
+ dataKey,
468
+ name: getTooltipNameProp(name, dataKey),
469
+ hide,
470
+ type: tooltipType,
471
+ color: fill,
472
+ unit: '', // why doesn't Scatter support unit?
473
+ formatter,
474
+ graphicalItemId: id,
475
+ },
476
+ };
477
+ return <SetTooltipEntrySettings tooltipEntrySettings={tooltipEntrySettings} />;
478
+ },
479
+ );
480
480
 
481
- type ScatterSymbolsProps =
482
- ShapeAnimationProps & {
483
- points: ReadonlyArray<ScatterPointItem>;
484
- showLabels: boolean;
485
- allOtherScatterProps: InternalProps;
486
- };
481
+ type ScatterSymbolsProps = ShapeAnimationProps & {
482
+ points: ReadonlyArray<ScatterPointItem>;
483
+ showLabels: boolean;
484
+ allOtherScatterProps: InternalProps;
485
+ };
487
486
 
488
487
  function ScatterLine({
489
488
  points,
@@ -529,7 +528,11 @@ function ScatterLine({
529
528
  lineItem = <Curve {...lineProps} type={lineJointType} />;
530
529
  }
531
530
 
532
- return <Layer className="recharts-scatter-line" key="recharts-scatter-line">{lineItem}</Layer>;
531
+ return (
532
+ <Layer className="recharts-scatter-line" key="recharts-scatter-line">
533
+ {lineItem}
534
+ </Layer>
535
+ );
533
536
  }
534
537
 
535
538
  function ScatterLabelListProvider({
@@ -546,14 +549,14 @@ function ScatterLabelListProvider({
546
549
  return points?.map((point): CartesianLabelListEntry => {
547
550
  const viewBox: TrapezoidViewBox = {
548
551
  /*
549
- * Scatter label uses x and y as the reference point for the label,
550
- * not cx and cy.
551
- */
552
+ * Scatter label uses x and y as the reference point for the label,
553
+ * not cx and cy.
554
+ */
552
555
  x: point.x ?? 0,
553
556
  /*
554
- * Scatter label uses x and y as the reference point for the label,
555
- * not cx and cy.
556
- */
557
+ * Scatter label uses x and y as the reference point for the label,
558
+ * not cx and cy.
559
+ */
557
560
  y: point.y ?? 0,
558
561
  width: point.width,
559
562
  height: point.height,
@@ -563,10 +566,10 @@ function ScatterLabelListProvider({
563
566
  return {
564
567
  ...viewBox,
565
568
  /*
566
- * Here we put undefined because Scatter shows two values usually, one for X and one for Y.
567
- * LabelList will see this undefined and will use its own `dataKey` prop to determine which value to show,
568
- * using the payload below.
569
- */
569
+ * Here we put undefined because Scatter shows two values usually, one for X and one for Y.
570
+ * LabelList will see this undefined and will use its own `dataKey` prop to determine which value to show,
571
+ * using the payload below.
572
+ */
570
573
  value: undefined,
571
574
  payload: point.payload,
572
575
  viewBox,
@@ -576,9 +579,11 @@ function ScatterLabelListProvider({
576
579
  });
577
580
  }, [chartViewBox, points]);
578
581
 
579
- return <CartesianLabelListContextProvider
580
- value={showLabels ? labelListEntries : undefined}
581
- >{children}</CartesianLabelListContextProvider>;
582
+ return (
583
+ <CartesianLabelListContextProvider value={showLabels ? labelListEntries : undefined}>
584
+ {children}
585
+ </CartesianLabelListContextProvider>
586
+ );
582
587
  }
583
588
 
584
589
  /**
@@ -619,15 +624,18 @@ function ScatterPoint({
619
624
  baseProps: ReturnType<typeof svgPropertiesNoEvents>;
620
625
  id: GraphicalItemId;
621
626
  restOfAllOtherProps: InternalProps;
622
- onMouseEnterFromContext: (data: ScatterPointItem, index: number) => (event: NativeMouseEvent<
623
- SVGGraphicsElement
624
- >) => void;
625
- onMouseLeaveFromContext: (data: ScatterPointItem, index: number) => (event: NativeMouseEvent<
626
- SVGGraphicsElement
627
- >) => void;
628
- onClickFromContext: (data: ScatterPointItem, index: number) => (event: NativeMouseEvent<
629
- SVGGraphicsElement
630
- >) => void;
627
+ onMouseEnterFromContext: (
628
+ data: ScatterPointItem,
629
+ index: number,
630
+ ) => (event: NativeMouseEvent<SVGGraphicsElement>) => void;
631
+ onMouseLeaveFromContext: (
632
+ data: ScatterPointItem,
633
+ index: number,
634
+ ) => (event: NativeMouseEvent<SVGGraphicsElement>) => void;
635
+ onClickFromContext: (
636
+ data: ScatterPointItem,
637
+ index: number,
638
+ ) => (event: NativeMouseEvent<SVGGraphicsElement>) => void;
631
639
  }): OctaneElement {
632
640
  const hasActiveShape = activeShape != null && activeShape !== false;
633
641
  const selectIsActive = useMemo(() => {
@@ -638,8 +646,7 @@ function ScatterPoint({
638
646
  const isActive: boolean = useAppSelector(selectIsActive) ?? false;
639
647
 
640
648
  // isActive is only true when hasActiveShape is true, so activeShape is defined here
641
- const option =
642
- isActive && activeShape != null && activeShape !== false ? activeShape : shape;
649
+ const option = isActive && activeShape != null && activeShape !== false ? activeShape : shape;
643
650
  const symbolProps: ScatterShapeProps = {
644
651
  ...baseProps,
645
652
  ...entry,
@@ -651,24 +658,26 @@ function ScatterPoint({
651
658
  [DATA_ITEM_GRAPHICAL_ITEM_ID_ATTRIBUTE_NAME]: String(id),
652
659
  };
653
660
 
654
- return <ZIndexLayer
655
- /*
656
- * inactive Scatters use the parent zIndex, which is represented by undefined here.
657
- * ZIndexLayer will render undefined zIndex as-is, as regular children, without portals.
658
- * Active Scatters use the activeDot zIndex so they render above other elements.
659
- */
660
- zIndex={isActive ? DefaultZIndexes.activeDot : undefined}
661
- >
662
- <Layer
663
- className="recharts-scatter-symbol"
664
- {...adaptEventsOfChild(restOfAllOtherProps, entry, index)}
665
- onMouseEnter={onMouseEnterFromContext(entry, index)}
666
- onMouseLeave={onMouseLeaveFromContext(entry, index)}
667
- onClick={onClickFromContext(entry, index)}
661
+ return (
662
+ <ZIndexLayer
663
+ /*
664
+ * inactive Scatters use the parent zIndex, which is represented by undefined here.
665
+ * ZIndexLayer will render undefined zIndex as-is, as regular children, without portals.
666
+ * Active Scatters use the activeDot zIndex so they render above other elements.
667
+ */
668
+ zIndex={isActive ? DefaultZIndexes.activeDot : undefined}
668
669
  >
669
- <ScatterSymbol option={option} {...symbolProps} />
670
- </Layer>
671
- </ZIndexLayer>;
670
+ <Layer
671
+ className="recharts-scatter-symbol"
672
+ {...adaptEventsOfChild(restOfAllOtherProps, entry, index)}
673
+ onMouseEnter={onMouseEnterFromContext(entry, index)}
674
+ onMouseLeave={onMouseLeaveFromContext(entry, index)}
675
+ onClick={onClickFromContext(entry, index)}
676
+ >
677
+ <ScatterSymbol option={option} {...symbolProps} />
678
+ </Layer>
679
+ </ZIndexLayer>
680
+ );
672
681
  }
673
682
 
674
683
  function ScatterSymbols(props: ScatterSymbolsProps) {
@@ -692,10 +701,10 @@ function ScatterSymbols(props: ScatterSymbolsProps) {
692
701
 
693
702
  const baseProps = svgPropertiesNoEvents(allOtherPropsWithoutId);
694
703
 
695
- return <>
696
- <ScatterLine points={points} props={allOtherPropsWithoutId} />
697
- {points.map(
698
- (entry: ScatterPointItem, i: number) =>
704
+ return (
705
+ <>
706
+ <ScatterLine points={points} props={allOtherPropsWithoutId} />
707
+ {points.map((entry: ScatterPointItem, i: number) => (
699
708
  <ScatterPoint
700
709
  key={`symbol-${entry?.cx}-${entry?.cy}-${entry?.size}-${i}`}
701
710
  entry={entry}
@@ -711,9 +720,10 @@ function ScatterSymbols(props: ScatterSymbolsProps) {
711
720
  onMouseEnterFromContext={onMouseEnterFromContext}
712
721
  onMouseLeaveFromContext={onMouseLeaveFromContext}
713
722
  onClickFromContext={onClickFromContext}
714
- />,
715
- )}
716
- </>;
723
+ />
724
+ ))}
725
+ </>
726
+ );
717
727
  }
718
728
 
719
729
  const defaultScatterAnimateItems: AnimationInterpolateFn<ScatterPointItem, CartesianLayout> = (
@@ -730,20 +740,20 @@ const defaultScatterAnimateItems: AnimationInterpolateFn<ScatterPointItem, Carte
730
740
  return [
731
741
  {
732
742
  ...item.next,
733
- cx: item.next.cx == null
734
- ? undefined
735
- : interpolate(item.prev.cx, item.next.cx, animationElapsedTime),
736
- cy: item.next.cy == null
737
- ? undefined
738
- : interpolate(item.prev.cy, item.next.cy, animationElapsedTime),
743
+ cx:
744
+ item.next.cx == null
745
+ ? undefined
746
+ : interpolate(item.prev.cx, item.next.cx, animationElapsedTime),
747
+ cy:
748
+ item.next.cy == null
749
+ ? undefined
750
+ : interpolate(item.prev.cy, item.next.cy, animationElapsedTime),
739
751
  size: interpolate(item.prev.size, item.next.size, animationElapsedTime),
740
752
  },
741
753
  ];
742
754
  }
743
755
  // added
744
- return [
745
- { ...item.next, size: interpolate(0, item.next.size, animationElapsedTime) },
746
- ];
756
+ return [{ ...item.next, size: interpolate(0, item.next.size, animationElapsedTime) }];
747
757
  });
748
758
  };
749
759
 
@@ -773,36 +783,40 @@ function SymbolsWithAnimation({
773
783
 
774
784
  if (layout == null) return null;
775
785
 
776
- return <ScatterLabelListProvider showLabels={!isAnimating} points={points}>
777
- <AnimatedItems
778
- animationInput={points}
779
- animationIdPrefix="recharts-scatter-"
780
- items={points}
781
- previousItemsRef={previousPointsRef}
782
- isAnimationActive={isAnimationActive}
783
- animationBegin={animationBegin}
784
- animationDuration={animationDuration}
785
- animationEasing={animationEasing}
786
- onAnimationStart={handleAnimationStart}
787
- onAnimationEnd={handleAnimationEnd}
788
- animationInterpolateFn={animationInterpolateFn}
789
- animationMatchBy={props.animationMatchBy}
790
- layout={layout}
791
- >
792
- {(stepData, animationElapsedTime, isEntrance) => <Layer>
793
- <ScatterSymbols
794
- points={stepData}
795
- allOtherScatterProps={props}
796
- showLabels={!isAnimating}
797
- animationElapsedTime={animationElapsedTime}
798
- isAnimating={isAnimating || animationElapsedTime < 1}
799
- isEntrance={isEntrance}
800
- />
801
- </Layer>}
802
- </AnimatedItems>
803
- {props.children}
804
- <LabelListFromLabelProp label={props.label} />
805
- </ScatterLabelListProvider>;
786
+ return (
787
+ <ScatterLabelListProvider showLabels={!isAnimating} points={points}>
788
+ <AnimatedItems
789
+ animationInput={points}
790
+ animationIdPrefix="recharts-scatter-"
791
+ items={points}
792
+ previousItemsRef={previousPointsRef}
793
+ isAnimationActive={isAnimationActive}
794
+ animationBegin={animationBegin}
795
+ animationDuration={animationDuration}
796
+ animationEasing={animationEasing}
797
+ onAnimationStart={handleAnimationStart}
798
+ onAnimationEnd={handleAnimationEnd}
799
+ animationInterpolateFn={animationInterpolateFn}
800
+ animationMatchBy={props.animationMatchBy}
801
+ layout={layout}
802
+ >
803
+ {(stepData, animationElapsedTime, isEntrance) => (
804
+ <Layer>
805
+ <ScatterSymbols
806
+ points={stepData}
807
+ allOtherScatterProps={props}
808
+ showLabels={!isAnimating}
809
+ animationElapsedTime={animationElapsedTime}
810
+ isAnimating={isAnimating || animationElapsedTime < 1}
811
+ isEntrance={isEntrance}
812
+ />
813
+ </Layer>
814
+ )}
815
+ </AnimatedItems>
816
+ {props.children}
817
+ <LabelListFromLabelProp label={props.label} />
818
+ </ScatterLabelListProvider>
819
+ );
806
820
  }
807
821
 
808
822
  export function computeScatterPoints({
@@ -829,16 +843,14 @@ export function computeScatterPoints({
829
843
  const zAxisDataKey = zAxis && zAxis.dataKey;
830
844
  const defaultRangeZ = zAxis ? zAxis.range : implicitZAxis.range;
831
845
  const defaultZ = defaultRangeZ && defaultRangeZ[0];
832
- const xBandSize =
833
- xAxis.scale.bandwidth ? xAxis.scale.bandwidth() : 0;
834
- const yBandSize =
835
- yAxis.scale.bandwidth ? yAxis.scale.bandwidth() : 0;
846
+ const xBandSize = xAxis.scale.bandwidth ? xAxis.scale.bandwidth() : 0;
847
+ const yBandSize = yAxis.scale.bandwidth ? yAxis.scale.bandwidth() : 0;
836
848
  return displayedData.map((entry: unknown, index): ScatterPointItem => {
837
849
  const x = getValueByDataKey<unknown, number | string>(entry, xAxisDataKey);
838
850
  const y = getValueByDataKey<unknown, number | string>(entry, yAxisDataKey);
839
851
  const z: number | string = isNullish(zAxisDataKey)
840
852
  ? '-'
841
- : getValueByDataKey<unknown, number | string>(entry, zAxisDataKey) ?? '-';
853
+ : (getValueByDataKey<unknown, number | string>(entry, zAxisDataKey) ?? '-');
842
854
 
843
855
  const tooltipPayload: Array<TooltipPayloadEntry> = [
844
856
  {
@@ -889,13 +901,11 @@ export function computeScatterPoints({
889
901
  index,
890
902
  dataKey: yAxisDataKey,
891
903
  });
892
- const size =
893
- z !== '-' && zAxis != null ? zAxis.scale.map(z) : defaultZ;
894
- const radius =
895
- size == null ? 0 : Math.sqrt(Math.max(size, 0) / Math.PI);
904
+ const size = z !== '-' && zAxis != null ? zAxis.scale.map(z) : defaultZ;
905
+ const radius = size == null ? 0 : Math.sqrt(Math.max(size, 0) / Math.PI);
896
906
 
897
907
  return {
898
- ...entry as Record<string, unknown>,
908
+ ...(entry as Record<string, unknown>),
899
909
  cx,
900
910
  cy,
901
911
  x: cx == null ? undefined : cx - radius,
@@ -907,7 +917,7 @@ export function computeScatterPoints({
907
917
  tooltipPayload,
908
918
  tooltipPosition: cx == null || cy == null ? undefined : { x: cx, y: cy },
909
919
  payload: entry,
910
- ...cells && cells[index] && cells[index].props as CellPropsFor<SVGPathElement>,
920
+ ...(cells && cells[index] && (cells[index].props as CellPropsFor<SVGPathElement>)),
911
921
  };
912
922
  });
913
923
  }
@@ -934,29 +944,32 @@ function ScatterWithId(props: InternalProps) {
934
944
  const layerClass = clsx('recharts-scatter', className);
935
945
  const clipPathId = id;
936
946
 
937
- return <ZIndexLayer zIndex={props.zIndex}>
938
- <Layer
939
- className={layerClass}
940
- clipPath={needClip ? `url(#clipPath-${clipPathId})` : undefined}
941
- id={id}
942
- >
943
- {needClip &&
944
- <defs>
945
- <GraphicalItemClipPath clipPathId={clipPathId} xAxisId={xAxisId} yAxisId={yAxisId} />
946
- </defs>}
947
- <SetErrorBarContext
948
- xAxisId={xAxisId}
949
- yAxisId={yAxisId}
950
- data={points}
951
- dataPointFormatter={errorBarDataPointFormatter}
952
- errorBarOffset={0}
947
+ return (
948
+ <ZIndexLayer zIndex={props.zIndex}>
949
+ <Layer
950
+ className={layerClass}
951
+ clipPath={needClip ? `url(#clipPath-${clipPathId})` : undefined}
952
+ id={id}
953
953
  >
954
- <Layer key="recharts-scatter-symbols">
955
- <SymbolsWithAnimation props={props} previousPointsRef={previousPointsRef} />
956
- </Layer>
957
- </SetErrorBarContext>
958
- </Layer>
959
- </ZIndexLayer>;
954
+ {needClip && (
955
+ <defs>
956
+ <GraphicalItemClipPath clipPathId={clipPathId} xAxisId={xAxisId} yAxisId={yAxisId} />
957
+ </defs>
958
+ )}
959
+ <SetErrorBarContext
960
+ xAxisId={xAxisId}
961
+ yAxisId={yAxisId}
962
+ data={points}
963
+ dataPointFormatter={errorBarDataPointFormatter}
964
+ errorBarOffset={0}
965
+ >
966
+ <Layer key="recharts-scatter-symbols">
967
+ <SymbolsWithAnimation props={props} previousPointsRef={previousPointsRef} />
968
+ </Layer>
969
+ </SetErrorBarContext>
970
+ </Layer>
971
+ </ZIndexLayer>
972
+ );
960
973
  }
961
974
 
962
975
  export const defaultScatterProps = {
@@ -1007,37 +1020,39 @@ function ScatterImpl(props: WithIdRequired<Props>) {
1007
1020
  if (needClip == null || points == null) {
1008
1021
  return <CellsContext value={cellRegistry}>{props.children}</CellsContext>;
1009
1022
  }
1010
- return <CellsContext value={cellRegistry}>
1011
- <SetScatterTooltipEntrySettings
1012
- dataKey={props.dataKey}
1013
- points={points}
1014
- stroke={props.stroke}
1015
- strokeWidth={props.strokeWidth}
1016
- fill={props.fill}
1017
- name={props.name}
1018
- hide={props.hide}
1019
- formatter={props.formatter}
1020
- tooltipType={props.tooltipType}
1021
- id={props.id}
1022
- />
1023
- <ScatterWithId
1024
- {...everythingElse}
1025
- xAxisId={xAxisId}
1026
- yAxisId={yAxisId}
1027
- zAxisId={zAxisId}
1028
- lineType={lineType}
1029
- lineJointType={lineJointType}
1030
- legendType={legendType}
1031
- shape={shape}
1032
- hide={hide}
1033
- isAnimationActive={isAnimationActive}
1034
- animationBegin={animationBegin}
1035
- animationDuration={animationDuration}
1036
- animationEasing={animationEasing}
1037
- points={points}
1038
- needClip={needClip}
1039
- />
1040
- </CellsContext>;
1023
+ return (
1024
+ <CellsContext value={cellRegistry}>
1025
+ <SetScatterTooltipEntrySettings
1026
+ dataKey={props.dataKey}
1027
+ points={points}
1028
+ stroke={props.stroke}
1029
+ strokeWidth={props.strokeWidth}
1030
+ fill={props.fill}
1031
+ name={props.name}
1032
+ hide={props.hide}
1033
+ formatter={props.formatter}
1034
+ tooltipType={props.tooltipType}
1035
+ id={props.id}
1036
+ />
1037
+ <ScatterWithId
1038
+ {...everythingElse}
1039
+ xAxisId={xAxisId}
1040
+ yAxisId={yAxisId}
1041
+ zAxisId={zAxisId}
1042
+ lineType={lineType}
1043
+ lineJointType={lineJointType}
1044
+ legendType={legendType}
1045
+ shape={shape}
1046
+ hide={hide}
1047
+ isAnimationActive={isAnimationActive}
1048
+ animationBegin={animationBegin}
1049
+ animationDuration={animationDuration}
1050
+ animationEasing={animationEasing}
1051
+ points={points}
1052
+ needClip={needClip}
1053
+ />
1054
+ </CellsContext>
1055
+ );
1041
1056
  }
1042
1057
 
1043
1058
  function ScatterFn<DataPointType = any, ValueAxisType = any>(
@@ -1045,25 +1060,29 @@ function ScatterFn<DataPointType = any, ValueAxisType = any>(
1045
1060
  ) {
1046
1061
  const props = resolveDefaultProps(outsideProps, defaultScatterProps);
1047
1062
  const isPanorama = useIsPanorama();
1048
- return <RegisterGraphicalItemId id={props.id} type="scatter">
1049
- {(id) => <>
1050
- <SetLegendPayload legendPayload={computeLegendPayloadFromScatterProps(props)} />
1051
- <SetCartesianGraphicalItem
1052
- type="scatter"
1053
- id={id}
1054
- data={props.data}
1055
- xAxisId={props.xAxisId}
1056
- yAxisId={props.yAxisId}
1057
- zAxisId={props.zAxisId}
1058
- dataKey={props.dataKey}
1059
- hide={props.hide}
1060
- name={props.name}
1061
- tooltipType={props.tooltipType}
1062
- isPanorama={isPanorama}
1063
- />
1064
- <ScatterImpl {...props} id={id} />
1065
- </>}
1066
- </RegisterGraphicalItemId>;
1063
+ return (
1064
+ <RegisterGraphicalItemId id={props.id} type="scatter">
1065
+ {(id) => (
1066
+ <>
1067
+ <SetLegendPayload legendPayload={computeLegendPayloadFromScatterProps(props)} />
1068
+ <SetCartesianGraphicalItem
1069
+ type="scatter"
1070
+ id={id}
1071
+ data={props.data}
1072
+ xAxisId={props.xAxisId}
1073
+ yAxisId={props.yAxisId}
1074
+ zAxisId={props.zAxisId}
1075
+ dataKey={props.dataKey}
1076
+ hide={props.hide}
1077
+ name={props.name}
1078
+ tooltipType={props.tooltipType}
1079
+ isPanorama={isPanorama}
1080
+ />
1081
+ <ScatterImpl {...props} id={id} />
1082
+ </>
1083
+ )}
1084
+ </RegisterGraphicalItemId>
1085
+ );
1067
1086
  }
1068
1087
 
1069
1088
  /**
@@ -1072,8 +1091,7 @@ function ScatterFn<DataPointType = any, ValueAxisType = any>(
1072
1091
  * @provides CellReader
1073
1092
  * @consumes CartesianChartContext
1074
1093
  */
1075
- export const Scatter = React.memo(ScatterFn, propsAreEqual) as
1076
- typeof ScatterFn & {
1077
- displayName?: string;
1078
- };
1094
+ export const Scatter = React.memo(ScatterFn, propsAreEqual) as typeof ScatterFn & {
1095
+ displayName?: string;
1096
+ };
1079
1097
  Scatter.displayName = 'Scatter';