@mui/x-charts 8.13.1 → 8.14.1

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 (134) hide show
  1. package/BarChart/BarChart.js +44 -36
  2. package/BarChart/useBarPlotData.js +20 -33
  3. package/CHANGELOG.md +204 -1
  4. package/ChartContainer/ChartContainer.js +68 -56
  5. package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  6. package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  7. package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  8. package/Gauge/Gauge.js +2 -9
  9. package/Gauge/GaugeReferenceArc.d.ts +4 -1
  10. package/Gauge/GaugeReferenceArc.js +12 -3
  11. package/Gauge/GaugeValueArc.d.ts +4 -1
  12. package/Gauge/GaugeValueArc.js +16 -8
  13. package/Gauge/GaugeValueText.js +3 -1
  14. package/LineChart/LineChart.js +44 -36
  15. package/PieChart/PieArc.d.ts +18 -4
  16. package/PieChart/PieArc.js +11 -5
  17. package/PieChart/PieArcPlot.js +3 -1
  18. package/ScatterChart/ScatterChart.js +44 -36
  19. package/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
  20. package/SparkLineChart/SparkLineChart.js +44 -36
  21. package/esm/BarChart/BarChart.js +44 -36
  22. package/esm/BarChart/useBarPlotData.js +20 -33
  23. package/esm/ChartContainer/ChartContainer.js +68 -56
  24. package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
  25. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
  26. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
  27. package/esm/Gauge/Gauge.js +2 -9
  28. package/esm/Gauge/GaugeReferenceArc.d.ts +4 -1
  29. package/esm/Gauge/GaugeReferenceArc.js +11 -2
  30. package/esm/Gauge/GaugeValueArc.d.ts +4 -1
  31. package/esm/Gauge/GaugeValueArc.js +16 -8
  32. package/esm/Gauge/GaugeValueText.js +3 -1
  33. package/esm/LineChart/LineChart.js +44 -36
  34. package/esm/PieChart/PieArc.d.ts +18 -4
  35. package/esm/PieChart/PieArc.js +11 -5
  36. package/esm/PieChart/PieArcPlot.js +3 -1
  37. package/esm/ScatterChart/ScatterChart.js +44 -36
  38. package/esm/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
  39. package/esm/SparkLineChart/SparkLineChart.js +44 -36
  40. package/esm/hooks/animation/useAnimate.js +5 -3
  41. package/esm/hooks/useScale.d.ts +5 -1
  42. package/esm/index.js +1 -1
  43. package/esm/internals/Flatbush.bench.d.ts +1 -0
  44. package/esm/internals/Flatbush.bench.js +42 -0
  45. package/esm/internals/Flatbush.d.ts +63 -0
  46. package/esm/internals/Flatbush.js +468 -0
  47. package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
  48. package/esm/internals/animation/useAnimateInternal.js +1 -1
  49. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
  50. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  51. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  52. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  53. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  54. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
  55. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  56. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
  57. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  58. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
  59. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
  60. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
  61. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  62. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
  63. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
  64. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +199 -47
  65. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
  66. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
  67. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +33 -0
  68. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +40 -81
  69. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  70. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  71. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  72. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  73. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  74. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  75. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
  76. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  77. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
  78. package/esm/internals/scaleGuards.d.ts +12 -6
  79. package/esm/internals/symlogScale.js +5 -0
  80. package/esm/locales/enUS.js +4 -4
  81. package/esm/locales/ptBR.js +97 -99
  82. package/esm/models/axis.d.ts +39 -17
  83. package/esm/models/axis.js +3 -0
  84. package/esm/models/seriesType/scatter.d.ts +2 -0
  85. package/esm/themeAugmentation/components.d.ts +3 -0
  86. package/esm/themeAugmentation/overrides.d.ts +2 -0
  87. package/hooks/animation/useAnimate.js +4 -3
  88. package/hooks/useScale.d.ts +5 -1
  89. package/index.js +1 -1
  90. package/internals/Flatbush.bench.d.ts +1 -0
  91. package/internals/Flatbush.bench.js +44 -0
  92. package/internals/Flatbush.d.ts +63 -0
  93. package/internals/Flatbush.js +477 -0
  94. package/internals/animation/useAnimateInternal.d.ts +1 -1
  95. package/internals/animation/useAnimateInternal.js +1 -1
  96. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
  97. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
  98. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
  99. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
  100. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
  101. package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
  102. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
  103. package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
  104. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
  105. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
  106. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +6 -2
  107. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -6
  108. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
  109. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
  110. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +185 -6
  111. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +200 -47
  112. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +4 -1
  113. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.d.ts +5 -0
  114. package/internals/plugins/featurePlugins/useChartClosestPoint/findClosestPoints.js +39 -0
  115. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +39 -80
  116. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
  117. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
  118. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
  119. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
  120. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
  121. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
  122. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
  123. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
  124. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
  125. package/internals/scaleGuards.d.ts +12 -6
  126. package/internals/symlogScale.js +5 -0
  127. package/locales/enUS.js +4 -4
  128. package/locales/ptBR.js +97 -99
  129. package/models/axis.d.ts +39 -17
  130. package/models/axis.js +4 -0
  131. package/models/seriesType/scatter.d.ts +2 -0
  132. package/package.json +7 -6
  133. package/themeAugmentation/components.d.ts +3 -0
  134. package/themeAugmentation/overrides.d.ts +2 -0
