@octanejs/recharts 0.1.61 → 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
@@ -58,9 +58,11 @@ export function useBarStackClipPathUrl(index: number) {
58
58
  return 'url(#' + getClipPathId(stackId, index) + ')';
59
59
  }
60
60
 
61
- export function BarStackClipLayer(props: LayerProps & {
62
- index: number;
63
- }) {
61
+ export function BarStackClipLayer(
62
+ props: LayerProps & {
63
+ index: number;
64
+ },
65
+ ) {
64
66
  const { index, ...rest } = props;
65
67
  const clipPathUrl = useBarStackClipPathUrl(index);
66
68
  return <Layer className="recharts-bar-stack-layer" clipPath={clipPathUrl} {...rest} />;
@@ -70,42 +72,45 @@ export function BarStackClipLayer(props: LayerProps & {
70
72
  * Renders one clipPath per stack rectangle so the whole stack gets rounded
71
73
  * corners.
72
74
  */
73
- function BarStackClipPath(props: {
74
- stackId: NormalizedStackId;
75
- radius: RectRadius;
76
- }) {
75
+ function BarStackClipPath(props: { stackId: NormalizedStackId; radius: RectRadius }) {
77
76
  const { stackId, radius } = props;
78
77
  const isPanorama = useIsPanorama();
79
78
  const positions = useAppSelector((state) => selectStackRects(state, stackId, isPanorama));
80
79
  if (positions == null || positions.length === 0) {
81
80
  return null;
82
81
  }
83
- return <defs>{positions.map((pos, index) => {
84
- if (pos == null) {
85
- return null;
86
- }
87
- const clipPathId = getClipPathId(stackId, index);
88
- return <clipPath key={clipPathId} id={clipPathId}>
89
- <Rectangle
90
- isAnimationActive={false}
91
- isUpdateAnimationActive={false}
92
- x={pos.x}
93
- y={pos.y}
94
- width={pos.width}
95
- height={pos.height}
96
- radius={radius}
97
- />
98
- </clipPath>;
99
- })}</defs>;
82
+ return (
83
+ <defs>
84
+ {positions.map((pos, index) => {
85
+ if (pos == null) {
86
+ return null;
87
+ }
88
+ const clipPathId = getClipPathId(stackId, index);
89
+ return (
90
+ <clipPath key={clipPathId} id={clipPathId}>
91
+ <Rectangle
92
+ isAnimationActive={false}
93
+ isUpdateAnimationActive={false}
94
+ x={pos.x}
95
+ y={pos.y}
96
+ width={pos.width}
97
+ height={pos.height}
98
+ radius={radius}
99
+ />
100
+ </clipPath>
101
+ );
102
+ })}
103
+ </defs>
104
+ );
100
105
  }
101
106
 
102
107
  function BarStackImpl(props: BarStackProps) @{
103
108
  const resolvedStackId = useUniqueId('recharts-bar-stack', getNormalizedStackId(props.stackId));
104
109
  const { children, radius } = resolveDefaultProps(props, defaultBarStackProps);
105
- const context: BarStackSettings = useMemo(() => ({ stackId: resolvedStackId, radius }), [
106
- resolvedStackId,
107
- radius,
108
- ]);
110
+ const context: BarStackSettings = useMemo(
111
+ () => ({ stackId: resolvedStackId, radius }),
112
+ [resolvedStackId, radius],
113
+ );
109
114
  <BarStackContext value={context}>
110
115
  <BarStackClipPath stackId={resolvedStackId} radius={radius} />
111
116
  {children}
@@ -56,11 +56,11 @@ export interface CartesianAxisProps extends ZIndexable {
56
56
  export interface CartesianAxisRef {
57
57
  getCalculatedWidth(): number;
58
58
  }
59
- export type Props =
60
- Omit<
61
- PresentationAttributesAdaptChildEvent<any, SVGElement>,
62
- 'viewBox' | 'scale' | 'ref'
63
- > & CartesianAxisProps;
59
+ export type Props = Omit<
60
+ PresentationAttributesAdaptChildEvent<any, SVGElement>,
61
+ 'viewBox' | 'scale' | 'ref'
62
+ > &
63
+ CartesianAxisProps;
64
64
  type InternalProps = RequiresDefaultProps<Props, typeof defaultCartesianAxisProps>;
65
65
  type TicksProps = {
66
66
  ref?: Ref<SVGGElement>;
@@ -162,7 +162,10 @@ function AxisLine(axisLineProps: {
162
162
  }
163
163
  let props = { ...otherSvgProps, ...svgPropertiesNoEvents(axisLine), fill: 'none' };
164
164
  if (orientation === 'top' || orientation === 'bottom') {
165
- const needHeight = +(orientation === 'top' && !mirror || orientation === 'bottom' && mirror);
165
+ const needHeight = +(
166
+ (orientation === 'top' && !mirror) ||
167
+ (orientation === 'bottom' && mirror)
168
+ );
166
169
  props = {
167
170
  ...props,
168
171
  x1: x,
@@ -171,7 +174,7 @@ function AxisLine(axisLineProps: {
171
174
  y2: y + needHeight * height,
172
175
  };
173
176
  } else {
174
- const needWidth = +(orientation === 'left' && !mirror || orientation === 'right' && mirror);
177
+ const needWidth = +((orientation === 'left' && !mirror) || (orientation === 'right' && mirror));
175
178
  props = {
176
179
  ...props,
177
180
  x1: x + needWidth * width,
@@ -180,10 +183,9 @@ function AxisLine(axisLineProps: {
180
183
  y2: y + height,
181
184
  };
182
185
  }
183
- return <line
184
- {...props}
185
- className={clsx('recharts-cartesian-axis-line', get(axisLine, 'className'))}
186
- />;
186
+ return (
187
+ <line {...props} className={clsx('recharts-cartesian-axis-line', get(axisLine, 'className'))} />
188
+ );
187
189
  }
188
190
 
189
191
  /**
@@ -264,11 +266,7 @@ function getTickVerticalAnchor(orientation: Orientation, mirror: boolean) {
264
266
  }
265
267
  }
266
268
 
267
- function TickItem(props: {
268
- option: Props['tick'];
269
- tickProps: TextProps;
270
- value: string;
271
- }) {
269
+ function TickItem(props: { option: Props['tick']; tickProps: TextProps; value: string }) {
272
270
  const { option, tickProps, value } = props;
273
271
  let tickItem;
274
272
  const combinedClassName = clsx(tickProps.className, 'recharts-cartesian-axis-tick-value');
@@ -281,7 +279,11 @@ function TickItem(props: {
281
279
  if (typeof option !== 'boolean') {
282
280
  className = clsx(className, getClassNameFromUnknown(option));
283
281
  }
284
- tickItem = <Text {...tickProps} className={className}>{value}</Text>;
282
+ tickItem = (
283
+ <Text {...tickProps} className={className}>
284
+ {value}
285
+ </Text>
286
+ );
285
287
  }
286
288
  return tickItem;
287
289
  }
@@ -298,14 +300,12 @@ function RenderedTicksReporter(props: {
298
300
  return noop;
299
301
  }
300
302
  // Filter out irrelevant internal properties before exposing externally
301
- const tickItems = ticks.map(
302
- (tick) => ({
303
- value: tick.value,
304
- coordinate: tick.coordinate,
305
- offset: tick.offset,
306
- index: tick.index,
307
- }),
308
- );
303
+ const tickItems = ticks.map((tick) => ({
304
+ value: tick.value,
305
+ coordinate: tick.coordinate,
306
+ offset: tick.offset,
307
+ index: tick.index,
308
+ }));
309
309
  dispatch(setRenderedTicks({ ticks: tickItems, axisId, axisType }));
310
310
  return () => {
311
311
  dispatch(removeRenderedTicks({ axisId, axisType }));
@@ -344,10 +344,9 @@ function Ticks(props: TicksProps) {
344
344
  const axisProps = svgPropertiesNoEvents(getTicksConfig);
345
345
  const customTickProps = svgPropertiesNoEventsFromUnknown(tick);
346
346
  // Use user-provided textAnchor if available, otherwise calculate from orientation/mirror
347
- const textAnchor: TextAnchor =
348
- isValidTextAnchor(axisProps.textAnchor)
349
- ? axisProps.textAnchor
350
- : getTickTextAnchor(orientation, mirror);
347
+ const textAnchor: TextAnchor = isValidTextAnchor(axisProps.textAnchor)
348
+ ? axisProps.textAnchor
349
+ : getTickTextAnchor(orientation, mirror);
351
350
  const verticalAnchor: TextVerticalAnchor = getTickVerticalAnchor(orientation, mirror);
352
351
  let tickLinePropsObject: SVGProps<SVGLineElement> = {};
353
352
  if (typeof tickLine === 'object') {
@@ -358,24 +357,25 @@ function Ticks(props: TicksProps) {
358
357
  fill: 'none',
359
358
  ...tickLinePropsObject,
360
359
  };
361
- const tickLineCoords = finalTicks.map(
362
- (entry: CartesianTickItem) => ({
363
- entry,
364
- ...getTickLineCoord(entry, x, y, width, height, orientation, tickSize, mirror, tickMargin),
365
- }),
366
- );
360
+ const tickLineCoords = finalTicks.map((entry: CartesianTickItem) => ({
361
+ entry,
362
+ ...getTickLineCoord(entry, x, y, width, height, orientation, tickSize, mirror, tickMargin),
363
+ }));
367
364
  const tickLines = tickLineCoords.map(({ entry, line: lineCoord }) => {
368
- return <Layer
369
- className="recharts-cartesian-axis-tick"
370
- key={'tick-' + entry.value + '-' + entry.coordinate + '-' + entry.tickCoord}
371
- >
372
- {tickLine &&
373
- <line
374
- {...tickLineProps}
375
- {...lineCoord}
376
- className={clsx('recharts-cartesian-axis-tick-line', get(tickLine, 'className'))}
377
- />}
378
- </Layer>;
365
+ return (
366
+ <Layer
367
+ className="recharts-cartesian-axis-tick"
368
+ key={'tick-' + entry.value + '-' + entry.coordinate + '-' + entry.tickCoord}
369
+ >
370
+ {tickLine && (
371
+ <line
372
+ {...tickLineProps}
373
+ {...lineCoord}
374
+ className={clsx('recharts-cartesian-axis-tick-line', get(tickLine, 'className'))}
375
+ />
376
+ )}
377
+ </Layer>
378
+ );
379
379
  });
380
380
  const tickLabels = tickLineCoords.map(({ entry, tick: tickCoord }, i) => {
381
381
  const tickProps = {
@@ -394,143 +394,146 @@ function Ticks(props: TicksProps) {
394
394
  angle: tickTextProps?.angle ?? axisProps.angle ?? 0,
395
395
  };
396
396
  const finalTickProps: BaseTickContentProps = { ...tickProps, ...customTickProps };
397
- return <Layer
398
- className="recharts-cartesian-axis-tick-label"
399
- key={'tick-label-' + entry.value + '-' + entry.coordinate + '-' + entry.tickCoord}
400
- {...adaptEventsOfChild(events, entry, i)}
401
- >
402
- {tick &&
403
- <TickItem
404
- option={tick}
405
- tickProps={finalTickProps}
406
- value={String(
407
- typeof tickFormatter === 'function' ? tickFormatter(entry.value, i) : entry.value,
408
- ) +
409
- (unit || '')}
410
- />}
411
- </Layer>;
397
+ return (
398
+ <Layer
399
+ className="recharts-cartesian-axis-tick-label"
400
+ key={'tick-label-' + entry.value + '-' + entry.coordinate + '-' + entry.tickCoord}
401
+ {...adaptEventsOfChild(events, entry, i)}
402
+ >
403
+ {tick && (
404
+ <TickItem
405
+ option={tick}
406
+ tickProps={finalTickProps}
407
+ value={
408
+ String(
409
+ typeof tickFormatter === 'function' ? tickFormatter(entry.value, i) : entry.value,
410
+ ) + (unit || '')
411
+ }
412
+ />
413
+ )}
414
+ </Layer>
415
+ );
412
416
  });
413
- return <g className={'recharts-cartesian-axis-ticks recharts-' + axisType + '-ticks'}>
414
- <RenderedTicksReporter ticks={finalTicks} axisId={axisId} axisType={axisType} />
415
- {tickLabels.length > 0 &&
416
- <ZIndexLayer zIndex={DefaultZIndexes.label}>
417
- <g
418
- className={'recharts-cartesian-axis-tick-labels recharts-' + axisType + '-tick-labels'}
419
- ref={ref}
420
- >{tickLabels}</g>
421
- </ZIndexLayer>}
422
- {tickLines.length > 0 &&
423
- <g
424
- className={'recharts-cartesian-axis-tick-lines recharts-' + axisType + '-tick-lines'}
425
- >{tickLines}</g>}
426
- </g>;
417
+ return (
418
+ <g className={'recharts-cartesian-axis-ticks recharts-' + axisType + '-ticks'}>
419
+ <RenderedTicksReporter ticks={finalTicks} axisId={axisId} axisType={axisType} />
420
+ {tickLabels.length > 0 && (
421
+ <ZIndexLayer zIndex={DefaultZIndexes.label}>
422
+ <g
423
+ className={'recharts-cartesian-axis-tick-labels recharts-' + axisType + '-tick-labels'}
424
+ ref={ref}
425
+ >
426
+ {tickLabels}
427
+ </g>
428
+ </ZIndexLayer>
429
+ )}
430
+ {tickLines.length > 0 && (
431
+ <g className={'recharts-cartesian-axis-tick-lines recharts-' + axisType + '-tick-lines'}>
432
+ {tickLines}
433
+ </g>
434
+ )}
435
+ </g>
436
+ );
427
437
  }
428
438
 
429
439
  function CartesianAxisComponent(props: InternalProps) {
430
440
  // This ref receives the imperative axis handle, never an SVG line or tick.
431
441
  const { ref, ...propsWithoutRef } = props;
432
- const {
433
- axisLine,
434
- width,
435
- height,
436
- className,
437
- hide,
438
- ticks,
439
- axisType,
440
- axisId,
441
- ...rest
442
- } = propsWithoutRef;
442
+ const { axisLine, width, height, className, hide, ticks, axisType, axisId, ...rest } =
443
+ propsWithoutRef;
443
444
  const [fontSize, setFontSize] = useState('');
444
445
  const [letterSpacing, setLetterSpacing] = useState('');
445
446
  const tickRefs = useRef<HTMLCollectionOf<Element> | null>(null);
446
- useImperativeHandle(
447
- ref,
448
- () => ({
449
- getCalculatedWidth: () => {
450
- return getCalculatedYAxisWidth({
451
- ticks: tickRefs.current,
452
- label: props.labelRef?.current,
453
- labelGapWithTick: 5,
454
- tickSize: props.tickSize,
455
- tickMargin: props.tickMargin,
456
- });
457
- },
458
- }),
459
- );
460
- const layerRef = useCallback((el: SVGElement | null) => {
461
- if (el) {
462
- const tickNodes = el.getElementsByClassName('recharts-cartesian-axis-tick-value');
463
- tickRefs.current = tickNodes;
464
- const tick: Element | undefined = tickNodes[0];
465
- if (tick) {
466
- const computedStyle = window.getComputedStyle(tick);
467
- const calculatedFontSize = computedStyle.fontSize;
468
- const calculatedLetterSpacing = computedStyle.letterSpacing;
469
- if (calculatedFontSize !== fontSize || calculatedLetterSpacing !== letterSpacing) {
470
- setFontSize(calculatedFontSize);
471
- setLetterSpacing(calculatedLetterSpacing);
447
+ useImperativeHandle(ref, () => ({
448
+ getCalculatedWidth: () => {
449
+ return getCalculatedYAxisWidth({
450
+ ticks: tickRefs.current,
451
+ label: props.labelRef?.current,
452
+ labelGapWithTick: 5,
453
+ tickSize: props.tickSize,
454
+ tickMargin: props.tickMargin,
455
+ });
456
+ },
457
+ }));
458
+ const layerRef = useCallback(
459
+ (el: SVGElement | null) => {
460
+ if (el) {
461
+ const tickNodes = el.getElementsByClassName('recharts-cartesian-axis-tick-value');
462
+ tickRefs.current = tickNodes;
463
+ const tick: Element | undefined = tickNodes[0];
464
+ if (tick) {
465
+ const computedStyle = window.getComputedStyle(tick);
466
+ const calculatedFontSize = computedStyle.fontSize;
467
+ const calculatedLetterSpacing = computedStyle.letterSpacing;
468
+ if (calculatedFontSize !== fontSize || calculatedLetterSpacing !== letterSpacing) {
469
+ setFontSize(calculatedFontSize);
470
+ setLetterSpacing(calculatedLetterSpacing);
471
+ }
472
472
  }
473
473
  }
474
- }
475
- }, [fontSize, letterSpacing]);
474
+ },
475
+ [fontSize, letterSpacing],
476
+ );
476
477
  if (hide) {
477
478
  return null;
478
479
  }
479
480
  // CartesianAxis allows width or height to be undefined (unlike
480
481
  // validateWidthHeight).
481
- if (width != null && width <= 0 || height != null && height <= 0) {
482
+ if ((width != null && width <= 0) || (height != null && height <= 0)) {
482
483
  return null;
483
484
  }
484
- return <ZIndexLayer zIndex={props.zIndex}>
485
- <Layer className={clsx('recharts-cartesian-axis', className)}>
486
- <AxisLine
487
- x={props.x}
488
- y={props.y}
489
- width={width}
490
- height={height}
491
- orientation={props.orientation}
492
- mirror={props.mirror}
493
- axisLine={axisLine}
494
- otherSvgProps={svgPropertiesNoEvents(propsWithoutRef)}
495
- />
496
- <Ticks
497
- ref={layerRef}
498
- axisType={axisType}
499
- events={rest}
500
- fontSize={fontSize}
501
- getTicksConfig={propsWithoutRef}
502
- height={props.height}
503
- letterSpacing={letterSpacing}
504
- mirror={props.mirror}
505
- orientation={props.orientation}
506
- padding={props.padding}
507
- stroke={props.stroke}
508
- tick={props.tick}
509
- tickFormatter={props.tickFormatter}
510
- tickLine={props.tickLine}
511
- tickMargin={props.tickMargin}
512
- tickSize={props.tickSize}
513
- tickTextProps={props.tickTextProps}
514
- ticks={ticks}
515
- unit={props.unit}
516
- width={props.width}
517
- x={props.x}
518
- y={props.y}
519
- axisId={axisId}
520
- />
521
- <CartesianLabelContextProvider
522
- x={props.x}
523
- y={props.y}
524
- width={props.width}
525
- height={props.height}
526
- lowerWidth={props.width}
527
- upperWidth={props.width}
528
- >
529
- <CartesianLabelFromLabelProp label={props.label} labelRef={props.labelRef} />
530
- {props.children}
531
- </CartesianLabelContextProvider>
532
- </Layer>
533
- </ZIndexLayer>;
485
+ return (
486
+ <ZIndexLayer zIndex={props.zIndex}>
487
+ <Layer className={clsx('recharts-cartesian-axis', className)}>
488
+ <AxisLine
489
+ x={props.x}
490
+ y={props.y}
491
+ width={width}
492
+ height={height}
493
+ orientation={props.orientation}
494
+ mirror={props.mirror}
495
+ axisLine={axisLine}
496
+ otherSvgProps={svgPropertiesNoEvents(propsWithoutRef)}
497
+ />
498
+ <Ticks
499
+ ref={layerRef}
500
+ axisType={axisType}
501
+ events={rest}
502
+ fontSize={fontSize}
503
+ getTicksConfig={propsWithoutRef}
504
+ height={props.height}
505
+ letterSpacing={letterSpacing}
506
+ mirror={props.mirror}
507
+ orientation={props.orientation}
508
+ padding={props.padding}
509
+ stroke={props.stroke}
510
+ tick={props.tick}
511
+ tickFormatter={props.tickFormatter}
512
+ tickLine={props.tickLine}
513
+ tickMargin={props.tickMargin}
514
+ tickSize={props.tickSize}
515
+ tickTextProps={props.tickTextProps}
516
+ ticks={ticks}
517
+ unit={props.unit}
518
+ width={props.width}
519
+ x={props.x}
520
+ y={props.y}
521
+ axisId={axisId}
522
+ />
523
+ <CartesianLabelContextProvider
524
+ x={props.x}
525
+ y={props.y}
526
+ width={props.width}
527
+ height={props.height}
528
+ lowerWidth={props.width}
529
+ upperWidth={props.width}
530
+ >
531
+ <CartesianLabelFromLabelProp label={props.label} labelRef={props.labelRef} />
532
+ {props.children}
533
+ </CartesianLabelContextProvider>
534
+ </Layer>
535
+ </ZIndexLayer>
536
+ );
534
537
  }
535
538
 
536
539
  /**