@mui/x-charts-pro 9.0.0 → 9.0.2
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/BarChartPro/BarChartPro.js +20 -1
- package/BarChartPro/BarChartPro.mjs +20 -1
- package/CHANGELOG.md +215 -6891
- package/ChartsDataProviderPro/ChartsDataProviderPro.js +2 -2
- package/ChartsDataProviderPro/ChartsDataProviderPro.mjs +2 -2
- package/ChartsRadialDataProvider/index.d.mts +1 -0
- package/ChartsRadialDataProvider/index.d.ts +1 -0
- package/ChartsRadialDataProvider/index.js +16 -0
- package/ChartsRadialDataProvider/index.mjs +2 -0
- package/ChartsRadialGrid/index.d.mts +1 -0
- package/ChartsRadialGrid/index.d.ts +1 -0
- package/ChartsRadialGrid/index.js +16 -0
- package/ChartsRadialGrid/index.mjs +2 -0
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.js +1 -0
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.mjs +1 -0
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.js +1 -0
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.mjs +1 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.mts +30 -0
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +30 -0
- package/ChartsToolbarPro/ChartsToolbarPro.js +66 -17
- package/ChartsToolbarPro/ChartsToolbarPro.mjs +66 -17
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.mts +41 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.d.ts +41 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.js +156 -0
- package/ChartsToolbarPro/ChartsToolbarRangeButtonTrigger.mjs +150 -0
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.mjs +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.mjs +1 -1
- package/ChartsToolbarPro/index.d.mts +1 -0
- package/ChartsToolbarPro/index.d.ts +1 -0
- package/ChartsToolbarPro/index.js +11 -0
- package/ChartsToolbarPro/index.mjs +1 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.mts +66 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.d.ts +66 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.js +217 -0
- package/ChartsToolbarPro/rangeButtonValueToZoom.mjs +212 -0
- package/Heatmap/Heatmap.js +4 -1
- package/Heatmap/Heatmap.mjs +4 -1
- package/LineChartPro/LineChartPro.js +20 -1
- package/LineChartPro/LineChartPro.mjs +20 -1
- package/ScatterChartPro/ScatterChartPro.js +20 -1
- package/ScatterChartPro/ScatterChartPro.mjs +20 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.mjs +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.mjs +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +13 -4
- package/internals/plugins/useChartProZoom/useChartProZoom.mjs +13 -4
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.mts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +3 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +4 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.mjs +3 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.mts +10 -0
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +10 -0
- package/models/seriesType/heatmap.d.mts +9 -1
- package/models/seriesType/heatmap.d.ts +9 -1
- package/package.json +45 -17
|
@@ -470,6 +470,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
470
470
|
tickSize: PropTypes.number,
|
|
471
471
|
tickSpacing: PropTypes.number,
|
|
472
472
|
valueFormatter: PropTypes.func,
|
|
473
|
+
valueGetter: PropTypes.func,
|
|
473
474
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
474
475
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
475
476
|
maxEnd: PropTypes.number,
|
|
@@ -544,6 +545,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
544
545
|
tickSize: PropTypes.number,
|
|
545
546
|
tickSpacing: PropTypes.number,
|
|
546
547
|
valueFormatter: PropTypes.func,
|
|
548
|
+
valueGetter: PropTypes.func,
|
|
547
549
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
548
550
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
549
551
|
maxEnd: PropTypes.number,
|
|
@@ -605,6 +607,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
605
607
|
tickSize: PropTypes.number,
|
|
606
608
|
tickSpacing: PropTypes.number,
|
|
607
609
|
valueFormatter: PropTypes.func,
|
|
610
|
+
valueGetter: PropTypes.func,
|
|
608
611
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
609
612
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
610
613
|
maxEnd: PropTypes.number,
|
|
@@ -667,6 +670,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
667
670
|
tickSize: PropTypes.number,
|
|
668
671
|
tickSpacing: PropTypes.number,
|
|
669
672
|
valueFormatter: PropTypes.func,
|
|
673
|
+
valueGetter: PropTypes.func,
|
|
670
674
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
671
675
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
672
676
|
maxEnd: PropTypes.number,
|
|
@@ -728,6 +732,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
728
732
|
tickSize: PropTypes.number,
|
|
729
733
|
tickSpacing: PropTypes.number,
|
|
730
734
|
valueFormatter: PropTypes.func,
|
|
735
|
+
valueGetter: PropTypes.func,
|
|
731
736
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
732
737
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
733
738
|
maxEnd: PropTypes.number,
|
|
@@ -789,6 +794,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
789
794
|
tickSize: PropTypes.number,
|
|
790
795
|
tickSpacing: PropTypes.number,
|
|
791
796
|
valueFormatter: PropTypes.func,
|
|
797
|
+
valueGetter: PropTypes.func,
|
|
792
798
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
793
799
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
794
800
|
maxEnd: PropTypes.number,
|
|
@@ -854,6 +860,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
854
860
|
tickSize: PropTypes.number,
|
|
855
861
|
tickSpacing: PropTypes.number,
|
|
856
862
|
valueFormatter: PropTypes.func,
|
|
863
|
+
valueGetter: PropTypes.func,
|
|
857
864
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
858
865
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
859
866
|
maxEnd: PropTypes.number,
|
|
@@ -919,6 +926,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
919
926
|
tickSize: PropTypes.number,
|
|
920
927
|
tickSpacing: PropTypes.number,
|
|
921
928
|
valueFormatter: PropTypes.func,
|
|
929
|
+
valueGetter: PropTypes.func,
|
|
922
930
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
923
931
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
924
932
|
maxEnd: PropTypes.number,
|
|
@@ -980,6 +988,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
980
988
|
tickSize: PropTypes.number,
|
|
981
989
|
tickSpacing: PropTypes.number,
|
|
982
990
|
valueFormatter: PropTypes.func,
|
|
991
|
+
valueGetter: PropTypes.func,
|
|
983
992
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
984
993
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
985
994
|
maxEnd: PropTypes.number,
|
|
@@ -1060,6 +1069,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1060
1069
|
tickSize: PropTypes.number,
|
|
1061
1070
|
tickSpacing: PropTypes.number,
|
|
1062
1071
|
valueFormatter: PropTypes.func,
|
|
1072
|
+
valueGetter: PropTypes.func,
|
|
1063
1073
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1064
1074
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1065
1075
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1133,6 +1143,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1133
1143
|
tickSize: PropTypes.number,
|
|
1134
1144
|
tickSpacing: PropTypes.number,
|
|
1135
1145
|
valueFormatter: PropTypes.func,
|
|
1146
|
+
valueGetter: PropTypes.func,
|
|
1136
1147
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1137
1148
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1138
1149
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1193,6 +1204,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1193
1204
|
tickSize: PropTypes.number,
|
|
1194
1205
|
tickSpacing: PropTypes.number,
|
|
1195
1206
|
valueFormatter: PropTypes.func,
|
|
1207
|
+
valueGetter: PropTypes.func,
|
|
1196
1208
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1197
1209
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1198
1210
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1254,6 +1266,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1254
1266
|
tickSize: PropTypes.number,
|
|
1255
1267
|
tickSpacing: PropTypes.number,
|
|
1256
1268
|
valueFormatter: PropTypes.func,
|
|
1269
|
+
valueGetter: PropTypes.func,
|
|
1257
1270
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1258
1271
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1259
1272
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1314,6 +1327,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1314
1327
|
tickSize: PropTypes.number,
|
|
1315
1328
|
tickSpacing: PropTypes.number,
|
|
1316
1329
|
valueFormatter: PropTypes.func,
|
|
1330
|
+
valueGetter: PropTypes.func,
|
|
1317
1331
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1318
1332
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1319
1333
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1374,6 +1388,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1374
1388
|
tickSize: PropTypes.number,
|
|
1375
1389
|
tickSpacing: PropTypes.number,
|
|
1376
1390
|
valueFormatter: PropTypes.func,
|
|
1391
|
+
valueGetter: PropTypes.func,
|
|
1377
1392
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1378
1393
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1379
1394
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1438,6 +1453,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1438
1453
|
tickSize: PropTypes.number,
|
|
1439
1454
|
tickSpacing: PropTypes.number,
|
|
1440
1455
|
valueFormatter: PropTypes.func,
|
|
1456
|
+
valueGetter: PropTypes.func,
|
|
1441
1457
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1442
1458
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1443
1459
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1502,6 +1518,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1502
1518
|
tickSize: PropTypes.number,
|
|
1503
1519
|
tickSpacing: PropTypes.number,
|
|
1504
1520
|
valueFormatter: PropTypes.func,
|
|
1521
|
+
valueGetter: PropTypes.func,
|
|
1505
1522
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1506
1523
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1507
1524
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1562,6 +1579,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1562
1579
|
tickSize: PropTypes.number,
|
|
1563
1580
|
tickSpacing: PropTypes.number,
|
|
1564
1581
|
valueFormatter: PropTypes.func,
|
|
1582
|
+
valueGetter: PropTypes.func,
|
|
1565
1583
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1566
1584
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1567
1585
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1602,7 +1620,8 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1602
1620
|
dataKey: PropTypes.string,
|
|
1603
1621
|
id: PropTypes.string,
|
|
1604
1622
|
max: PropTypes.number,
|
|
1605
|
-
min: PropTypes.number
|
|
1623
|
+
min: PropTypes.number,
|
|
1624
|
+
valueGetter: PropTypes.func
|
|
1606
1625
|
})),
|
|
1607
1626
|
/**
|
|
1608
1627
|
* The list of zoom data related to each axis.
|
|
@@ -475,6 +475,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
475
475
|
tickSize: _propTypes.default.number,
|
|
476
476
|
tickSpacing: _propTypes.default.number,
|
|
477
477
|
valueFormatter: _propTypes.default.func,
|
|
478
|
+
valueGetter: _propTypes.default.func,
|
|
478
479
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
479
480
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
480
481
|
maxEnd: _propTypes.default.number,
|
|
@@ -549,6 +550,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
549
550
|
tickSize: _propTypes.default.number,
|
|
550
551
|
tickSpacing: _propTypes.default.number,
|
|
551
552
|
valueFormatter: _propTypes.default.func,
|
|
553
|
+
valueGetter: _propTypes.default.func,
|
|
552
554
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
553
555
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
554
556
|
maxEnd: _propTypes.default.number,
|
|
@@ -610,6 +612,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
610
612
|
tickSize: _propTypes.default.number,
|
|
611
613
|
tickSpacing: _propTypes.default.number,
|
|
612
614
|
valueFormatter: _propTypes.default.func,
|
|
615
|
+
valueGetter: _propTypes.default.func,
|
|
613
616
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
614
617
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
615
618
|
maxEnd: _propTypes.default.number,
|
|
@@ -672,6 +675,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
672
675
|
tickSize: _propTypes.default.number,
|
|
673
676
|
tickSpacing: _propTypes.default.number,
|
|
674
677
|
valueFormatter: _propTypes.default.func,
|
|
678
|
+
valueGetter: _propTypes.default.func,
|
|
675
679
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
676
680
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
677
681
|
maxEnd: _propTypes.default.number,
|
|
@@ -733,6 +737,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
733
737
|
tickSize: _propTypes.default.number,
|
|
734
738
|
tickSpacing: _propTypes.default.number,
|
|
735
739
|
valueFormatter: _propTypes.default.func,
|
|
740
|
+
valueGetter: _propTypes.default.func,
|
|
736
741
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
737
742
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
738
743
|
maxEnd: _propTypes.default.number,
|
|
@@ -794,6 +799,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
794
799
|
tickSize: _propTypes.default.number,
|
|
795
800
|
tickSpacing: _propTypes.default.number,
|
|
796
801
|
valueFormatter: _propTypes.default.func,
|
|
802
|
+
valueGetter: _propTypes.default.func,
|
|
797
803
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
798
804
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
799
805
|
maxEnd: _propTypes.default.number,
|
|
@@ -859,6 +865,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
859
865
|
tickSize: _propTypes.default.number,
|
|
860
866
|
tickSpacing: _propTypes.default.number,
|
|
861
867
|
valueFormatter: _propTypes.default.func,
|
|
868
|
+
valueGetter: _propTypes.default.func,
|
|
862
869
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
863
870
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
864
871
|
maxEnd: _propTypes.default.number,
|
|
@@ -924,6 +931,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
924
931
|
tickSize: _propTypes.default.number,
|
|
925
932
|
tickSpacing: _propTypes.default.number,
|
|
926
933
|
valueFormatter: _propTypes.default.func,
|
|
934
|
+
valueGetter: _propTypes.default.func,
|
|
927
935
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
928
936
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
929
937
|
maxEnd: _propTypes.default.number,
|
|
@@ -985,6 +993,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
985
993
|
tickSize: _propTypes.default.number,
|
|
986
994
|
tickSpacing: _propTypes.default.number,
|
|
987
995
|
valueFormatter: _propTypes.default.func,
|
|
996
|
+
valueGetter: _propTypes.default.func,
|
|
988
997
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
989
998
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
990
999
|
maxEnd: _propTypes.default.number,
|
|
@@ -1065,6 +1074,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1065
1074
|
tickSize: _propTypes.default.number,
|
|
1066
1075
|
tickSpacing: _propTypes.default.number,
|
|
1067
1076
|
valueFormatter: _propTypes.default.func,
|
|
1077
|
+
valueGetter: _propTypes.default.func,
|
|
1068
1078
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1069
1079
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1070
1080
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1138,6 +1148,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1138
1148
|
tickSize: _propTypes.default.number,
|
|
1139
1149
|
tickSpacing: _propTypes.default.number,
|
|
1140
1150
|
valueFormatter: _propTypes.default.func,
|
|
1151
|
+
valueGetter: _propTypes.default.func,
|
|
1141
1152
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1142
1153
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1143
1154
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1198,6 +1209,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1198
1209
|
tickSize: _propTypes.default.number,
|
|
1199
1210
|
tickSpacing: _propTypes.default.number,
|
|
1200
1211
|
valueFormatter: _propTypes.default.func,
|
|
1212
|
+
valueGetter: _propTypes.default.func,
|
|
1201
1213
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1202
1214
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1203
1215
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1259,6 +1271,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1259
1271
|
tickSize: _propTypes.default.number,
|
|
1260
1272
|
tickSpacing: _propTypes.default.number,
|
|
1261
1273
|
valueFormatter: _propTypes.default.func,
|
|
1274
|
+
valueGetter: _propTypes.default.func,
|
|
1262
1275
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1263
1276
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1264
1277
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1319,6 +1332,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1319
1332
|
tickSize: _propTypes.default.number,
|
|
1320
1333
|
tickSpacing: _propTypes.default.number,
|
|
1321
1334
|
valueFormatter: _propTypes.default.func,
|
|
1335
|
+
valueGetter: _propTypes.default.func,
|
|
1322
1336
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1323
1337
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1324
1338
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1379,6 +1393,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1379
1393
|
tickSize: _propTypes.default.number,
|
|
1380
1394
|
tickSpacing: _propTypes.default.number,
|
|
1381
1395
|
valueFormatter: _propTypes.default.func,
|
|
1396
|
+
valueGetter: _propTypes.default.func,
|
|
1382
1397
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1383
1398
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1384
1399
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1443,6 +1458,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1443
1458
|
tickSize: _propTypes.default.number,
|
|
1444
1459
|
tickSpacing: _propTypes.default.number,
|
|
1445
1460
|
valueFormatter: _propTypes.default.func,
|
|
1461
|
+
valueGetter: _propTypes.default.func,
|
|
1446
1462
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1447
1463
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1448
1464
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1507,6 +1523,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1507
1523
|
tickSize: _propTypes.default.number,
|
|
1508
1524
|
tickSpacing: _propTypes.default.number,
|
|
1509
1525
|
valueFormatter: _propTypes.default.func,
|
|
1526
|
+
valueGetter: _propTypes.default.func,
|
|
1510
1527
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1511
1528
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1512
1529
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1567,6 +1584,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1567
1584
|
tickSize: _propTypes.default.number,
|
|
1568
1585
|
tickSpacing: _propTypes.default.number,
|
|
1569
1586
|
valueFormatter: _propTypes.default.func,
|
|
1587
|
+
valueGetter: _propTypes.default.func,
|
|
1570
1588
|
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
1571
1589
|
zoom: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
1572
1590
|
filterMode: _propTypes.default.oneOf(['discard', 'keep']),
|
|
@@ -1607,7 +1625,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1607
1625
|
dataKey: _propTypes.default.string,
|
|
1608
1626
|
id: _propTypes.default.string,
|
|
1609
1627
|
max: _propTypes.default.number,
|
|
1610
|
-
min: _propTypes.default.number
|
|
1628
|
+
min: _propTypes.default.number,
|
|
1629
|
+
valueGetter: _propTypes.default.func
|
|
1611
1630
|
})),
|
|
1612
1631
|
/**
|
|
1613
1632
|
* The list of zoom data related to each axis.
|
|
@@ -468,6 +468,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
468
468
|
tickSize: PropTypes.number,
|
|
469
469
|
tickSpacing: PropTypes.number,
|
|
470
470
|
valueFormatter: PropTypes.func,
|
|
471
|
+
valueGetter: PropTypes.func,
|
|
471
472
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
472
473
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
473
474
|
maxEnd: PropTypes.number,
|
|
@@ -542,6 +543,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
542
543
|
tickSize: PropTypes.number,
|
|
543
544
|
tickSpacing: PropTypes.number,
|
|
544
545
|
valueFormatter: PropTypes.func,
|
|
546
|
+
valueGetter: PropTypes.func,
|
|
545
547
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
546
548
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
547
549
|
maxEnd: PropTypes.number,
|
|
@@ -603,6 +605,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
603
605
|
tickSize: PropTypes.number,
|
|
604
606
|
tickSpacing: PropTypes.number,
|
|
605
607
|
valueFormatter: PropTypes.func,
|
|
608
|
+
valueGetter: PropTypes.func,
|
|
606
609
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
607
610
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
608
611
|
maxEnd: PropTypes.number,
|
|
@@ -665,6 +668,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
665
668
|
tickSize: PropTypes.number,
|
|
666
669
|
tickSpacing: PropTypes.number,
|
|
667
670
|
valueFormatter: PropTypes.func,
|
|
671
|
+
valueGetter: PropTypes.func,
|
|
668
672
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
669
673
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
670
674
|
maxEnd: PropTypes.number,
|
|
@@ -726,6 +730,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
726
730
|
tickSize: PropTypes.number,
|
|
727
731
|
tickSpacing: PropTypes.number,
|
|
728
732
|
valueFormatter: PropTypes.func,
|
|
733
|
+
valueGetter: PropTypes.func,
|
|
729
734
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
730
735
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
731
736
|
maxEnd: PropTypes.number,
|
|
@@ -787,6 +792,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
787
792
|
tickSize: PropTypes.number,
|
|
788
793
|
tickSpacing: PropTypes.number,
|
|
789
794
|
valueFormatter: PropTypes.func,
|
|
795
|
+
valueGetter: PropTypes.func,
|
|
790
796
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
791
797
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
792
798
|
maxEnd: PropTypes.number,
|
|
@@ -852,6 +858,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
852
858
|
tickSize: PropTypes.number,
|
|
853
859
|
tickSpacing: PropTypes.number,
|
|
854
860
|
valueFormatter: PropTypes.func,
|
|
861
|
+
valueGetter: PropTypes.func,
|
|
855
862
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
856
863
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
857
864
|
maxEnd: PropTypes.number,
|
|
@@ -917,6 +924,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
917
924
|
tickSize: PropTypes.number,
|
|
918
925
|
tickSpacing: PropTypes.number,
|
|
919
926
|
valueFormatter: PropTypes.func,
|
|
927
|
+
valueGetter: PropTypes.func,
|
|
920
928
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
921
929
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
922
930
|
maxEnd: PropTypes.number,
|
|
@@ -978,6 +986,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
978
986
|
tickSize: PropTypes.number,
|
|
979
987
|
tickSpacing: PropTypes.number,
|
|
980
988
|
valueFormatter: PropTypes.func,
|
|
989
|
+
valueGetter: PropTypes.func,
|
|
981
990
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
982
991
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
983
992
|
maxEnd: PropTypes.number,
|
|
@@ -1058,6 +1067,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1058
1067
|
tickSize: PropTypes.number,
|
|
1059
1068
|
tickSpacing: PropTypes.number,
|
|
1060
1069
|
valueFormatter: PropTypes.func,
|
|
1070
|
+
valueGetter: PropTypes.func,
|
|
1061
1071
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1062
1072
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1063
1073
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1131,6 +1141,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1131
1141
|
tickSize: PropTypes.number,
|
|
1132
1142
|
tickSpacing: PropTypes.number,
|
|
1133
1143
|
valueFormatter: PropTypes.func,
|
|
1144
|
+
valueGetter: PropTypes.func,
|
|
1134
1145
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1135
1146
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1136
1147
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1191,6 +1202,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1191
1202
|
tickSize: PropTypes.number,
|
|
1192
1203
|
tickSpacing: PropTypes.number,
|
|
1193
1204
|
valueFormatter: PropTypes.func,
|
|
1205
|
+
valueGetter: PropTypes.func,
|
|
1194
1206
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1195
1207
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1196
1208
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1252,6 +1264,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1252
1264
|
tickSize: PropTypes.number,
|
|
1253
1265
|
tickSpacing: PropTypes.number,
|
|
1254
1266
|
valueFormatter: PropTypes.func,
|
|
1267
|
+
valueGetter: PropTypes.func,
|
|
1255
1268
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1256
1269
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1257
1270
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1312,6 +1325,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1312
1325
|
tickSize: PropTypes.number,
|
|
1313
1326
|
tickSpacing: PropTypes.number,
|
|
1314
1327
|
valueFormatter: PropTypes.func,
|
|
1328
|
+
valueGetter: PropTypes.func,
|
|
1315
1329
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1316
1330
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1317
1331
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1372,6 +1386,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1372
1386
|
tickSize: PropTypes.number,
|
|
1373
1387
|
tickSpacing: PropTypes.number,
|
|
1374
1388
|
valueFormatter: PropTypes.func,
|
|
1389
|
+
valueGetter: PropTypes.func,
|
|
1375
1390
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1376
1391
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1377
1392
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1436,6 +1451,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1436
1451
|
tickSize: PropTypes.number,
|
|
1437
1452
|
tickSpacing: PropTypes.number,
|
|
1438
1453
|
valueFormatter: PropTypes.func,
|
|
1454
|
+
valueGetter: PropTypes.func,
|
|
1439
1455
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1440
1456
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1441
1457
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1500,6 +1516,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1500
1516
|
tickSize: PropTypes.number,
|
|
1501
1517
|
tickSpacing: PropTypes.number,
|
|
1502
1518
|
valueFormatter: PropTypes.func,
|
|
1519
|
+
valueGetter: PropTypes.func,
|
|
1503
1520
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1504
1521
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1505
1522
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1560,6 +1577,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1560
1577
|
tickSize: PropTypes.number,
|
|
1561
1578
|
tickSpacing: PropTypes.number,
|
|
1562
1579
|
valueFormatter: PropTypes.func,
|
|
1580
|
+
valueGetter: PropTypes.func,
|
|
1563
1581
|
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
1564
1582
|
zoom: PropTypes.oneOfType([PropTypes.shape({
|
|
1565
1583
|
filterMode: PropTypes.oneOf(['discard', 'keep']),
|
|
@@ -1600,7 +1618,8 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
|
|
|
1600
1618
|
dataKey: PropTypes.string,
|
|
1601
1619
|
id: PropTypes.string,
|
|
1602
1620
|
max: PropTypes.number,
|
|
1603
|
-
min: PropTypes.number
|
|
1621
|
+
min: PropTypes.number,
|
|
1622
|
+
valueGetter: PropTypes.func
|
|
1604
1623
|
})),
|
|
1605
1624
|
/**
|
|
1606
1625
|
* The list of zoom data related to each axis.
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -51,7 +51,7 @@ const usePanOnWheel = ({
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
// This prevents a pan event from being triggered when the mouse is outside the chart area.
|
|
54
|
-
// The timeout is used to prevent
|
|
54
|
+
// The timeout is used to prevent a weird behavior where if the mouse is outside but enters due to
|
|
55
55
|
// scrolling, then the pan event is triggered.
|
|
56
56
|
if (startedOutsideRef.current || !instance.isPointInside(point.x, point.y)) {
|
|
57
57
|
startedOutsideRef.current = true;
|
|
@@ -45,7 +45,7 @@ export const usePanOnWheel = ({
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
// This prevents a pan event from being triggered when the mouse is outside the chart area.
|
|
48
|
-
// The timeout is used to prevent
|
|
48
|
+
// The timeout is used to prevent a weird behavior where if the mouse is outside but enters due to
|
|
49
49
|
// scrolling, then the pan event is triggered.
|
|
50
50
|
if (startedOutsideRef.current || !instance.isPointInside(point.x, point.y)) {
|
|
51
51
|
startedOutsideRef.current = true;
|
|
@@ -47,7 +47,7 @@ const useZoomOnWheel = ({
|
|
|
47
47
|
});
|
|
48
48
|
|
|
49
49
|
// This prevents a zoom event from being triggered when the mouse is outside the chart area.
|
|
50
|
-
// The timeout is used to prevent
|
|
50
|
+
// The timeout is used to prevent a weird behavior where if the mouse is outside but enters due to
|
|
51
51
|
// scrolling, then the zoom event is triggered.
|
|
52
52
|
if (startedOutsideRef.current || !instance.isPointInside(point.x, point.y)) {
|
|
53
53
|
startedOutsideRef.current = true;
|
|
@@ -41,7 +41,7 @@ export const useZoomOnWheel = ({
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
// This prevents a zoom event from being triggered when the mouse is outside the chart area.
|
|
44
|
-
// The timeout is used to prevent
|
|
44
|
+
// The timeout is used to prevent a weird behavior where if the mouse is outside but enters due to
|
|
45
45
|
// scrolling, then the zoom event is triggered.
|
|
46
46
|
if (startedOutsideRef.current || !instance.isPointInside(point.x, point.y)) {
|
|
47
47
|
startedOutsideRef.current = true;
|
|
@@ -70,12 +70,14 @@ const useChartProZoom = pluginData => {
|
|
|
70
70
|
onZoomChange(newZoomData);
|
|
71
71
|
if (store.state.zoom.isControlled) {
|
|
72
72
|
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
73
|
-
isInteracting: true
|
|
73
|
+
isInteracting: true,
|
|
74
|
+
activeRangeButtonKey: null
|
|
74
75
|
}));
|
|
75
76
|
} else {
|
|
76
77
|
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
77
78
|
isInteracting: true,
|
|
78
|
-
zoomData: newZoomData
|
|
79
|
+
zoomData: newZoomData,
|
|
80
|
+
activeRangeButtonKey: null
|
|
79
81
|
}));
|
|
80
82
|
removeIsInteracting();
|
|
81
83
|
}
|
|
@@ -139,6 +141,11 @@ const useChartProZoom = pluginData => {
|
|
|
139
141
|
}, [setZoomDataCallback, store]);
|
|
140
142
|
const zoomIn = React.useCallback(() => zoom(0.1), [zoom]);
|
|
141
143
|
const zoomOut = React.useCallback(() => zoom(-0.1), [zoom]);
|
|
144
|
+
const setActiveRangeButtonKey = React.useCallback(key => {
|
|
145
|
+
store.set('zoom', (0, _extends2.default)({}, store.state.zoom, {
|
|
146
|
+
activeRangeButtonKey: key
|
|
147
|
+
}));
|
|
148
|
+
}, [store]);
|
|
142
149
|
return {
|
|
143
150
|
publicAPI: {
|
|
144
151
|
setZoomData: setZoomDataCallback,
|
|
@@ -151,7 +158,8 @@ const useChartProZoom = pluginData => {
|
|
|
151
158
|
setAxisZoomData,
|
|
152
159
|
moveZoomRange,
|
|
153
160
|
zoomIn,
|
|
154
|
-
zoomOut
|
|
161
|
+
zoomOut,
|
|
162
|
+
setActiveRangeButtonKey
|
|
155
163
|
}
|
|
156
164
|
};
|
|
157
165
|
};
|
|
@@ -178,7 +186,8 @@ useChartProZoom.getInitialState = params => {
|
|
|
178
186
|
zoomData: (0, _initializeZoomData.initializeZoomData)(optionsLookup, userZoomData),
|
|
179
187
|
isInteracting: false,
|
|
180
188
|
isControlled: zoomData !== undefined,
|
|
181
|
-
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(params.zoomInteractionConfig, optionsLookup)
|
|
189
|
+
zoomInteractionConfig: (0, _initializeZoomInteractionConfig.initializeZoomInteractionConfig)(params.zoomInteractionConfig, optionsLookup),
|
|
190
|
+
activeRangeButtonKey: null
|
|
182
191
|
}
|
|
183
192
|
};
|
|
184
193
|
};
|
|
@@ -63,12 +63,14 @@ export const useChartProZoom = pluginData => {
|
|
|
63
63
|
onZoomChange(newZoomData);
|
|
64
64
|
if (store.state.zoom.isControlled) {
|
|
65
65
|
store.set('zoom', _extends({}, store.state.zoom, {
|
|
66
|
-
isInteracting: true
|
|
66
|
+
isInteracting: true,
|
|
67
|
+
activeRangeButtonKey: null
|
|
67
68
|
}));
|
|
68
69
|
} else {
|
|
69
70
|
store.set('zoom', _extends({}, store.state.zoom, {
|
|
70
71
|
isInteracting: true,
|
|
71
|
-
zoomData: newZoomData
|
|
72
|
+
zoomData: newZoomData,
|
|
73
|
+
activeRangeButtonKey: null
|
|
72
74
|
}));
|
|
73
75
|
removeIsInteracting();
|
|
74
76
|
}
|
|
@@ -132,6 +134,11 @@ export const useChartProZoom = pluginData => {
|
|
|
132
134
|
}, [setZoomDataCallback, store]);
|
|
133
135
|
const zoomIn = React.useCallback(() => zoom(0.1), [zoom]);
|
|
134
136
|
const zoomOut = React.useCallback(() => zoom(-0.1), [zoom]);
|
|
137
|
+
const setActiveRangeButtonKey = React.useCallback(key => {
|
|
138
|
+
store.set('zoom', _extends({}, store.state.zoom, {
|
|
139
|
+
activeRangeButtonKey: key
|
|
140
|
+
}));
|
|
141
|
+
}, [store]);
|
|
135
142
|
return {
|
|
136
143
|
publicAPI: {
|
|
137
144
|
setZoomData: setZoomDataCallback,
|
|
@@ -144,7 +151,8 @@ export const useChartProZoom = pluginData => {
|
|
|
144
151
|
setAxisZoomData,
|
|
145
152
|
moveZoomRange,
|
|
146
153
|
zoomIn,
|
|
147
|
-
zoomOut
|
|
154
|
+
zoomOut,
|
|
155
|
+
setActiveRangeButtonKey
|
|
148
156
|
}
|
|
149
157
|
};
|
|
150
158
|
};
|
|
@@ -170,7 +178,8 @@ useChartProZoom.getInitialState = params => {
|
|
|
170
178
|
zoomData: initializeZoomData(optionsLookup, userZoomData),
|
|
171
179
|
isInteracting: false,
|
|
172
180
|
isControlled: zoomData !== undefined,
|
|
173
|
-
zoomInteractionConfig: initializeZoomInteractionConfig(params.zoomInteractionConfig, optionsLookup)
|
|
181
|
+
zoomInteractionConfig: initializeZoomInteractionConfig(params.zoomInteractionConfig, optionsLookup),
|
|
182
|
+
activeRangeButtonKey: null
|
|
174
183
|
}
|
|
175
184
|
};
|
|
176
185
|
};
|
|
@@ -13,6 +13,9 @@ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/i
|
|
|
13
13
|
export declare const selectorChartCanZoomOut: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.mjs").UseChartProZoomState & Partial<{}> & {
|
|
14
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
15
15
|
}) => boolean;
|
|
16
|
+
export declare const selectorChartActiveRangeButtonKey: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.mjs").UseChartProZoomState & Partial<{}> & {
|
|
17
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
|
+
}) => string | null;
|
|
16
19
|
export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.mjs").UseChartProZoomState & Partial<{}> & {
|
|
17
20
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
21
|
}) => boolean;
|
|
@@ -13,6 +13,9 @@ export declare const selectorChartAxisZoomData: (args_0: import("@mui/x-charts/i
|
|
|
13
13
|
export declare const selectorChartCanZoomOut: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
14
14
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
15
15
|
}) => boolean;
|
|
16
|
+
export declare const selectorChartActiveRangeButtonKey: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
17
|
+
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
|
+
}) => string | null;
|
|
16
19
|
export declare const selectorChartCanZoomIn: (args_0: import("@mui/x-charts/internals/plugins/corePlugins/useChartId/useChartId.types").UseChartIdState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types").UseChartSeriesConfigState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types").UseChartExperimentalFeaturesState & import("@mui/x-charts/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("@mui/x-charts/internals/plugins/corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("@mui/x-charts/internals").ChartsSeriesConfig> & import("@mui/x-charts/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types").UseChartAnimationState & import("@mui/x-charts/internals").UseChartInteractionListenerState & import("./useChartProZoom.types.js").UseChartProZoomState & Partial<{}> & {
|
|
17
20
|
cacheKey: import("@mui/x-charts/internals").ChartStateCacheKey;
|
|
18
21
|
}) => boolean;
|