@@ -18,10 +18,7 @@ const useUtilityClasses = props => {
18
18
  classes
19
19
  } = props;
20
20
  const slots = {
21
- root: ['root'],
22
- valueArc: ['valueArc'],
23
- referenceArc: ['referenceArc'],
24
- valueText: ['valueText']
21
+ root: ['root']
25
22
  };
26
23
  return composeClasses(slots, getGaugeUtilityClass, classes);
27
24
  };
@@ -37,13 +34,9 @@ const Gauge = /*#__PURE__*/React.forwardRef(function Gauge(props, ref) {
37
34
  return /*#__PURE__*/_jsxs(GaugeContainer, _extends({}, other, {
38
35
  className: clsx(classes.root, className),
39
36
  ref: ref,
40
- children: [/*#__PURE__*/_jsx(GaugeReferenceArc, {
41
- className: classes.referenceArc
42
- }), /*#__PURE__*/_jsx(GaugeValueArc, {
43
- className: classes.valueArc,
37
+ children: [/*#__PURE__*/_jsx(GaugeReferenceArc, {}), /*#__PURE__*/_jsx(GaugeValueArc, {
44
38
  skipAnimation: skipAnimation
45
39
  }), /*#__PURE__*/_jsx(GaugeValueText, {
46
- className: classes.valueText,
47
40
  text: text
48
41
  }), children]
49
42
  }));
@@ -1,2 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare function GaugeReferenceArc(props: React.ComponentProps<'path'>): React.JSX.Element;
2
+ export declare function GaugeReferenceArc({
3
+ className,
4
+ ...other
5
+ }: React.ComponentProps<'path'>): React.JSX.Element;
@@ -1,10 +1,14 @@
1
1
  'use client';
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
+ const _excluded = ["className"];
4
6
  import * as React from 'react';
5
7
  import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
6
8
  import { styled } from '@mui/material/styles';
9
+ import clsx from 'clsx';
7
10
  import { useGaugeState } from "./GaugeProvider.js";
11
+ import { gaugeClasses } from "./gaugeClasses.js";
8
12
  import { jsx as _jsx } from "react/jsx-runtime";
9
13
  const StyledPath = styled('path', {
10
14
  name: 'MuiGauge',
@@ -14,7 +18,11 @@ const StyledPath = styled('path', {
14
18
  }) => ({
15
19
  fill: (theme.vars || theme).palette.divider
16
20
  }));
17
- export function GaugeReferenceArc(props) {
21
+ export function GaugeReferenceArc(_ref) {
22
+ let {
23
+ className
24
+ } = _ref,
25
+ other = _objectWithoutPropertiesLoose(_ref, _excluded);
18
26
  const {
19
27
  startAngle,
20
28
  endAngle,
@@ -25,6 +33,7 @@ export function GaugeReferenceArc(props) {
25
33
  cy
26
34
  } = useGaugeState();
27
35
  return /*#__PURE__*/_jsx(StyledPath, _extends({
36
+ className: clsx(gaugeClasses.referenceArc, className),
28
37
  transform: `translate(${cx}, ${cy})`,
29
38
  d: d3Arc().cornerRadius(cornerRadius)({
30
39
  startAngle,
@@ -32,5 +41,5 @@ export function GaugeReferenceArc(props) {
32
41
  innerRadius,
33
42
  outerRadius
34
43
  })
35
- }, props));
44
+ }, other));
36
45
  }
@@ -1,5 +1,8 @@
1
1
  import * as React from 'react';
2
- declare function GaugeValueArc(props: React.ComponentProps<'path'> & {
2
+ declare function GaugeValueArc({
3
+ className,
4
+ ...other
5
+ }: React.ComponentProps<'path'> & {
3
6
  skipAnimation?: boolean;
4
7
  }): React.JSX.Element | null;
5
8
  declare namespace GaugeValueArc {
@@ -1,24 +1,31 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["cx", "cy", "startAngle", "endAngle", "cornerRadius", "innerRadius", "outerRadius", "skipAnimation"];
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
+ const _excluded = ["className"],
6
+ _excluded2 = ["cx", "cy", "startAngle", "endAngle", "cornerRadius", "innerRadius", "outerRadius", "skipAnimation"];
6
7
  import * as React from 'react';
7
8
  import PropTypes from 'prop-types';
8
9
  import { styled } from '@mui/material/styles';
10
+ import clsx from 'clsx';
9
11
  import { useSkipAnimation } from "../hooks/useSkipAnimation.js";
10
12
  import { useAnimateGaugeValueArc } from "../hooks/animation/useAnimateGaugeValueArc.js";
11
13
  import { useGaugeState } from "./GaugeProvider.js";
14
+ import { gaugeClasses } from "./gaugeClasses.js";
12
15
  import { jsx as _jsx } from "react/jsx-runtime";
13
16
  const StyledPath = styled('path', {
14
17
  name: 'MuiGauge',
15
- slot: 'ReferenceArc'
18
+ slot: 'ValueArc'
16
19
  })(({
17
20
  theme
18
21
  }) => ({
19
22
  fill: (theme.vars || theme).palette.primary.main
20
23
  }));
21
- function GaugeValueArc(props) {
24
+ function GaugeValueArc(_ref) {
25
+ let {
26
+ className
27
+ } = _ref,
28
+ other = _objectWithoutPropertiesLoose(_ref, _excluded);
22
29
  const {
23
30
  value,
24
31
  valueMin,
@@ -35,7 +42,8 @@ function GaugeValueArc(props) {
35
42
  return null;
36
43
  }
37
44
  const valueAngle = startAngle + (value - valueMin) / (valueMax - valueMin) * (endAngle - startAngle);
38
- return /*#__PURE__*/_jsx(AnimatedGaugeValueArc, _extends({}, props, {
45
+ return /*#__PURE__*/_jsx(AnimatedGaugeValueArc, _extends({}, other, {
46
+ className: clsx(gaugeClasses.valueArc, className),
39
47
  cx: cx,
40
48
  cy: cy,
41
49
  startAngle: startAngle,
@@ -53,7 +61,7 @@ process.env.NODE_ENV !== "production" ? GaugeValueArc.propTypes = {
53
61
  skipAnimation: PropTypes.bool
54
62
  } : void 0;
55
63
  export { GaugeValueArc };
56
- function AnimatedGaugeValueArc(_ref) {
64
+ function AnimatedGaugeValueArc(_ref2) {
57
65
  let {
58
66
  cx,
59
67
  cy,
@@ -63,8 +71,8 @@ function AnimatedGaugeValueArc(_ref) {
63
71
  innerRadius,
64
72
  outerRadius,
65
73
  skipAnimation: inSkipAnimation
66
- } = _ref,
67
- other = _objectWithoutPropertiesLoose(_ref, _excluded);
74
+ } = _ref2,
75
+ other = _objectWithoutPropertiesLoose(_ref2, _excluded2);
68
76
  const skipAnimation = useSkipAnimation(inSkipAnimation);
69
77
  const animatedProps = useAnimateGaugeValueArc({
70
78
  startAngle,
@@ -5,8 +5,10 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
5
5
  const _excluded = ["text", "className"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
+ import clsx from 'clsx';
8
9
  import { useGaugeState } from "./GaugeProvider.js";
9
10
  import { ChartsText } from "../ChartsText/index.js";
11
+ import { gaugeClasses } from "./gaugeClasses.js";
10
12
  import { jsx as _jsx } from "react/jsx-runtime";
11
13
  function defaultFormatter({
12
14
  value
@@ -35,7 +37,7 @@ function GaugeValueText(props) {
35
37
  return null;
36
38
  }
37
39
  return /*#__PURE__*/_jsx("g", {
38
- className: className,
40
+ className: clsx(gaugeClasses.valueText, className),
39
41
  children: /*#__PURE__*/_jsx(ChartsText, _extends({
40
42
  x: cx,
41
43
  y: cy,
@@ -282,8 +282,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
282
282
  ignoreTooltip: PropTypes.bool,
283
283
  label: PropTypes.string,
284
284
  labelStyle: PropTypes.object,
285
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
286
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
287
285
  offset: PropTypes.number,
288
286
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
289
287
  reverse: PropTypes.bool,
@@ -336,8 +334,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
336
334
  ignoreTooltip: PropTypes.bool,
337
335
  label: PropTypes.string,
338
336
  labelStyle: PropTypes.object,
339
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
340
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
341
337
  offset: PropTypes.number,
342
338
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
343
339
  reverse: PropTypes.bool,
@@ -380,8 +376,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
380
376
  ignoreTooltip: PropTypes.bool,
381
377
  label: PropTypes.string,
382
378
  labelStyle: PropTypes.object,
383
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
384
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
379
+ max: PropTypes.number,
380
+ min: PropTypes.number,
385
381
  offset: PropTypes.number,
386
382
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
387
383
  reverse: PropTypes.bool,
@@ -425,8 +421,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
425
421
  ignoreTooltip: PropTypes.bool,
426
422
  label: PropTypes.string,
427
423
  labelStyle: PropTypes.object,
428
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
429
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
424
+ max: PropTypes.number,
425
+ min: PropTypes.number,
430
426
  offset: PropTypes.number,
431
427
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
432
428
  reverse: PropTypes.bool,
@@ -469,8 +465,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
469
465
  ignoreTooltip: PropTypes.bool,
470
466
  label: PropTypes.string,
471
467
  labelStyle: PropTypes.object,
472
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
473
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
468
+ max: PropTypes.number,
469
+ min: PropTypes.number,
474
470
  offset: PropTypes.number,
475
471
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
476
472
  reverse: PropTypes.bool,
@@ -513,8 +509,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
513
509
  ignoreTooltip: PropTypes.bool,
514
510
  label: PropTypes.string,
515
511
  labelStyle: PropTypes.object,
516
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
517
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
512
+ max: PropTypes.number,
513
+ min: PropTypes.number,
518
514
  offset: PropTypes.number,
519
515
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
520
516
  reverse: PropTypes.bool,
@@ -557,8 +553,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
557
553
  ignoreTooltip: PropTypes.bool,
558
554
  label: PropTypes.string,
559
555
  labelStyle: PropTypes.object,
560
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
561
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
556
+ max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
557
+ valueOf: PropTypes.func.isRequired
558
+ })]),
559
+ min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
560
+ valueOf: PropTypes.func.isRequired
561
+ })]),
562
562
  offset: PropTypes.number,
563
563
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
564
564
  reverse: PropTypes.bool,
@@ -601,8 +601,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
601
601
  ignoreTooltip: PropTypes.bool,
602
602
  label: PropTypes.string,
603
603
  labelStyle: PropTypes.object,
604
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
605
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
604
+ max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
605
+ valueOf: PropTypes.func.isRequired
606
+ })]),
607
+ min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
608
+ valueOf: PropTypes.func.isRequired
609
+ })]),
606
610
  offset: PropTypes.number,
607
611
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
608
612
  reverse: PropTypes.bool,
@@ -645,8 +649,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
645
649
  ignoreTooltip: PropTypes.bool,
646
650
  label: PropTypes.string,
647
651
  labelStyle: PropTypes.object,
648
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
649
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
652
+ max: PropTypes.number,
653
+ min: PropTypes.number,
650
654
  offset: PropTypes.number,
651
655
  position: PropTypes.oneOf(['bottom', 'none', 'top']),
652
656
  reverse: PropTypes.bool,
@@ -706,8 +710,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
706
710
  ignoreTooltip: PropTypes.bool,
707
711
  label: PropTypes.string,
708
712
  labelStyle: PropTypes.object,
709
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
710
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
711
713
  offset: PropTypes.number,
712
714
  position: PropTypes.oneOf(['left', 'none', 'right']),
713
715
  reverse: PropTypes.bool,
@@ -759,8 +761,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
759
761
  ignoreTooltip: PropTypes.bool,
760
762
  label: PropTypes.string,
761
763
  labelStyle: PropTypes.object,
762
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
763
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
764
764
  offset: PropTypes.number,
765
765
  position: PropTypes.oneOf(['left', 'none', 'right']),
766
766
  reverse: PropTypes.bool,
@@ -802,8 +802,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
802
802
  ignoreTooltip: PropTypes.bool,
803
803
  label: PropTypes.string,
804
804
  labelStyle: PropTypes.object,
805
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
806
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
805
+ max: PropTypes.number,
806
+ min: PropTypes.number,
807
807
  offset: PropTypes.number,
808
808
  position: PropTypes.oneOf(['left', 'none', 'right']),
809
809
  reverse: PropTypes.bool,
@@ -846,8 +846,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
846
846
  ignoreTooltip: PropTypes.bool,
847
847
  label: PropTypes.string,
848
848
  labelStyle: PropTypes.object,
849
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
850
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
849
+ max: PropTypes.number,
850
+ min: PropTypes.number,
851
851
  offset: PropTypes.number,
852
852
  position: PropTypes.oneOf(['left', 'none', 'right']),
853
853
  reverse: PropTypes.bool,
@@ -889,8 +889,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
889
889
  ignoreTooltip: PropTypes.bool,
890
890
  label: PropTypes.string,
891
891
  labelStyle: PropTypes.object,
892
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
893
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
892
+ max: PropTypes.number,
893
+ min: PropTypes.number,
894
894
  offset: PropTypes.number,
895
895
  position: PropTypes.oneOf(['left', 'none', 'right']),
896
896
  reverse: PropTypes.bool,
@@ -932,8 +932,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
932
932
  ignoreTooltip: PropTypes.bool,
933
933
  label: PropTypes.string,
934
934
  labelStyle: PropTypes.object,
935
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
936
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
935
+ max: PropTypes.number,
936
+ min: PropTypes.number,
937
937
  offset: PropTypes.number,
938
938
  position: PropTypes.oneOf(['left', 'none', 'right']),
939
939
  reverse: PropTypes.bool,
@@ -975,8 +975,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
975
975
  ignoreTooltip: PropTypes.bool,
976
976
  label: PropTypes.string,
977
977
  labelStyle: PropTypes.object,
978
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
979
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
978
+ max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
979
+ valueOf: PropTypes.func.isRequired
980
+ })]),
981
+ min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
982
+ valueOf: PropTypes.func.isRequired
983
+ })]),
980
984
  offset: PropTypes.number,
981
985
  position: PropTypes.oneOf(['left', 'none', 'right']),
982
986
  reverse: PropTypes.bool,
@@ -1018,8 +1022,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
1018
1022
  ignoreTooltip: PropTypes.bool,
1019
1023
  label: PropTypes.string,
1020
1024
  labelStyle: PropTypes.object,
1021
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
1022
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
1025
+ max: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
1026
+ valueOf: PropTypes.func.isRequired
1027
+ })]),
1028
+ min: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
1029
+ valueOf: PropTypes.func.isRequired
1030
+ })]),
1023
1031
  offset: PropTypes.number,
