@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
@@ -53,245 +53,248 @@ import { getClassNameFromUnknown } from '../util/getClassNameFromUnknown';
53
53
  const eps = 1e-5;
54
54
  const COS_45 = Math.cos(degreeToRadian(45));
55
55
 
56
- export interface PolarAngleAxisProps<DataPointType = any, DataValueType = any> extends Omit<
57
- RenderableAxisProps<DataPointType, DataValueType>,
58
- 'axisLine' | 'tickCount' | 'domain' | 'scale' | 'tick'
59
- >, ZIndexable {
56
+ export interface PolarAngleAxisProps<DataPointType = any, DataValueType = any>
57
+ extends
58
+ Omit<
59
+ RenderableAxisProps<DataPointType, DataValueType>,
60
+ 'axisLine' | 'tickCount' | 'domain' | 'scale' | 'tick'
61
+ >,
62
+ ZIndexable {
60
63
  /**
61
- * Controls axis line element. These are be passed as props to SVG `<line>` element representing the axis line.
62
- * If `true` then the axis line is drawn using props of the PolarAngleAxis component.
63
- * If `false` then the axis line is not drawn.
64
- *
65
- * Also see `axisLineType` prop to change the shape of the axis line.
66
- *
67
- * @defaultValue true
68
- *
69
- * @example <PolarAngleAxis axisLine={{ stroke: 'red', strokeWidth: 2 }} />
70
- * @example <PolarAngleAxis axisLine={false} />
71
- * @example <PolarAngleAxis stroke='red' strokeWidth={2} strokeDasharray={4} />
72
- */
64
+ * Controls axis line element. These are be passed as props to SVG `<line>` element representing the axis line.
65
+ * If `true` then the axis line is drawn using props of the PolarAngleAxis component.
66
+ * If `false` then the axis line is not drawn.
67
+ *
68
+ * Also see `axisLineType` prop to change the shape of the axis line.
69
+ *
70
+ * @defaultValue true
71
+ *
72
+ * @example <PolarAngleAxis axisLine={{ stroke: 'red', strokeWidth: 2 }} />
73
+ * @example <PolarAngleAxis axisLine={false} />
74
+ * @example <PolarAngleAxis stroke='red' strokeWidth={2} strokeDasharray={4} />
75
+ */
73
76
  axisLine?: boolean | SVGProps<SVGCircleElement | SVGPathElement>;
74
77
  /**
75
- * @defaultValue false
76
- */
78
+ * @defaultValue false
79
+ */
77
80
  allowDecimals?: boolean;
78
81
  /**
79
- * Allow the axis has duplicated categories or not when the type of axis is "category".
80
- * @defaultValue true
81
- */
82
+ * Allow the axis has duplicated categories or not when the type of axis is "category".
83
+ * @defaultValue true
84
+ */
82
85
  allowDuplicatedCategory?: boolean;
83
86
  /**
84
- * @defaultValue 0
85
- */
87
+ * @defaultValue 0
88
+ */
86
89
  angleAxisId?: string | number;
87
90
  /**
88
- * The type of axis line.
89
- * @defaultValue polygon
90
- */
91
+ * The type of axis line.
92
+ * @defaultValue polygon
93
+ */
91
94
  axisLineType?: 'polygon' | 'circle';
92
95
  /**
93
- * The x-coordinate of center.
94
- * When used inside a chart context, this prop is calculated based on the chart's dimensions,
95
- * and this prop is ignored.
96
- *
97
- * This is only used when rendered outside a chart context.
98
- */
96
+ * The x-coordinate of center.
97
+ * When used inside a chart context, this prop is calculated based on the chart's dimensions,
98
+ * and this prop is ignored.
99
+ *
100
+ * This is only used when rendered outside a chart context.
101
+ */
99
102
  cx?: number;
100
103
  /**
101
- * The y-coordinate of center.
102
- * When used inside a chart context, this prop is calculated based on the chart's dimensions,
103
- * and this prop is ignored.
104
- *
105
- * This is only used when rendered outside a chart context.
106
- */
104
+ * The y-coordinate of center.
105
+ * When used inside a chart context, this prop is calculated based on the chart's dimensions,
106
+ * and this prop is ignored.
107
+ *
108
+ * This is only used when rendered outside a chart context.
109
+ */
107
110
  cy?: number;
108
111
  /**
109
- * The orientation of axis text.
110
- * @defaultValue 'outer'
111
- */
112
+ * The orientation of axis text.
113
+ * @defaultValue 'outer'
114
+ */
112
115
  orientation?: 'inner' | 'outer';
113
116
  /**
114
- * Specify the domain of axis when the axis is a number axis.
115
- *
116
- * If undefined, then the domain is calculated based on the data and dataKeys.
117
- *
118
- * The length of domain should be 2, and we will validate the values in domain.
119
- *
120
- * Each element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',
121
- * or a function that accepts a single argument and returns a number.
122
- *
123
- * If any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.
124
- * If a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.
125
- *
126
- * @example <PolarAngleAxis type="number" domain={['dataMin', 'dataMax']} />
127
- * @example <PolarAngleAxis type="number" domain={[0, 'dataMax']} />
128
- * @example <PolarAngleAxis type="number" domain={['auto', 'auto']} />
129
- * @example <PolarAngleAxis type="number" domain={[0, 'dataMax + 1000']} />
130
- * @example <PolarAngleAxis type="number" domain={['dataMin - 100', 'dataMax + 100']} />
131
- * @example <PolarAngleAxis type="number" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />
132
- * @example <PolarAngleAxis type="number" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />
133
- * @example <PolarAngleAxis type="number" domain={[0, 100]} allowDataOverflow />
134
- */
117
+ * Specify the domain of axis when the axis is a number axis.
118
+ *
119
+ * If undefined, then the domain is calculated based on the data and dataKeys.
120
+ *
121
+ * The length of domain should be 2, and we will validate the values in domain.
122
+ *
123
+ * Each element in the array can be a number, 'auto', 'dataMin', 'dataMax', a string like 'dataMin - 20', 'dataMax + 100',
124
+ * or a function that accepts a single argument and returns a number.
125
+ *
126
+ * If any element of domain is set to be 'auto', comprehensible scale ticks will be calculated, and the final domain of axis is generated by the ticks.
127
+ * If a function, receives '[dataMin, dataMax]', and must return a computed domain as '[min, max]'.
128
+ *
129
+ * @example <PolarAngleAxis type="number" domain={['dataMin', 'dataMax']} />
130
+ * @example <PolarAngleAxis type="number" domain={[0, 'dataMax']} />
131
+ * @example <PolarAngleAxis type="number" domain={['auto', 'auto']} />
132
+ * @example <PolarAngleAxis type="number" domain={[0, 'dataMax + 1000']} />
133
+ * @example <PolarAngleAxis type="number" domain={['dataMin - 100', 'dataMax + 100']} />
134
+ * @example <PolarAngleAxis type="number" domain={[dataMin => (0 - Math.abs(dataMin)), dataMax => (dataMax * 2)]} />
135
+ * @example <PolarAngleAxis type="number" domain={([dataMin, dataMax]) => { const absMax = Math.max(Math.abs(dataMin), Math.abs(dataMax)); return [-absMax, absMax]; }} />
136
+ * @example <PolarAngleAxis type="number" domain={[0, 100]} allowDataOverflow />
137
+ */
135
138
  domain?: AxisDomain;
136
139
  /**
137
- * Scale function determines how data values are mapped to visual values.
138
- * In other words, decided the mapping between data domain and coordinate range.
139
- *
140
- * If undefined, or 'auto', the scale function is created internally according to the type of axis and data.
141
- *
142
- * You can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.
143
- *
144
- * @defaultValue auto
145
- * @example <PolarAngleAxis scale="log" />
146
- * @example
147
- * import { scaleLog } from 'd3-scale';
148
- * const scale = scaleLog().base(Math.E);
149
- * <PolarAngleAxis scale={scale} />
150
- */
151
- scale?: | ScaleType
152
- | CustomScaleDefinition
153
- | CustomScaleDefinition<string>
154
- | CustomScaleDefinition<number>
155
- | CustomScaleDefinition<Date>;
140
+ * Scale function determines how data values are mapped to visual values.
141
+ * In other words, decided the mapping between data domain and coordinate range.
142
+ *
143
+ * If undefined, or 'auto', the scale function is created internally according to the type of axis and data.
144
+ *
145
+ * You can define a custom scale, either as a string shortcut to a d3 scale, or as a complete scale definition object.
146
+ *
147
+ * @defaultValue auto
148
+ * @example <PolarAngleAxis scale="log" />
149
+ * @example
150
+ * import { scaleLog } from 'd3-scale';
151
+ * const scale = scaleLog().base(Math.E);
152
+ * <PolarAngleAxis scale={scale} />
153
+ */
154
+ scale?:
155
+ | ScaleType
156
+ | CustomScaleDefinition
157
+ | CustomScaleDefinition<string>
158
+ | CustomScaleDefinition<number>
159
+ | CustomScaleDefinition<Date>;
156
160
  /**
157
- * The outer radius of circle grid.
158
- * If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy.
159
- */
161
+ * The outer radius of circle grid.
162
+ * If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy.
163
+ */
160
164
  radius?: number | string;
161
165
  /**
162
- * Defines how the individual label text is rendered.
163
- * This controls the settings for individual ticks; on a typical axis, there are multiple ticks, depending on your data.
164
- *
165
- * If you want to customize the overall axis label, use the `label` prop instead.
166
- *
167
- * Options:
168
- * - `false`: Do not render any tick labels.
169
- * - `true`: Render tick labels with default settings.
170
- * - `object`: An object of props to be merged into the internally calculated tick props.
171
- * - `OctaneElement`: A custom React element to be used as the tick label.
172
- * - `function`: A function that returns a React element for custom rendering of tick labels.
173
- *
174
- * @defaultValue true
175
- */
166
+ * Defines how the individual label text is rendered.
167
+ * This controls the settings for individual ticks; on a typical axis, there are multiple ticks, depending on your data.
168
+ *
169
+ * If you want to customize the overall axis label, use the `label` prop instead.
170
+ *
171
+ * Options:
172
+ * - `false`: Do not render any tick labels.
173
+ * - `true`: Render tick labels with default settings.
174
+ * - `object`: An object of props to be merged into the internally calculated tick props.
175
+ * - `OctaneElement`: A custom React element to be used as the tick label.
176
+ * - `function`: A function that returns a React element for custom rendering of tick labels.
177
+ *
178
+ * @defaultValue true
179
+ */
176
180
  tick?: TickProp<PolarTickContentProps>;
177
181
  /**
178
- * The count of axis ticks. Not used if 'type' is 'category'.
179
- */
182
+ * The count of axis ticks. Not used if 'type' is 'category'.
183
+ */
180
184
  tickCount?: number;
181
185
  /**
182
- * Controls how Recharts calculates "nice" tick values for this axis.
183
- * Options: `'none'`, `'auto'`, `'adaptive'`, `'snap125'`.
184
- * See {@link NiceTicksAlgorithm} for a full description of each option.
185
- *
186
- * @defaultValue 'auto'
187
- */
186
+ * Controls how Recharts calculates "nice" tick values for this axis.
187
+ * Options: `'none'`, `'auto'`, `'adaptive'`, `'snap125'`.
188
+ * See {@link NiceTicksAlgorithm} for a full description of each option.
189
+ *
190
+ * @defaultValue 'auto'
191
+ */
188
192
  niceTicks?: NiceTicksAlgorithm;
189
193
  /**
190
- * The formatter function of ticks.
191
- */
194
+ * The formatter function of ticks.
195
+ */
192
196
  tickFormatter?: (value: any, index: number) => string;
193
197
  /**
194
- * The length of tick line.
195
- * @defaultValue 8
196
- */
198
+ * The length of tick line.
199
+ * @defaultValue 8
200
+ */
197
201
  tickSize?: number;
198
202
  /**
199
- * The array of tick values to map through the axis scale.
200
- */
203
+ * The array of tick values to map through the axis scale.
204
+ */
201
205
  ticks?: ReadonlyArray<AxisTick>;
202
206
  /**
203
- * The type of axis.
204
- *
205
- * `category`: Treats data as distinct values.
206
- * Each value is in the same distance from its neighbors, regardless of their actual numeric difference.
207
- *
208
- * `number`: Treats data as continuous range.
209
- * Values that are numerically closer are placed closer together on the axis.
210
- *
211
- * `auto`: the type is inferred based on the chart layout.
212
- *
213
- * @defaultValue auto
214
- */
207
+ * The type of axis.
208
+ *
209
+ * `category`: Treats data as distinct values.
210
+ * Each value is in the same distance from its neighbors, regardless of their actual numeric difference.
211
+ *
212
+ * `number`: Treats data as continuous range.
213
+ * Values that are numerically closer are placed closer together on the axis.
214
+ *
215
+ * `auto`: the type is inferred based on the chart layout.
216
+ *
217
+ * @defaultValue auto
218
+ */
215
219
  type?: AxisDomainTypeInput;
216
220
  /**
217
- * Z-Index of this component and its children. The higher the value,
218
- * the more on top it will be rendered.
219
- * Components with higher zIndex will appear in front of components with lower zIndex.
220
- * If undefined or 0, the content is rendered in the default layer without portals.
221
- *
222
- * @since 3.4
223
- * @defaultValue 500
224
- * @see {@link https://recharts.github.io/en-US/guide/zIndex/ Z-Index and layers guide}
225
- */
221
+ * Z-Index of this component and its children. The higher the value,
222
+ * the more on top it will be rendered.
223
+ * Components with higher zIndex will appear in front of components with lower zIndex.
224
+ * If undefined or 0, the content is rendered in the default layer without portals.
225
+ *
226
+ * @since 3.4
227
+ * @defaultValue 500
228
+ * @see {@link https://recharts.github.io/en-US/guide/zIndex/ Z-Index and layers guide}
229
+ */
226
230
  zIndex?: number;
227
231
  }
228
232
 
229
233
  type PolarAngleAxisEvents = {
230
234
  /**
231
- * The customized event handler of click on the ticks of this axis
232
- */
235
+ * The customized event handler of click on the ticks of this axis
236
+ */
233
237
  onClick?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
234
238
  /**
235
- * The customized event handler of mousedown on the ticks of this axis
236
- */
239
+ * The customized event handler of mousedown on the ticks of this axis
240
+ */
237
241
  onMouseDown?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
238
242
  /**
239
- * The customized event handler of mouseup on the ticks of this axis
240
- */
243
+ * The customized event handler of mouseup on the ticks of this axis
244
+ */
241
245
  onMouseUp?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
242
246
  /**
243
- * The customized event handler of mousemove on the ticks of this axis
244
- */
247
+ * The customized event handler of mousemove on the ticks of this axis
248
+ */
245
249
  onMouseMove?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
246
250
  /**
247
- * The customized event handler of mouseover on the ticks of this axis
248
- */
251
+ * The customized event handler of mouseover on the ticks of this axis
252
+ */
249
253
  onMouseOver?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
250
254
  /**
251
- * The customized event handler of mouseout on the ticks of this axis
252
- */
255
+ * The customized event handler of mouseout on the ticks of this axis
256
+ */
253
257
  onMouseOut?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
254
258
  /**
255
- * The customized event handler of mouseenter on the ticks of this axis
256
- */
259
+ * The customized event handler of mouseenter on the ticks of this axis
260
+ */
257
261
  onMouseEnter?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
258
262
  /**
259
- * The customized event handler of mouseleave on the ticks of this axis
260
- */
263
+ * The customized event handler of mouseleave on the ticks of this axis
264
+ */
261
265
  onMouseLeave?: (data: TickItem, index: number, e: NativeMouseEvent<SVGGElement>) => void;
262
266
  onTouchStart?: (data: TickItem, index: number, e: NativeTouchEvent<SVGGElement>) => void;
263
267
  onTouchMove?: (data: TickItem, index: number, e: NativeTouchEvent<SVGGElement>) => void;
264
268
  onTouchEnd?: (data: TickItem, index: number, e: NativeTouchEvent<SVGGElement>) => void;
265
269
  };
266
270
 
267
- type AxisSvgProps =
268
- Omit<
269
- PresentationAttributesAdaptChildEvent<TickItem, SVGGElement>,
270
- 'scale' | 'type' | 'dangerouslySetInnerHTML' | 'ref'
271
- > & { ref?: never };
271
+ type AxisSvgProps = Omit<
272
+ PresentationAttributesAdaptChildEvent<TickItem, SVGGElement>,
273
+ 'scale' | 'type' | 'dangerouslySetInnerHTML' | 'ref'
274
+ > & { ref?: never };
272
275
 
273
- export type Props<DataPointType = any, DataValueType = any> =
274
- AxisSvgProps & PolarAngleAxisProps<DataPointType, DataValueType>;
276
+ export type Props<DataPointType = any, DataValueType = any> = AxisSvgProps &
277
+ PolarAngleAxisProps<DataPointType, DataValueType>;
275
278
 
276
- type PropsWithDefaults<DataPointType = any, DataValueType = any> =
277
- RequiresDefaultProps<Props<DataPointType, DataValueType>, typeof defaultPolarAngleAxisProps>;
279
+ type PropsWithDefaults<DataPointType = any, DataValueType = any> = RequiresDefaultProps<
280
+ Props<DataPointType, DataValueType>,
281
+ typeof defaultPolarAngleAxisProps
282
+ >;
278
283
 
279
- type InternalPolarAngleAxisProps =
280
- Omit<PropsWithDefaults, 'scale' | 'ticks'> & {
281
- cx: number;
282
- cy: number;
283
- radius: number;
284
- ticks: ReadonlyArray<TickItem>;
285
- scale: RechartsScale;
286
- } & PolarAngleAxisEvents;
284
+ type InternalPolarAngleAxisProps = Omit<PropsWithDefaults, 'scale' | 'ticks'> & {
285
+ cx: number;
286
+ cy: number;
287
+ radius: number;
288
+ ticks: ReadonlyArray<TickItem>;
289
+ scale: RechartsScale;
290
+ } & PolarAngleAxisEvents;
287
291
 
288
292
  const AXIS_TYPE = 'angleAxis';
289
293
 
290
- type AngleAxisSettingsReporter =
291
- Omit<AngleAxisSettings, 'type'> & {
292
- children: OctaneNode;
293
- type: AxisDomainTypeInput;
294
- };
294
+ type AngleAxisSettingsReporter = Omit<AngleAxisSettings, 'type'> & {
295
+ children: OctaneNode;
296
+ type: AxisDomainTypeInput;
297
+ };
295
298
 
296
299
  function SetAngleAxisSettings(props: AngleAxisSettingsReporter): OctaneNode {
297
300
  const dispatch = useAppDispatch();
@@ -403,21 +406,25 @@ const AxisLine = (props: InternalPolarAngleAxisProps) => {
403
406
  };
404
407
 
405
408
  if (axisLineType === 'circle') {
406
- return <Dot
407
- className="recharts-polar-angle-axis-line"
408
- {...axisLineProps as SVGPropsForHost<typeof axisLineProps, SVGCircleElement>}
409
- cx={cx}
410
- cy={cy}
411
- r={radius}
412
- />;
409
+ return (
410
+ <Dot
411
+ className="recharts-polar-angle-axis-line"
412
+ {...(axisLineProps as SVGPropsForHost<typeof axisLineProps, SVGCircleElement>)}
413
+ cx={cx}
414
+ cy={cy}
415
+ r={radius}
416
+ />
417
+ );
413
418
  }
414
419
  const points = ticks.map((entry) => polarToCartesian(cx, cy, radius, entry.coordinate));
415
420
 
416
- return <Polygon
417
- className="recharts-polar-angle-axis-line"
418
- {...axisLineProps as SVGPropsForHost<typeof axisLineProps, SVGPathElement>}
419
- points={points}
420
- />;
421
+ return (
422
+ <Polygon
423
+ className="recharts-polar-angle-axis-line"
424
+ {...(axisLineProps as SVGPropsForHost<typeof axisLineProps, SVGPathElement>)}
425
+ points={points}
426
+ />
427
+ );
421
428
  };
422
429
 
423
430
  type TickItemProps = {
@@ -436,7 +443,11 @@ const TickItemText = ({ tick, tickProps, value }: TickItemProps): OctaneNode =>
436
443
  if (typeof tick === 'function') {
437
444
  return tick(tickProps);
438
445
  }
439
- return <Text {...tickProps} className="recharts-polar-angle-axis-tick-value">{value}</Text>;
446
+ return (
447
+ <Text {...tickProps} className="recharts-polar-angle-axis-tick-value">
448
+ {value}
449
+ </Text>
450
+ );
440
451
  };
441
452
 
442
453
  const Ticks = (props: InternalPolarAngleAxisProps) => {
@@ -466,19 +477,22 @@ const Ticks = (props: InternalPolarAngleAxisProps) => {
466
477
  y: lineCoord.y2,
467
478
  };
468
479
 
469
- return <Layer
470
- className={clsx('recharts-polar-angle-axis-tick', getClassNameFromUnknown(tick))}
471
- key={`tick-${entry.coordinate}`}
472
- {...adaptEventsOfChild(props, entry, i)}
473
- >
474
- {tickLine &&
475
- <line className="recharts-polar-angle-axis-tick-line" {...tickLineProps} {...lineCoord} />}
476
- <TickItemText
477
- tick={tick}
478
- tickProps={tickProps}
479
- value={tickFormatter ? tickFormatter(entry.value, i) : entry.value}
480
- />
481
- </Layer>;
480
+ return (
481
+ <Layer
482
+ className={clsx('recharts-polar-angle-axis-tick', getClassNameFromUnknown(tick))}
483
+ key={`tick-${entry.coordinate}`}
484
+ {...adaptEventsOfChild(props, entry, i)}
485
+ >
486
+ {tickLine && (
487
+ <line className="recharts-polar-angle-axis-tick-line" {...tickLineProps} {...lineCoord} />
488
+ )}
489
+ <TickItemText
490
+ tick={tick}
491
+ tickProps={tickProps}
492
+ value={tickFormatter ? tickFormatter(entry.value, i) : entry.value}
493
+ />
494
+ </Layer>
495
+ );
482
496
  });
483
497
 
484
498
  return <Layer className="recharts-polar-angle-axis-ticks">{items}</Layer>;
@@ -492,8 +506,8 @@ export const PolarAngleAxisWrapper: FunctionComponent<PropsWithDefaults> = (
492
506
  const viewBox = useAppSelector(selectPolarViewBox);
493
507
  const scale = useAppSelector((state) => selectPolarAxisScale(state, 'angleAxis', angleAxisId));
494
508
  const isPanorama = useIsPanorama();
495
- const ticks = useAppSelector(
496
- (state) => selectPolarAngleAxisTicks(state, 'angleAxis', angleAxisId, isPanorama),
509
+ const ticks = useAppSelector((state) =>
510
+ selectPolarAngleAxisTicks(state, 'angleAxis', angleAxisId, isPanorama),
497
511
  );
498
512
 
499
513
  if (viewBox == null || !ticks || !ticks.length || scale == null) {
@@ -508,12 +522,14 @@ export const PolarAngleAxisWrapper: FunctionComponent<PropsWithDefaults> = (
508
522
  ticks,
509
523
  };
510
524
 
511
- return <ZIndexLayer zIndex={props.zIndex}>
512
- <Layer className={clsx('recharts-polar-angle-axis', AXIS_TYPE, props.className)}>
513
- <AxisLine {...props} />
514
- <Ticks {...props} />
515
- </Layer>
516
- </ZIndexLayer>;
525
+ return (
526
+ <ZIndexLayer zIndex={props.zIndex}>
527
+ <Layer className={clsx('recharts-polar-angle-axis', AXIS_TYPE, props.className)}>
528
+ <AxisLine {...props} />
529
+ <Ticks {...props} />
530
+ </Layer>
531
+ </ZIndexLayer>
532
+ );
517
533
  };
518
534
 
519
535
  /**
@@ -528,27 +544,29 @@ export function PolarAngleAxis<DataPointType = any, DataValueType = any>(
528
544
  defaultPolarAngleAxisProps,
529
545
  );
530
546
 
531
- return <SetAngleAxisSettings
532
- id={props.angleAxisId}
533
- scale={props.scale}
534
- type={props.type}
535
- dataKey={props.dataKey}
536
- unit={undefined}
537
- name={props.name}
538
- allowDuplicatedCategory={false}
539
- // Ignoring the prop on purpose because axis calculation behaves as if it was false and Tooltip requires it to be true.
540
- allowDataOverflow={false}
541
- reversed={props.reversed}
542
- includeHidden={false}
543
- allowDecimals={props.allowDecimals}
544
- tickCount={props.tickCount}
545
- niceTicks={props.niceTicks ?? 'auto'}
546
- ticks={props.ticks}
547
- tick={props.tick}
548
- domain={props.domain}
549
- >
550
- <PolarAngleAxisWrapper {...props} />
551
- </SetAngleAxisSettings>;
547
+ return (
548
+ <SetAngleAxisSettings
549
+ id={props.angleAxisId}
550
+ scale={props.scale}
551
+ type={props.type}
552
+ dataKey={props.dataKey}
553
+ unit={undefined}
554
+ name={props.name}
555
+ allowDuplicatedCategory={false}
556
+ // Ignoring the prop on purpose because axis calculation behaves as if it was false and Tooltip requires it to be true.
557
+ allowDataOverflow={false}
558
+ reversed={props.reversed}
559
+ includeHidden={false}
560
+ allowDecimals={props.allowDecimals}
561
+ tickCount={props.tickCount}
562
+ niceTicks={props.niceTicks ?? 'auto'}
563
+ ticks={props.ticks}
564
+ tick={props.tick}
565
+ domain={props.domain}
566
+ >
567
+ <PolarAngleAxisWrapper {...props} />
568
+ </SetAngleAxisSettings>
569
+ );
552
570
  }
553
571
 
554
572
  PolarAngleAxis.displayName = 'PolarAngleAxis';