@mui/x-charts-pro 8.10.1 → 8.11.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/BarChartPro/BarChartPro.js +0 -36
- package/CHANGELOG.md +221 -8
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/FunnelChart/curves/bump.js +0 -2
- package/FunnelChart/curves/linear.js +0 -2
- package/FunnelChart/curves/pyramid.js +0 -2
- package/FunnelChart/curves/step-pyramid.js +0 -2
- package/FunnelChart/curves/step.js +0 -2
- package/Heatmap/Heatmap.js +0 -4
- package/LineChartPro/LineChartPro.js +0 -36
- package/PieChartPro/PieChartPro.js +2 -2
- package/SankeyChart/SankeyChart.d.ts +32 -0
- package/SankeyChart/SankeyChart.js +161 -0
- package/SankeyChart/SankeyChart.plugins.d.ts +3 -0
- package/SankeyChart/SankeyChart.plugins.js +11 -0
- package/SankeyChart/SankeyLinkElement.d.ts +27 -0
- package/SankeyChart/SankeyLinkElement.js +53 -0
- package/SankeyChart/SankeyLinkLabel.d.ts +12 -0
- package/SankeyChart/SankeyLinkLabel.js +58 -0
- package/SankeyChart/SankeyNodeElement.d.ts +27 -0
- package/SankeyChart/SankeyNodeElement.js +76 -0
- package/SankeyChart/SankeyPlot.d.ts +29 -0
- package/SankeyChart/SankeyPlot.js +100 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.ts +2 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +27 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +7 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.js +208 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +10 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltip.types.js +5 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +7 -0
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +66 -0
- package/SankeyChart/SankeyTooltip/index.d.ts +3 -0
- package/SankeyChart/SankeyTooltip/index.js +27 -0
- package/SankeyChart/calculateSankeyLayout.d.ts +13 -0
- package/SankeyChart/calculateSankeyLayout.js +141 -0
- package/SankeyChart/index.d.ts +9 -0
- package/SankeyChart/index.js +70 -0
- package/SankeyChart/sankey.types.d.ts +225 -0
- package/SankeyChart/sankey.types.js +6 -0
- package/SankeyChart/sankeyClasses.d.ts +15 -0
- package/SankeyChart/sankeyClasses.js +28 -0
- package/SankeyChart/sankeySlots.types.d.ts +24 -0
- package/SankeyChart/sankeySlots.types.js +5 -0
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.d.ts +2 -0
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +55 -0
- package/SankeyChart/seriesConfig/index.d.ts +2 -0
- package/SankeyChart/seriesConfig/index.js +19 -0
- package/SankeyChart/seriesConfig/tooltipGetter.d.ts +2 -0
- package/SankeyChart/seriesConfig/tooltipGetter.js +46 -0
- package/SankeyChart/useSankeyChartProps.d.ts +22 -0
- package/SankeyChart/useSankeyChartProps.js +77 -0
- package/SankeyChart/utils.d.ts +3 -0
- package/SankeyChart/utils.js +21 -0
- package/ScatterChartPro/ScatterChartPro.js +1 -37
- package/esm/BarChartPro/BarChartPro.js +0 -36
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/FunnelChart/curves/bump.js +0 -2
- package/esm/FunnelChart/curves/linear.js +0 -2
- package/esm/FunnelChart/curves/pyramid.js +0 -2
- package/esm/FunnelChart/curves/step-pyramid.js +0 -2
- package/esm/FunnelChart/curves/step.js +0 -2
- package/esm/Heatmap/Heatmap.js +0 -4
- package/esm/LineChartPro/LineChartPro.js +0 -36
- package/esm/PieChartPro/PieChartPro.js +2 -2
- package/esm/SankeyChart/SankeyChart.d.ts +32 -0
- package/esm/SankeyChart/SankeyChart.js +155 -0
- package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -0
- package/esm/SankeyChart/SankeyChart.plugins.js +9 -0
- package/esm/SankeyChart/SankeyLinkElement.d.ts +27 -0
- package/esm/SankeyChart/SankeyLinkElement.js +46 -0
- package/esm/SankeyChart/SankeyLinkLabel.d.ts +12 -0
- package/esm/SankeyChart/SankeyLinkLabel.js +52 -0
- package/esm/SankeyChart/SankeyNodeElement.d.ts +27 -0
- package/esm/SankeyChart/SankeyNodeElement.js +69 -0
- package/esm/SankeyChart/SankeyPlot.d.ts +29 -0
- package/esm/SankeyChart/SankeyPlot.js +94 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.classes.d.ts +2 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.classes.js +19 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +7 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.js +202 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +10 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.js +1 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +7 -0
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.js +59 -0
- package/esm/SankeyChart/SankeyTooltip/index.d.ts +3 -0
- package/esm/SankeyChart/SankeyTooltip/index.js +3 -0
- package/esm/SankeyChart/calculateSankeyLayout.d.ts +13 -0
- package/esm/SankeyChart/calculateSankeyLayout.js +135 -0
- package/esm/SankeyChart/index.d.ts +9 -0
- package/esm/SankeyChart/index.js +6 -0
- package/esm/SankeyChart/sankey.types.d.ts +225 -0
- package/esm/SankeyChart/sankey.types.js +3 -0
- package/esm/SankeyChart/sankeyClasses.d.ts +15 -0
- package/esm/SankeyChart/sankeyClasses.js +19 -0
- package/esm/SankeyChart/sankeySlots.types.d.ts +24 -0
- package/esm/SankeyChart/sankeySlots.types.js +1 -0
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.d.ts +2 -0
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +47 -0
- package/esm/SankeyChart/seriesConfig/index.d.ts +2 -0
- package/esm/SankeyChart/seriesConfig/index.js +14 -0
- package/esm/SankeyChart/seriesConfig/tooltipGetter.d.ts +2 -0
- package/esm/SankeyChart/seriesConfig/tooltipGetter.js +39 -0
- package/esm/SankeyChart/useSankeyChartProps.d.ts +22 -0
- package/esm/SankeyChart/useSankeyChartProps.js +70 -0
- package/esm/SankeyChart/utils.d.ts +3 -0
- package/esm/SankeyChart/utils.js +14 -0
- package/esm/ScatterChartPro/ScatterChartPro.js +1 -37
- package/esm/hooks/useSankeySeries.d.ts +33 -0
- package/esm/hooks/useSankeySeries.js +42 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/internals/plugins/allPlugins.d.ts +2 -2
- package/esm/typeOverloads/modules.d.ts +11 -0
- package/hooks/useSankeySeries.d.ts +33 -0
- package/hooks/useSankeySeries.js +48 -0
- package/index.d.ts +1 -0
- package/index.js +13 -1
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/package.json +6 -6
- package/typeOverloads/modules.d.ts +11 -0
|
@@ -312,7 +312,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
312
312
|
disableLine: _propTypes.default.bool,
|
|
313
313
|
disableTicks: _propTypes.default.bool,
|
|
314
314
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
315
|
-
fill: _propTypes.default.string,
|
|
316
315
|
groups: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
317
316
|
getValue: _propTypes.default.func.isRequired,
|
|
318
317
|
tickLabelStyle: _propTypes.default.object,
|
|
@@ -332,7 +331,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
332
331
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
333
332
|
slotProps: _propTypes.default.object,
|
|
334
333
|
slots: _propTypes.default.object,
|
|
335
|
-
stroke: _propTypes.default.string,
|
|
336
334
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
337
335
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
338
336
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -383,7 +381,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
383
381
|
disableLine: _propTypes.default.bool,
|
|
384
382
|
disableTicks: _propTypes.default.bool,
|
|
385
383
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
386
|
-
fill: _propTypes.default.string,
|
|
387
384
|
groups: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
388
385
|
getValue: _propTypes.default.func.isRequired,
|
|
389
386
|
tickLabelStyle: _propTypes.default.object,
|
|
@@ -403,7 +400,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
403
400
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
404
401
|
slotProps: _propTypes.default.object,
|
|
405
402
|
slots: _propTypes.default.object,
|
|
406
|
-
stroke: _propTypes.default.string,
|
|
407
403
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
408
404
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
409
405
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -449,7 +445,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
449
445
|
disableLine: _propTypes.default.bool,
|
|
450
446
|
disableTicks: _propTypes.default.bool,
|
|
451
447
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
452
|
-
fill: _propTypes.default.string,
|
|
453
448
|
height: _propTypes.default.number,
|
|
454
449
|
hideTooltip: _propTypes.default.bool,
|
|
455
450
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -464,7 +459,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
464
459
|
scaleType: _propTypes.default.oneOf(['log']),
|
|
465
460
|
slotProps: _propTypes.default.object,
|
|
466
461
|
slots: _propTypes.default.object,
|
|
467
|
-
stroke: _propTypes.default.string,
|
|
468
462
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
469
463
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
470
464
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -511,7 +505,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
511
505
|
disableLine: _propTypes.default.bool,
|
|
512
506
|
disableTicks: _propTypes.default.bool,
|
|
513
507
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
514
|
-
fill: _propTypes.default.string,
|
|
515
508
|
height: _propTypes.default.number,
|
|
516
509
|
hideTooltip: _propTypes.default.bool,
|
|
517
510
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -526,7 +519,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
526
519
|
scaleType: _propTypes.default.oneOf(['symlog']),
|
|
527
520
|
slotProps: _propTypes.default.object,
|
|
528
521
|
slots: _propTypes.default.object,
|
|
529
|
-
stroke: _propTypes.default.string,
|
|
530
522
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
531
523
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
532
524
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -572,7 +564,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
572
564
|
disableLine: _propTypes.default.bool,
|
|
573
565
|
disableTicks: _propTypes.default.bool,
|
|
574
566
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
575
|
-
fill: _propTypes.default.string,
|
|
576
567
|
height: _propTypes.default.number,
|
|
577
568
|
hideTooltip: _propTypes.default.bool,
|
|
578
569
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -587,7 +578,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
587
578
|
scaleType: _propTypes.default.oneOf(['pow']),
|
|
588
579
|
slotProps: _propTypes.default.object,
|
|
589
580
|
slots: _propTypes.default.object,
|
|
590
|
-
stroke: _propTypes.default.string,
|
|
591
581
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
592
582
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
593
583
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -633,7 +623,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
633
623
|
disableLine: _propTypes.default.bool,
|
|
634
624
|
disableTicks: _propTypes.default.bool,
|
|
635
625
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
636
|
-
fill: _propTypes.default.string,
|
|
637
626
|
height: _propTypes.default.number,
|
|
638
627
|
hideTooltip: _propTypes.default.bool,
|
|
639
628
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -648,7 +637,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
648
637
|
scaleType: _propTypes.default.oneOf(['sqrt']),
|
|
649
638
|
slotProps: _propTypes.default.object,
|
|
650
639
|
slots: _propTypes.default.object,
|
|
651
|
-
stroke: _propTypes.default.string,
|
|
652
640
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
653
641
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
654
642
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -694,7 +682,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
694
682
|
disableLine: _propTypes.default.bool,
|
|
695
683
|
disableTicks: _propTypes.default.bool,
|
|
696
684
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
697
|
-
fill: _propTypes.default.string,
|
|
698
685
|
height: _propTypes.default.number,
|
|
699
686
|
hideTooltip: _propTypes.default.bool,
|
|
700
687
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -709,7 +696,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
709
696
|
scaleType: _propTypes.default.oneOf(['time']),
|
|
710
697
|
slotProps: _propTypes.default.object,
|
|
711
698
|
slots: _propTypes.default.object,
|
|
712
|
-
stroke: _propTypes.default.string,
|
|
713
699
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
714
700
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
715
701
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -755,7 +741,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
755
741
|
disableLine: _propTypes.default.bool,
|
|
756
742
|
disableTicks: _propTypes.default.bool,
|
|
757
743
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
758
|
-
fill: _propTypes.default.string,
|
|
759
744
|
height: _propTypes.default.number,
|
|
760
745
|
hideTooltip: _propTypes.default.bool,
|
|
761
746
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -770,7 +755,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
770
755
|
scaleType: _propTypes.default.oneOf(['utc']),
|
|
771
756
|
slotProps: _propTypes.default.object,
|
|
772
757
|
slots: _propTypes.default.object,
|
|
773
|
-
stroke: _propTypes.default.string,
|
|
774
758
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
775
759
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
776
760
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -816,7 +800,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
816
800
|
disableLine: _propTypes.default.bool,
|
|
817
801
|
disableTicks: _propTypes.default.bool,
|
|
818
802
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
819
|
-
fill: _propTypes.default.string,
|
|
820
803
|
height: _propTypes.default.number,
|
|
821
804
|
hideTooltip: _propTypes.default.bool,
|
|
822
805
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -831,7 +814,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
831
814
|
scaleType: _propTypes.default.oneOf(['linear']),
|
|
832
815
|
slotProps: _propTypes.default.object,
|
|
833
816
|
slots: _propTypes.default.object,
|
|
834
|
-
stroke: _propTypes.default.string,
|
|
835
817
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
836
818
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
837
819
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -890,7 +872,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
890
872
|
disableLine: _propTypes.default.bool,
|
|
891
873
|
disableTicks: _propTypes.default.bool,
|
|
892
874
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
893
|
-
fill: _propTypes.default.string,
|
|
894
875
|
groups: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
895
876
|
getValue: _propTypes.default.func.isRequired,
|
|
896
877
|
tickLabelStyle: _propTypes.default.object,
|
|
@@ -909,7 +890,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
909
890
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
910
891
|
slotProps: _propTypes.default.object,
|
|
911
892
|
slots: _propTypes.default.object,
|
|
912
|
-
stroke: _propTypes.default.string,
|
|
913
893
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
914
894
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
915
895
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -960,7 +940,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
960
940
|
disableLine: _propTypes.default.bool,
|
|
961
941
|
disableTicks: _propTypes.default.bool,
|
|
962
942
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
963
|
-
fill: _propTypes.default.string,
|
|
964
943
|
groups: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
965
944
|
getValue: _propTypes.default.func.isRequired,
|
|
966
945
|
tickLabelStyle: _propTypes.default.object,
|
|
@@ -979,7 +958,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
979
958
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
980
959
|
slotProps: _propTypes.default.object,
|
|
981
960
|
slots: _propTypes.default.object,
|
|
982
|
-
stroke: _propTypes.default.string,
|
|
983
961
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
984
962
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
985
963
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1025,7 +1003,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1025
1003
|
disableLine: _propTypes.default.bool,
|
|
1026
1004
|
disableTicks: _propTypes.default.bool,
|
|
1027
1005
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1028
|
-
fill: _propTypes.default.string,
|
|
1029
1006
|
hideTooltip: _propTypes.default.bool,
|
|
1030
1007
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1031
1008
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1039,7 +1016,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1039
1016
|
scaleType: _propTypes.default.oneOf(['log']),
|
|
1040
1017
|
slotProps: _propTypes.default.object,
|
|
1041
1018
|
slots: _propTypes.default.object,
|
|
1042
|
-
stroke: _propTypes.default.string,
|
|
1043
1019
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1044
1020
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1045
1021
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1086,7 +1062,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1086
1062
|
disableLine: _propTypes.default.bool,
|
|
1087
1063
|
disableTicks: _propTypes.default.bool,
|
|
1088
1064
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1089
|
-
fill: _propTypes.default.string,
|
|
1090
1065
|
hideTooltip: _propTypes.default.bool,
|
|
1091
1066
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1092
1067
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1100,7 +1075,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1100
1075
|
scaleType: _propTypes.default.oneOf(['symlog']),
|
|
1101
1076
|
slotProps: _propTypes.default.object,
|
|
1102
1077
|
slots: _propTypes.default.object,
|
|
1103
|
-
stroke: _propTypes.default.string,
|
|
1104
1078
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1105
1079
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1106
1080
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1146,7 +1120,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1146
1120
|
disableLine: _propTypes.default.bool,
|
|
1147
1121
|
disableTicks: _propTypes.default.bool,
|
|
1148
1122
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1149
|
-
fill: _propTypes.default.string,
|
|
1150
1123
|
hideTooltip: _propTypes.default.bool,
|
|
1151
1124
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1152
1125
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1160,7 +1133,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1160
1133
|
scaleType: _propTypes.default.oneOf(['pow']),
|
|
1161
1134
|
slotProps: _propTypes.default.object,
|
|
1162
1135
|
slots: _propTypes.default.object,
|
|
1163
|
-
stroke: _propTypes.default.string,
|
|
1164
1136
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1165
1137
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1166
1138
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1206,7 +1178,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1206
1178
|
disableLine: _propTypes.default.bool,
|
|
1207
1179
|
disableTicks: _propTypes.default.bool,
|
|
1208
1180
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1209
|
-
fill: _propTypes.default.string,
|
|
1210
1181
|
hideTooltip: _propTypes.default.bool,
|
|
1211
1182
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1212
1183
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1220,7 +1191,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1220
1191
|
scaleType: _propTypes.default.oneOf(['sqrt']),
|
|
1221
1192
|
slotProps: _propTypes.default.object,
|
|
1222
1193
|
slots: _propTypes.default.object,
|
|
1223
|
-
stroke: _propTypes.default.string,
|
|
1224
1194
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1225
1195
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1226
1196
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1266,7 +1236,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1266
1236
|
disableLine: _propTypes.default.bool,
|
|
1267
1237
|
disableTicks: _propTypes.default.bool,
|
|
1268
1238
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1269
|
-
fill: _propTypes.default.string,
|
|
1270
1239
|
hideTooltip: _propTypes.default.bool,
|
|
1271
1240
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1272
1241
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1280,7 +1249,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1280
1249
|
scaleType: _propTypes.default.oneOf(['time']),
|
|
1281
1250
|
slotProps: _propTypes.default.object,
|
|
1282
1251
|
slots: _propTypes.default.object,
|
|
1283
|
-
stroke: _propTypes.default.string,
|
|
1284
1252
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1285
1253
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1286
1254
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1326,7 +1294,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1326
1294
|
disableLine: _propTypes.default.bool,
|
|
1327
1295
|
disableTicks: _propTypes.default.bool,
|
|
1328
1296
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1329
|
-
fill: _propTypes.default.string,
|
|
1330
1297
|
hideTooltip: _propTypes.default.bool,
|
|
1331
1298
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1332
1299
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1340,7 +1307,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1340
1307
|
scaleType: _propTypes.default.oneOf(['utc']),
|
|
1341
1308
|
slotProps: _propTypes.default.object,
|
|
1342
1309
|
slots: _propTypes.default.object,
|
|
1343
|
-
stroke: _propTypes.default.string,
|
|
1344
1310
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1345
1311
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1346
1312
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -1386,7 +1352,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1386
1352
|
disableLine: _propTypes.default.bool,
|
|
1387
1353
|
disableTicks: _propTypes.default.bool,
|
|
1388
1354
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
1389
|
-
fill: _propTypes.default.string,
|
|
1390
1355
|
hideTooltip: _propTypes.default.bool,
|
|
1391
1356
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
1392
1357
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -1400,7 +1365,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
1400
1365
|
scaleType: _propTypes.default.oneOf(['linear']),
|
|
1401
1366
|
slotProps: _propTypes.default.object,
|
|
1402
1367
|
slots: _propTypes.default.object,
|
|
1403
|
-
stroke: _propTypes.default.string,
|
|
1404
1368
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
1405
1369
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
1406
1370
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
@@ -72,10 +72,10 @@ const PieChartPro = exports.PieChartPro = /*#__PURE__*/React.forwardRef(function
|
|
|
72
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
73
73
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
|
|
74
74
|
legendPosition: props.slotProps?.legend?.position,
|
|
75
|
-
legendDirection: props
|
|
75
|
+
legendDirection: props.slotProps?.legend?.direction ?? 'vertical',
|
|
76
76
|
sx: sx,
|
|
77
77
|
children: [showToolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, {}) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
|
|
78
|
-
direction: props
|
|
78
|
+
direction: props.slotProps?.legend?.direction ?? 'vertical',
|
|
79
79
|
slots: slots,
|
|
80
80
|
slotProps: slotProps
|
|
81
81
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
3
|
+
import type { MakeOptional } from '@mui/x-internals/types';
|
|
4
|
+
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
|
+
import { type SankeyPlotProps } from "./SankeyPlot.js";
|
|
6
|
+
import { type SankeyChartPluginsSignatures } from "./SankeyChart.plugins.js";
|
|
7
|
+
import type { SankeySeriesType } from "./sankey.types.js";
|
|
8
|
+
import type { SankeyChartSlotExtension } from "./sankeySlots.types.js";
|
|
9
|
+
export type SankeySeries = MakeOptional<SankeySeriesType, 'type'>;
|
|
10
|
+
export interface SankeyChartProps extends Omit<ChartContainerProProps<'sankey', SankeyChartPluginsSignatures>, 'plugins' | 'series' | 'slotProps' | 'slots' | 'dataset' | 'hideLegend' | 'skipAnimation' | 'highlightedItem' | 'onHighlightChange'>, Omit<SankeyPlotProps, 'data'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'>, SankeyChartSlotExtension {
|
|
11
|
+
/**
|
|
12
|
+
* The series to display in the Sankey chart.
|
|
13
|
+
* A single object is expected.
|
|
14
|
+
*/
|
|
15
|
+
series: SankeySeries;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Sankey Chart component
|
|
19
|
+
*
|
|
20
|
+
* Displays a Sankey diagram, visualizing flows between nodes where the width
|
|
21
|
+
* of the links is proportional to the flow quantity.
|
|
22
|
+
*
|
|
23
|
+
* Demos:
|
|
24
|
+
*
|
|
25
|
+
* - [Sankey Chart](https://mui.com/x/react-charts/sankey/)
|
|
26
|
+
*
|
|
27
|
+
* API:
|
|
28
|
+
*
|
|
29
|
+
* - [SankeyChart API](https://mui.com/x/api/charts/sankey-chart/)
|
|
30
|
+
*/
|
|
31
|
+
declare const SankeyChart: React.ForwardRefExoticComponent<SankeyChartProps & React.RefAttributes<SVGSVGElement>>;
|
|
32
|
+
export { SankeyChart };
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.SankeyChart = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
var _styles = require("@mui/material/styles");
|
|
14
|
+
var _ChartsSurface = require("@mui/x-charts/ChartsSurface");
|
|
15
|
+
var _ChartsOverlay = require("@mui/x-charts/ChartsOverlay");
|
|
16
|
+
var _ChartsWrapper = require("@mui/x-charts/ChartsWrapper");
|
|
17
|
+
var _ChartDataProviderPro = require("../ChartDataProviderPro");
|
|
18
|
+
var _useChartContainerProProps = require("../ChartContainerPro/useChartContainerProProps");
|
|
19
|
+
var _SankeyPlot = require("./SankeyPlot");
|
|
20
|
+
var _useSankeyChartProps = require("./useSankeyChartProps");
|
|
21
|
+
var _SankeyChart2 = require("./SankeyChart.plugins");
|
|
22
|
+
var _seriesConfig = require("./seriesConfig");
|
|
23
|
+
var _SankeyTooltip = require("./SankeyTooltip");
|
|
24
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
+
const seriesConfig = {
|
|
26
|
+
sankey: _seriesConfig.seriesConfig
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Sankey Chart component
|
|
30
|
+
*
|
|
31
|
+
* Displays a Sankey diagram, visualizing flows between nodes where the width
|
|
32
|
+
* of the links is proportional to the flow quantity.
|
|
33
|
+
*
|
|
34
|
+
* Demos:
|
|
35
|
+
*
|
|
36
|
+
* - [Sankey Chart](https://mui.com/x/react-charts/sankey/)
|
|
37
|
+
*
|
|
38
|
+
* API:
|
|
39
|
+
*
|
|
40
|
+
* - [SankeyChart API](https://mui.com/x/api/charts/sankey-chart/)
|
|
41
|
+
*/
|
|
42
|
+
const SankeyChart = exports.SankeyChart = /*#__PURE__*/React.forwardRef(function SankeyChart(props, ref) {
|
|
43
|
+
const themedProps = (0, _styles.useThemeProps)({
|
|
44
|
+
props,
|
|
45
|
+
name: 'MuiSankeyChart'
|
|
46
|
+
});
|
|
47
|
+
const {
|
|
48
|
+
chartContainerProps,
|
|
49
|
+
sankeyPlotProps,
|
|
50
|
+
overlayProps,
|
|
51
|
+
chartsWrapperProps,
|
|
52
|
+
children
|
|
53
|
+
} = (0, _useSankeyChartProps.useSankeyChartProps)(themedProps);
|
|
54
|
+
const {
|
|
55
|
+
chartDataProviderProProps,
|
|
56
|
+
chartsSurfaceProps
|
|
57
|
+
} = (0, _useChartContainerProProps.useChartContainerProProps)(chartContainerProps, ref);
|
|
58
|
+
const Tooltip = themedProps.slots?.tooltip ?? _SankeyTooltip.SankeyTooltip;
|
|
59
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProviderPro.ChartDataProviderPro, (0, _extends2.default)({}, chartDataProviderProProps, {
|
|
60
|
+
seriesConfig: seriesConfig,
|
|
61
|
+
plugins: _SankeyChart2.SANKEY_CHART_PLUGINS,
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, (0, _extends2.default)({}, chartsWrapperProps, {
|
|
63
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
|
|
64
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyPlot.SankeyPlot, (0, _extends2.default)({}, sankeyPlotProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsOverlay.ChartsOverlay, (0, _extends2.default)({}, overlayProps)), children]
|
|
65
|
+
})), !themedProps.loading && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tooltip, (0, _extends2.default)({
|
|
66
|
+
trigger: "item"
|
|
67
|
+
}, themedProps.slotProps?.tooltip))]
|
|
68
|
+
}))
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
if (process.env.NODE_ENV !== "production") SankeyChart.displayName = "SankeyChart";
|
|
72
|
+
process.env.NODE_ENV !== "production" ? SankeyChart.propTypes = {
|
|
73
|
+
// ----------------------------- Warning --------------------------------
|
|
74
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
75
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
76
|
+
// ----------------------------------------------------------------------
|
|
77
|
+
apiRef: _propTypes.default.shape({
|
|
78
|
+
current: _propTypes.default.object
|
|
79
|
+
}),
|
|
80
|
+
/**
|
|
81
|
+
* Classes applied to the various elements.
|
|
82
|
+
*/
|
|
83
|
+
classes: _propTypes.default.object,
|
|
84
|
+
className: _propTypes.default.string,
|
|
85
|
+
/**
|
|
86
|
+
* Color palette used to colorize multiple series.
|
|
87
|
+
* @default rainbowSurgePalette
|
|
88
|
+
*/
|
|
89
|
+
colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
|
|
90
|
+
desc: _propTypes.default.string,
|
|
91
|
+
/**
|
|
92
|
+
* Options to enable features planned for the next major.
|
|
93
|
+
*/
|
|
94
|
+
experimentalFeatures: _propTypes.default.shape({
|
|
95
|
+
preferStrictDomainInLineCharts: _propTypes.default.bool
|
|
96
|
+
}),
|
|
97
|
+
/**
|
|
98
|
+
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
99
|
+
*/
|
|
100
|
+
height: _propTypes.default.number,
|
|
101
|
+
/**
|
|
102
|
+
* This prop is used to help implement the accessibility logic.
|
|
103
|
+
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
104
|
+
*/
|
|
105
|
+
id: _propTypes.default.string,
|
|
106
|
+
/**
|
|
107
|
+
* If `true`, a loading overlay is displayed.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
loading: _propTypes.default.bool,
|
|
111
|
+
/**
|
|
112
|
+
* Localized text for chart components.
|
|
113
|
+
*/
|
|
114
|
+
localeText: _propTypes.default.object,
|
|
115
|
+
/**
|
|
116
|
+
* The margin between the SVG and the drawing area.
|
|
117
|
+
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
118
|
+
*
|
|
119
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
120
|
+
*/
|
|
121
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
122
|
+
bottom: _propTypes.default.number,
|
|
123
|
+
left: _propTypes.default.number,
|
|
124
|
+
right: _propTypes.default.number,
|
|
125
|
+
top: _propTypes.default.number
|
|
126
|
+
})]),
|
|
127
|
+
/**
|
|
128
|
+
* Callback fired when a sankey item is clicked.
|
|
129
|
+
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
130
|
+
* @param {SankeyLinkIdentifierWithData} link The sankey link identifier.
|
|
131
|
+
*/
|
|
132
|
+
onLinkClick: _propTypes.default.func,
|
|
133
|
+
/**
|
|
134
|
+
* Callback fired when a sankey item is clicked.
|
|
135
|
+
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
136
|
+
* @param {SankeyNodeIdentifierWithData} node The sankey node identifier.
|
|
137
|
+
*/
|
|
138
|
+
onNodeClick: _propTypes.default.func,
|
|
139
|
+
/**
|
|
140
|
+
* The series to display in the Sankey chart.
|
|
141
|
+
* A single object is expected.
|
|
142
|
+
*/
|
|
143
|
+
series: _propTypes.default.object.isRequired,
|
|
144
|
+
/**
|
|
145
|
+
* The props used for each component slot.
|
|
146
|
+
* @default {}
|
|
147
|
+
*/
|
|
148
|
+
slotProps: _propTypes.default.object,
|
|
149
|
+
/**
|
|
150
|
+
* Overridable component slots.
|
|
151
|
+
* @default {}
|
|
152
|
+
*/
|
|
153
|
+
slots: _propTypes.default.object,
|
|
154
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
155
|
+
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
156
|
+
title: _propTypes.default.string,
|
|
157
|
+
/**
|
|
158
|
+
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
159
|
+
*/
|
|
160
|
+
width: _propTypes.default.number
|
|
161
|
+
} : void 0;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
|
+
export type SankeyChartPluginsSignatures = [UseChartInteractionSignature, UseChartHighlightSignature];
|
|
3
|
+
export declare const SANKEY_CHART_PLUGINS: ConvertSignaturesIntoPlugins<SankeyChartPluginsSignatures>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SANKEY_CHART_PLUGINS = void 0;
|
|
7
|
+
var _internals = require("@mui/x-charts/internals");
|
|
8
|
+
require("../internals/plugins/useChartProExport");
|
|
9
|
+
const SANKEY_CHART_PLUGINS = exports.SANKEY_CHART_PLUGINS = [_internals.useChartInteraction, _internals.useChartHighlight
|
|
10
|
+
// useChartProExport,
|
|
11
|
+
];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SeriesId } from '@mui/x-charts/internals';
|
|
3
|
+
import { SankeyLayoutLink, type SankeyLinkIdentifierWithData } from "./sankey.types.js";
|
|
4
|
+
export interface SankeyLinkElementProps {
|
|
5
|
+
/**
|
|
6
|
+
* The series ID to which the link belongs
|
|
7
|
+
*/
|
|
8
|
+
seriesId: SeriesId;
|
|
9
|
+
/**
|
|
10
|
+
* The link data
|
|
11
|
+
*/
|
|
12
|
+
link: SankeyLayoutLink;
|
|
13
|
+
/**
|
|
14
|
+
* Opacity to apply to the link
|
|
15
|
+
*/
|
|
16
|
+
opacity?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Callback fired when a sankey item is clicked.
|
|
19
|
+
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
20
|
+
* @param {SankeyLinkIdentifierWithData} link The sankey link identifier.
|
|
21
|
+
*/
|
|
22
|
+
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, link: SankeyLinkIdentifierWithData) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @ignore - internal component.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SankeyLinkElement: React.ForwardRefExoticComponent<SankeyLinkElementProps & React.RefAttributes<SVGPathElement>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.SankeyLinkElement = void 0;
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
13
|
+
var _internals = require("@mui/x-charts/internals");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
/**
|
|
16
|
+
* @ignore - internal component.
|
|
17
|
+
*/
|
|
18
|
+
const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLinkElement(props, ref) {
|
|
19
|
+
const {
|
|
20
|
+
link,
|
|
21
|
+
opacity = 0.4,
|
|
22
|
+
onClick,
|
|
23
|
+
seriesId
|
|
24
|
+
} = props;
|
|
25
|
+
const identifier = {
|
|
26
|
+
type: 'sankey',
|
|
27
|
+
seriesId,
|
|
28
|
+
subType: 'link',
|
|
29
|
+
targetId: link.target.id,
|
|
30
|
+
sourceId: link.source.id,
|
|
31
|
+
link
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Add interaction props for tooltips
|
|
35
|
+
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
36
|
+
const handleClick = (0, _useEventCallback.default)(event => {
|
|
37
|
+
onClick?.(event, identifier);
|
|
38
|
+
});
|
|
39
|
+
if (!link.path) {
|
|
40
|
+
return null; // No path defined, nothing to render
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("path", (0, _extends2.default)({
|
|
43
|
+
ref: ref,
|
|
44
|
+
d: link.path,
|
|
45
|
+
fill: link.color,
|
|
46
|
+
opacity: opacity,
|
|
47
|
+
"data-link-source": link.source.id,
|
|
48
|
+
"data-link-target": link.target.id,
|
|
49
|
+
onClick: onClick ? handleClick : undefined,
|
|
50
|
+
cursor: onClick ? 'pointer' : 'default'
|
|
51
|
+
}, interactionProps));
|
|
52
|
+
});
|
|
53
|
+
if (process.env.NODE_ENV !== "production") SankeyLinkElement.displayName = "SankeyLinkElement";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SankeyLayoutLink } from "./sankey.types.js";
|
|
3
|
+
export interface SankeyLinkLabelProps {
|
|
4
|
+
/**
|
|
5
|
+
* The link data
|
|
6
|
+
*/
|
|
7
|
+
link: SankeyLayoutLink;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @ignore - internal component.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SankeyLinkLabel: React.ForwardRefExoticComponent<SankeyLinkLabelProps & React.RefAttributes<SVGTextElement>>;
|