1024
1032
  position: PropTypes.oneOf(['left', 'none', 'right']),
1025
1033
  reverse: PropTypes.bool,
@@ -1061,8 +1069,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
1061
1069
  ignoreTooltip: PropTypes.bool,
1062
1070
  label: PropTypes.string,
1063
1071
  labelStyle: PropTypes.object,
1064
- max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
1065
- min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
1072
+ max: PropTypes.number,
1073
+ min: PropTypes.number,
1066
1074
  offset: PropTypes.number,
1067
1075
  position: PropTypes.oneOf(['left', 'none', 'right']),
1068
1076
  reverse: PropTypes.bool,
@@ -36,8 +36,15 @@ export type PieArcProps = Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & P
36
36
  outerRadius: number;
37
37
  paddingAngle: number;
38
38
  startAngle: number;
39
- /** @default false */
40
- skipAnimation: boolean;
39
+ /**
40
+ * If `true`, the animation is disabled.
41
+ */
42
+ skipAnimation?: boolean;
43
+ /**
44
+ * If `true`, the default event handlers are disabled.
45
+ * Those are used, for example, to display a tooltip or highlight the arc on hover.
46
+ */
47
+ skipInteraction?: boolean;
41
48
  };
42
49
  declare const PieArc: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGPathElement>, "ref" | "id"> & PieArcOwnerState & {
43
50
  cornerRadius: number;
@@ -47,7 +54,14 @@ declare const PieArc: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGPat
47
54
  outerRadius: number;
48
55
  paddingAngle: number;
49
56
  startAngle: number;
50
- /** @default false */
51
- skipAnimation: boolean;
57
+ /**
58
+ * If `true`, the animation is disabled.
59
+ */
60
+ skipAnimation?: boolean;
61
+ /**
62
+ * If `true`, the default event handlers are disabled.
63
+ * Those are used, for example, to display a tooltip or highlight the arc on hover.
64
+ */
65
+ skipInteraction?: boolean;
52
66
  } & React.RefAttributes<SVGPathElement>>;
