@mui/x-charts 8.13.1 → 8.14.0
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.
- package/BarChart/BarChart.js +44 -36
- package/CHANGELOG.md +109 -1
- package/ChartContainer/ChartContainer.js +68 -56
- package/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/LineChart/LineChart.js +44 -36
- package/PieChart/PieArc.d.ts +18 -4
- package/PieChart/PieArc.js +11 -5
- package/PieChart/PieArcPlot.js +3 -1
- package/ScatterChart/ScatterChart.js +44 -36
- package/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/BarChart/BarChart.js +44 -36
- package/esm/ChartContainer/ChartContainer.js +68 -56
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +2 -0
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +197 -355
- package/esm/LineChart/LineChart.js +44 -36
- package/esm/PieChart/PieArc.d.ts +18 -4
- package/esm/PieChart/PieArc.js +11 -5
- package/esm/PieChart/PieArcPlot.js +3 -1
- package/esm/ScatterChart/ScatterChart.js +44 -36
- package/esm/SparkLineChart/SparkLineChart.js +44 -36
- package/esm/hooks/animation/useAnimate.js +5 -3
- package/esm/hooks/useScale.d.ts +5 -1
- package/esm/index.js +1 -1
- package/esm/internals/animation/useAnimateInternal.d.ts +1 -1
- package/esm/internals/animation/useAnimateInternal.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +8 -8
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +77 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +7 -104
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +31 -39
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +10 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
- package/esm/internals/scaleGuards.d.ts +12 -6
- package/esm/internals/symlogScale.js +5 -0
- package/esm/locales/enUS.js +4 -4
- package/esm/locales/ptBR.js +97 -99
- package/esm/models/axis.d.ts +39 -17
- package/esm/models/axis.js +3 -0
- package/hooks/animation/useAnimate.js +4 -3
- package/hooks/useScale.d.ts +5 -1
- package/index.js +1 -1
- package/internals/animation/useAnimateInternal.d.ts +1 -1
- package/internals/animation/useAnimateInternal.js +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +7 -7
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.types.d.ts +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +9 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +4 -28
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +4 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +3 -25
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +20 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +84 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.d.ts +4 -65
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisScale.js +8 -108
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +29 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +166 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +158 -47
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +10 -3
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.types.d.ts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +5 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +9 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +11 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +1 -1
- package/internals/scaleGuards.d.ts +12 -6
- package/internals/symlogScale.js +5 -0
- package/locales/enUS.js +4 -4
- package/locales/ptBR.js +97 -99
- package/models/axis.d.ts +39 -17
- package/models/axis.js +4 -0
- package/package.json +6 -6
package/LineChart/LineChart.js
CHANGED
|
@@ -289,8 +289,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
289
289
|
ignoreTooltip: _propTypes.default.bool,
|
|
290
290
|
label: _propTypes.default.string,
|
|
291
291
|
labelStyle: _propTypes.default.object,
|
|
292
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
293
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
294
292
|
offset: _propTypes.default.number,
|
|
295
293
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
296
294
|
reverse: _propTypes.default.bool,
|
|
@@ -343,8 +341,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
343
341
|
ignoreTooltip: _propTypes.default.bool,
|
|
344
342
|
label: _propTypes.default.string,
|
|
345
343
|
labelStyle: _propTypes.default.object,
|
|
346
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
347
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
348
344
|
offset: _propTypes.default.number,
|
|
349
345
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
350
346
|
reverse: _propTypes.default.bool,
|
|
@@ -387,8 +383,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
387
383
|
ignoreTooltip: _propTypes.default.bool,
|
|
388
384
|
label: _propTypes.default.string,
|
|
389
385
|
labelStyle: _propTypes.default.object,
|
|
390
|
-
max: _propTypes.default.
|
|
391
|
-
min: _propTypes.default.
|
|
386
|
+
max: _propTypes.default.number,
|
|
387
|
+
min: _propTypes.default.number,
|
|
392
388
|
offset: _propTypes.default.number,
|
|
393
389
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
394
390
|
reverse: _propTypes.default.bool,
|
|
@@ -432,8 +428,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
432
428
|
ignoreTooltip: _propTypes.default.bool,
|
|
433
429
|
label: _propTypes.default.string,
|
|
434
430
|
labelStyle: _propTypes.default.object,
|
|
435
|
-
max: _propTypes.default.
|
|
436
|
-
min: _propTypes.default.
|
|
431
|
+
max: _propTypes.default.number,
|
|
432
|
+
min: _propTypes.default.number,
|
|
437
433
|
offset: _propTypes.default.number,
|
|
438
434
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
439
435
|
reverse: _propTypes.default.bool,
|
|
@@ -476,8 +472,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
476
472
|
ignoreTooltip: _propTypes.default.bool,
|
|
477
473
|
label: _propTypes.default.string,
|
|
478
474
|
labelStyle: _propTypes.default.object,
|
|
479
|
-
max: _propTypes.default.
|
|
480
|
-
min: _propTypes.default.
|
|
475
|
+
max: _propTypes.default.number,
|
|
476
|
+
min: _propTypes.default.number,
|
|
481
477
|
offset: _propTypes.default.number,
|
|
482
478
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
483
479
|
reverse: _propTypes.default.bool,
|
|
@@ -520,8 +516,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
520
516
|
ignoreTooltip: _propTypes.default.bool,
|
|
521
517
|
label: _propTypes.default.string,
|
|
522
518
|
labelStyle: _propTypes.default.object,
|
|
523
|
-
max: _propTypes.default.
|
|
524
|
-
min: _propTypes.default.
|
|
519
|
+
max: _propTypes.default.number,
|
|
520
|
+
min: _propTypes.default.number,
|
|
525
521
|
offset: _propTypes.default.number,
|
|
526
522
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
527
523
|
reverse: _propTypes.default.bool,
|
|
@@ -564,8 +560,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
564
560
|
ignoreTooltip: _propTypes.default.bool,
|
|
565
561
|
label: _propTypes.default.string,
|
|
566
562
|
labelStyle: _propTypes.default.object,
|
|
567
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
568
|
-
|
|
563
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
564
|
+
valueOf: _propTypes.default.func.isRequired
|
|
565
|
+
})]),
|
|
566
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
567
|
+
valueOf: _propTypes.default.func.isRequired
|
|
568
|
+
})]),
|
|
569
569
|
offset: _propTypes.default.number,
|
|
570
570
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
571
571
|
reverse: _propTypes.default.bool,
|
|
@@ -608,8 +608,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
608
608
|
ignoreTooltip: _propTypes.default.bool,
|
|
609
609
|
label: _propTypes.default.string,
|
|
610
610
|
labelStyle: _propTypes.default.object,
|
|
611
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
612
|
-
|
|
611
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
612
|
+
valueOf: _propTypes.default.func.isRequired
|
|
613
|
+
})]),
|
|
614
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
615
|
+
valueOf: _propTypes.default.func.isRequired
|
|
616
|
+
})]),
|
|
613
617
|
offset: _propTypes.default.number,
|
|
614
618
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
615
619
|
reverse: _propTypes.default.bool,
|
|
@@ -652,8 +656,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
652
656
|
ignoreTooltip: _propTypes.default.bool,
|
|
653
657
|
label: _propTypes.default.string,
|
|
654
658
|
labelStyle: _propTypes.default.object,
|
|
655
|
-
max: _propTypes.default.
|
|
656
|
-
min: _propTypes.default.
|
|
659
|
+
max: _propTypes.default.number,
|
|
660
|
+
min: _propTypes.default.number,
|
|
657
661
|
offset: _propTypes.default.number,
|
|
658
662
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
659
663
|
reverse: _propTypes.default.bool,
|
|
@@ -713,8 +717,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
713
717
|
ignoreTooltip: _propTypes.default.bool,
|
|
714
718
|
label: _propTypes.default.string,
|
|
715
719
|
labelStyle: _propTypes.default.object,
|
|
716
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
717
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
718
720
|
offset: _propTypes.default.number,
|
|
719
721
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
720
722
|
reverse: _propTypes.default.bool,
|
|
@@ -766,8 +768,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
766
768
|
ignoreTooltip: _propTypes.default.bool,
|
|
767
769
|
label: _propTypes.default.string,
|
|
768
770
|
labelStyle: _propTypes.default.object,
|
|
769
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
770
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
771
771
|
offset: _propTypes.default.number,
|
|
772
772
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
773
773
|
reverse: _propTypes.default.bool,
|
|
@@ -809,8 +809,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
809
809
|
ignoreTooltip: _propTypes.default.bool,
|
|
810
810
|
label: _propTypes.default.string,
|
|
811
811
|
labelStyle: _propTypes.default.object,
|
|
812
|
-
max: _propTypes.default.
|
|
813
|
-
min: _propTypes.default.
|
|
812
|
+
max: _propTypes.default.number,
|
|
813
|
+
min: _propTypes.default.number,
|
|
814
814
|
offset: _propTypes.default.number,
|
|
815
815
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
816
816
|
reverse: _propTypes.default.bool,
|
|
@@ -853,8 +853,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
853
853
|
ignoreTooltip: _propTypes.default.bool,
|
|
854
854
|
label: _propTypes.default.string,
|
|
855
855
|
labelStyle: _propTypes.default.object,
|
|
856
|
-
max: _propTypes.default.
|
|
857
|
-
min: _propTypes.default.
|
|
856
|
+
max: _propTypes.default.number,
|
|
857
|
+
min: _propTypes.default.number,
|
|
858
858
|
offset: _propTypes.default.number,
|
|
859
859
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
860
860
|
reverse: _propTypes.default.bool,
|
|
@@ -896,8 +896,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
896
896
|
ignoreTooltip: _propTypes.default.bool,
|
|
897
897
|
label: _propTypes.default.string,
|
|
898
898
|
labelStyle: _propTypes.default.object,
|
|
899
|
-
max: _propTypes.default.
|
|
900
|
-
min: _propTypes.default.
|
|
899
|
+
max: _propTypes.default.number,
|
|
900
|
+
min: _propTypes.default.number,
|
|
901
901
|
offset: _propTypes.default.number,
|
|
902
902
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
903
903
|
reverse: _propTypes.default.bool,
|
|
@@ -939,8 +939,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
939
939
|
ignoreTooltip: _propTypes.default.bool,
|
|
940
940
|
label: _propTypes.default.string,
|
|
941
941
|
labelStyle: _propTypes.default.object,
|
|
942
|
-
max: _propTypes.default.
|
|
943
|
-
min: _propTypes.default.
|
|
942
|
+
max: _propTypes.default.number,
|
|
943
|
+
min: _propTypes.default.number,
|
|
944
944
|
offset: _propTypes.default.number,
|
|
945
945
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
946
946
|
reverse: _propTypes.default.bool,
|
|
@@ -982,8 +982,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
982
982
|
ignoreTooltip: _propTypes.default.bool,
|
|
983
983
|
label: _propTypes.default.string,
|
|
984
984
|
labelStyle: _propTypes.default.object,
|
|
985
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
986
|
-
|
|
985
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
986
|
+
valueOf: _propTypes.default.func.isRequired
|
|
987
|
+
})]),
|
|
988
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
989
|
+
valueOf: _propTypes.default.func.isRequired
|
|
990
|
+
})]),
|
|
987
991
|
offset: _propTypes.default.number,
|
|
988
992
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
989
993
|
reverse: _propTypes.default.bool,
|
|
@@ -1025,8 +1029,12 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1025
1029
|
ignoreTooltip: _propTypes.default.bool,
|
|
1026
1030
|
label: _propTypes.default.string,
|
|
1027
1031
|
labelStyle: _propTypes.default.object,
|
|
1028
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
1029
|
-
|
|
1032
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
1033
|
+
valueOf: _propTypes.default.func.isRequired
|
|
1034
|
+
})]),
|
|
1035
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
1036
|
+
valueOf: _propTypes.default.func.isRequired
|
|
1037
|
+
})]),
|
|
1030
1038
|
offset: _propTypes.default.number,
|
|
1031
1039
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
1032
1040
|
reverse: _propTypes.default.bool,
|
|
@@ -1068,8 +1076,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1068
1076
|
ignoreTooltip: _propTypes.default.bool,
|
|
1069
1077
|
label: _propTypes.default.string,
|
|
1070
1078
|
labelStyle: _propTypes.default.object,
|
|
1071
|
-
max: _propTypes.default.
|
|
1072
|
-
min: _propTypes.default.
|
|
1079
|
+
max: _propTypes.default.number,
|
|
1080
|
+
min: _propTypes.default.number,
|
|
1073
1081
|
offset: _propTypes.default.number,
|
|
1074
1082
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
1075
1083
|
reverse: _propTypes.default.bool,
|
package/PieChart/PieArc.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
40
|
-
|
|
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
|
-
/**
|
|
51
|
-
|
|
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 };
|
package/PieChart/PieArc.js
CHANGED
|
@@ -22,7 +22,7 @@ var _hooks = require("../hooks");
|
|
|
22
22
|
var _animation = require("../internals/animation/animation");
|
|
23
23
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
const _excluded = ["className", "classes", "color", "dataIndex", "id", "isFaded", "isHighlighted", "isFocused", "onClick", "cornerRadius", "startAngle", "endAngle", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "stroke"];
|
|
25
|
+
const _excluded = ["className", "classes", "color", "dataIndex", "id", "isFaded", "isHighlighted", "isFocused", "onClick", "cornerRadius", "startAngle", "endAngle", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "stroke", "skipInteraction"];
|
|
26
26
|
function getPieArcUtilityClass(slot) {
|
|
27
27
|
return (0, _generateUtilityClass.default)('MuiPieArc', slot);
|
|
28
28
|
}
|
|
@@ -67,7 +67,8 @@ const PieArc = exports.PieArc = /*#__PURE__*/React.forwardRef(function PieArc(pr
|
|
|
67
67
|
outerRadius,
|
|
68
68
|
paddingAngle,
|
|
69
69
|
skipAnimation,
|
|
70
|
-
stroke: strokeProp
|
|
70
|
+
stroke: strokeProp,
|
|
71
|
+
skipInteraction
|
|
71
72
|
} = props,
|
|
72
73
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
73
74
|
const theme = (0, _styles.useTheme)();
|
|
@@ -86,7 +87,7 @@ const PieArc = exports.PieArc = /*#__PURE__*/React.forwardRef(function PieArc(pr
|
|
|
86
87
|
type: 'pie',
|
|
87
88
|
seriesId: id,
|
|
88
89
|
dataIndex
|
|
89
|
-
});
|
|
90
|
+
}, skipInteraction);
|
|
90
91
|
const animatedProps = (0, _hooks.useAnimatePieArc)({
|
|
91
92
|
cornerRadius,
|
|
92
93
|
startAngle,
|
|
@@ -130,8 +131,13 @@ process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
|
|
|
130
131
|
outerRadius: _propTypes.default.number.isRequired,
|
|
131
132
|
paddingAngle: _propTypes.default.number.isRequired,
|
|
132
133
|
/**
|
|
133
|
-
*
|
|
134
|
+
* If `true`, the animation is disabled.
|
|
135
|
+
*/
|
|
136
|
+
skipAnimation: _propTypes.default.bool,
|
|
137
|
+
/**
|
|
138
|
+
* If `true`, the default event handlers are disabled.
|
|
139
|
+
* Those are used, for example, to display a tooltip or highlight the arc on hover.
|
|
134
140
|
*/
|
|
135
|
-
|
|
141
|
+
skipInteraction: _propTypes.default.bool,
|
|
136
142
|
startAngle: _propTypes.default.number.isRequired
|
|
137
143
|
} : void 0;
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -81,7 +81,9 @@ function PieArcPlot(props) {
|
|
|
81
81
|
endAngle: focusedItem.endAngle,
|
|
82
82
|
paddingAngle: focusedItem.paddingAngle,
|
|
83
83
|
innerRadius: focusedItem.innerRadius,
|
|
84
|
-
color:
|
|
84
|
+
color: "transparent",
|
|
85
|
+
pointerEvents: "none",
|
|
86
|
+
skipInteraction: true,
|
|
85
87
|
outerRadius: focusedItem.outerRadius,
|
|
86
88
|
cornerRadius: focusedItem.cornerRadius,
|
|
87
89
|
skipAnimation: true,
|
|
@@ -267,8 +267,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
267
267
|
ignoreTooltip: _propTypes.default.bool,
|
|
268
268
|
label: _propTypes.default.string,
|
|
269
269
|
labelStyle: _propTypes.default.object,
|
|
270
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
271
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
272
270
|
offset: _propTypes.default.number,
|
|
273
271
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
274
272
|
reverse: _propTypes.default.bool,
|
|
@@ -321,8 +319,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
321
319
|
ignoreTooltip: _propTypes.default.bool,
|
|
322
320
|
label: _propTypes.default.string,
|
|
323
321
|
labelStyle: _propTypes.default.object,
|
|
324
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
325
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
326
322
|
offset: _propTypes.default.number,
|
|
327
323
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
328
324
|
reverse: _propTypes.default.bool,
|
|
@@ -365,8 +361,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
365
361
|
ignoreTooltip: _propTypes.default.bool,
|
|
366
362
|
label: _propTypes.default.string,
|
|
367
363
|
labelStyle: _propTypes.default.object,
|
|
368
|
-
max: _propTypes.default.
|
|
369
|
-
min: _propTypes.default.
|
|
364
|
+
max: _propTypes.default.number,
|
|
365
|
+
min: _propTypes.default.number,
|
|
370
366
|
offset: _propTypes.default.number,
|
|
371
367
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
372
368
|
reverse: _propTypes.default.bool,
|
|
@@ -410,8 +406,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
410
406
|
ignoreTooltip: _propTypes.default.bool,
|
|
411
407
|
label: _propTypes.default.string,
|
|
412
408
|
labelStyle: _propTypes.default.object,
|
|
413
|
-
max: _propTypes.default.
|
|
414
|
-
min: _propTypes.default.
|
|
409
|
+
max: _propTypes.default.number,
|
|
410
|
+
min: _propTypes.default.number,
|
|
415
411
|
offset: _propTypes.default.number,
|
|
416
412
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
417
413
|
reverse: _propTypes.default.bool,
|
|
@@ -454,8 +450,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
454
450
|
ignoreTooltip: _propTypes.default.bool,
|
|
455
451
|
label: _propTypes.default.string,
|
|
456
452
|
labelStyle: _propTypes.default.object,
|
|
457
|
-
max: _propTypes.default.
|
|
458
|
-
min: _propTypes.default.
|
|
453
|
+
max: _propTypes.default.number,
|
|
454
|
+
min: _propTypes.default.number,
|
|
459
455
|
offset: _propTypes.default.number,
|
|
460
456
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
461
457
|
reverse: _propTypes.default.bool,
|
|
@@ -498,8 +494,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
498
494
|
ignoreTooltip: _propTypes.default.bool,
|
|
499
495
|
label: _propTypes.default.string,
|
|
500
496
|
labelStyle: _propTypes.default.object,
|
|
501
|
-
max: _propTypes.default.
|
|
502
|
-
min: _propTypes.default.
|
|
497
|
+
max: _propTypes.default.number,
|
|
498
|
+
min: _propTypes.default.number,
|
|
503
499
|
offset: _propTypes.default.number,
|
|
504
500
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
505
501
|
reverse: _propTypes.default.bool,
|
|
@@ -542,8 +538,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
542
538
|
ignoreTooltip: _propTypes.default.bool,
|
|
543
539
|
label: _propTypes.default.string,
|
|
544
540
|
labelStyle: _propTypes.default.object,
|
|
545
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
546
|
-
|
|
541
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
542
|
+
valueOf: _propTypes.default.func.isRequired
|
|
543
|
+
})]),
|
|
544
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
545
|
+
valueOf: _propTypes.default.func.isRequired
|
|
546
|
+
})]),
|
|
547
547
|
offset: _propTypes.default.number,
|
|
548
548
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
549
549
|
reverse: _propTypes.default.bool,
|
|
@@ -586,8 +586,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
586
586
|
ignoreTooltip: _propTypes.default.bool,
|
|
587
587
|
label: _propTypes.default.string,
|
|
588
588
|
labelStyle: _propTypes.default.object,
|
|
589
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
590
|
-
|
|
589
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
590
|
+
valueOf: _propTypes.default.func.isRequired
|
|
591
|
+
})]),
|
|
592
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
593
|
+
valueOf: _propTypes.default.func.isRequired
|
|
594
|
+
})]),
|
|
591
595
|
offset: _propTypes.default.number,
|
|
592
596
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
593
597
|
reverse: _propTypes.default.bool,
|
|
@@ -630,8 +634,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
630
634
|
ignoreTooltip: _propTypes.default.bool,
|
|
631
635
|
label: _propTypes.default.string,
|
|
632
636
|
labelStyle: _propTypes.default.object,
|
|
633
|
-
max: _propTypes.default.
|
|
634
|
-
min: _propTypes.default.
|
|
637
|
+
max: _propTypes.default.number,
|
|
638
|
+
min: _propTypes.default.number,
|
|
635
639
|
offset: _propTypes.default.number,
|
|
636
640
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
637
641
|
reverse: _propTypes.default.bool,
|
|
@@ -691,8 +695,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
691
695
|
ignoreTooltip: _propTypes.default.bool,
|
|
692
696
|
label: _propTypes.default.string,
|
|
693
697
|
labelStyle: _propTypes.default.object,
|
|
694
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
695
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
696
698
|
offset: _propTypes.default.number,
|
|
697
699
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
698
700
|
reverse: _propTypes.default.bool,
|
|
@@ -744,8 +746,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
744
746
|
ignoreTooltip: _propTypes.default.bool,
|
|
745
747
|
label: _propTypes.default.string,
|
|
746
748
|
labelStyle: _propTypes.default.object,
|
|
747
|
-
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
748
|
-
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
749
749
|
offset: _propTypes.default.number,
|
|
750
750
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
751
751
|
reverse: _propTypes.default.bool,
|
|
@@ -787,8 +787,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
787
787
|
ignoreTooltip: _propTypes.default.bool,
|
|
788
788
|
label: _propTypes.default.string,
|
|
789
789
|
labelStyle: _propTypes.default.object,
|
|
790
|
-
max: _propTypes.default.
|
|
791
|
-
min: _propTypes.default.
|
|
790
|
+
max: _propTypes.default.number,
|
|
791
|
+
min: _propTypes.default.number,
|
|
792
792
|
offset: _propTypes.default.number,
|
|
793
793
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
794
794
|
reverse: _propTypes.default.bool,
|
|
@@ -831,8 +831,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
831
831
|
ignoreTooltip: _propTypes.default.bool,
|
|
832
832
|
label: _propTypes.default.string,
|
|
833
833
|
labelStyle: _propTypes.default.object,
|
|
834
|
-
max: _propTypes.default.
|
|
835
|
-
min: _propTypes.default.
|
|
834
|
+
max: _propTypes.default.number,
|
|
835
|
+
min: _propTypes.default.number,
|
|
836
836
|
offset: _propTypes.default.number,
|
|
837
837
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
838
838
|
reverse: _propTypes.default.bool,
|
|
@@ -874,8 +874,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
874
874
|
ignoreTooltip: _propTypes.default.bool,
|
|
875
875
|
label: _propTypes.default.string,
|
|
876
876
|
labelStyle: _propTypes.default.object,
|
|
877
|
-
max: _propTypes.default.
|
|
878
|
-
min: _propTypes.default.
|
|
877
|
+
max: _propTypes.default.number,
|
|
878
|
+
min: _propTypes.default.number,
|
|
879
879
|
offset: _propTypes.default.number,
|
|
880
880
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
881
881
|
reverse: _propTypes.default.bool,
|
|
@@ -917,8 +917,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
917
917
|
ignoreTooltip: _propTypes.default.bool,
|
|
918
918
|
label: _propTypes.default.string,
|
|
919
919
|
labelStyle: _propTypes.default.object,
|
|
920
|
-
max: _propTypes.default.
|
|
921
|
-
min: _propTypes.default.
|
|
920
|
+
max: _propTypes.default.number,
|
|
921
|
+
min: _propTypes.default.number,
|
|
922
922
|
offset: _propTypes.default.number,
|
|
923
923
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
924
924
|
reverse: _propTypes.default.bool,
|
|
@@ -960,8 +960,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
960
960
|
ignoreTooltip: _propTypes.default.bool,
|
|
961
961
|
label: _propTypes.default.string,
|
|
962
962
|
labelStyle: _propTypes.default.object,
|
|
963
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
964
|
-
|
|
963
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
964
|
+
valueOf: _propTypes.default.func.isRequired
|
|
965
|
+
})]),
|
|
966
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
967
|
+
valueOf: _propTypes.default.func.isRequired
|
|
968
|
+
})]),
|
|
965
969
|
offset: _propTypes.default.number,
|
|
966
970
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
967
971
|
reverse: _propTypes.default.bool,
|
|
@@ -1003,8 +1007,12 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
1003
1007
|
ignoreTooltip: _propTypes.default.bool,
|
|
1004
1008
|
label: _propTypes.default.string,
|
|
1005
1009
|
labelStyle: _propTypes.default.object,
|
|
1006
|
-
max: _propTypes.default.oneOfType([_propTypes.default.
|
|
1007
|
-
|
|
1010
|
+
max: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
1011
|
+
valueOf: _propTypes.default.func.isRequired
|
|
1012
|
+
})]),
|
|
1013
|
+
min: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
1014
|
+
valueOf: _propTypes.default.func.isRequired
|
|
1015
|
+
})]),
|
|
1008
1016
|
offset: _propTypes.default.number,
|
|
1009
1017
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
1010
1018
|
reverse: _propTypes.default.bool,
|
|
@@ -1046,8 +1054,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
1046
1054
|
ignoreTooltip: _propTypes.default.bool,
|
|
1047
1055
|
label: _propTypes.default.string,
|
|
1048
1056
|
labelStyle: _propTypes.default.object,
|
|
1049
|
-
max: _propTypes.default.
|
|
1050
|
-
min: _propTypes.default.
|
|
1057
|
+
max: _propTypes.default.number,
|
|
1058
|
+
min: _propTypes.default.number,
|
|
1051
1059
|
offset: _propTypes.default.number,
|
|
1052
1060
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
1053
1061
|
reverse: _propTypes.default.bool,
|