53
67
  export { PieArc };
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["className", "classes", "color", "dataIndex", "id", "isFaded", "isHighlighted", "isFocused", "onClick", "cornerRadius", "startAngle", "endAngle", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "stroke"];
5
+ const _excluded = ["className", "classes", "color", "dataIndex", "id", "isFaded", "isHighlighted", "isFocused", "onClick", "cornerRadius", "startAngle", "endAngle", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "stroke", "skipInteraction"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -58,7 +58,8 @@ const PieArc = /*#__PURE__*/React.forwardRef(function PieArc(props, ref) {
58
58
  outerRadius,
59
59
  paddingAngle,
60
60
  skipAnimation,
61
- stroke: strokeProp
61
+ stroke: strokeProp,
62
+ skipInteraction
62
63
  } = props,
63
64
  other = _objectWithoutPropertiesLoose(props, _excluded);
64
65
  const theme = useTheme();
@@ -77,7 +78,7 @@ const PieArc = /*#__PURE__*/React.forwardRef(function PieArc(props, ref) {
77
78
  type: 'pie',
78
79
  seriesId: id,
79
80
  dataIndex
80
- });
81
+ }, skipInteraction);
81
82
  const animatedProps = useAnimatePieArc({
82
83
  cornerRadius,
83
84
  startAngle,
@@ -121,9 +122,14 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
121
122
  outerRadius: PropTypes.number.isRequired,
122
123
  paddingAngle: PropTypes.number.isRequired,
123
124
  /**
124
- * @default false
125
+ * If `true`, the animation is disabled.
126
+ */
127
+ skipAnimation: PropTypes.bool,
128
+ /**
129
+ * If `true`, the default event handlers are disabled.
130
+ * Those are used, for example, to display a tooltip or highlight the arc on hover.
125
131
  */
126
- skipAnimation: PropTypes.bool.isRequired,
132
+ skipInteraction: PropTypes.bool,
127
133
  startAngle: PropTypes.number.isRequired
128
134
  } : void 0;
129
135
  export { PieArc };
@@ -74,7 +74,9 @@ function PieArcPlot(props) {
74
74
  endAngle: focusedItem.endAngle,
75
75
  paddingAngle: focusedItem.paddingAngle,
76
76
  innerRadius: focusedItem.innerRadius,
77
- color: focusedItem.color,
77
+ color: "transparent",
78
+ pointerEvents: "none",
79
+ skipInteraction: true,
78
80
  outerRadius: focusedItem.outerRadius,
79
81
  cornerRadius: focusedItem.cornerRadius,
80
82
  skipAnimation: true,