@mui/x-charts-pro 8.21.0 → 8.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChartPro/BarChartPro.d.ts +5 -5
- package/BarChartPro/BarChartPro.js +20 -0
- package/BarChartPro/BarChartPro.plugins.d.ts +4 -4
- package/BarChartPro/BarChartPro.plugins.js +1 -1
- package/CHANGELOG.md +238 -1
- package/ChartContainerPro/ChartContainerPro.d.ts +4 -4
- package/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
- package/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSlider.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +9 -9
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +2 -2
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
- package/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/BarPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/ChartZoomSlider/internals/previews/LinePreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
- package/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +2 -2
- package/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
- package/ChartsToolbarPro/ChartsToolbarPro.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +1 -1
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
- package/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +1 -1
- package/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
- package/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
- package/FunnelChart/FunnelChart.d.ts +9 -9
- package/FunnelChart/FunnelChart.plugins.d.ts +4 -4
- package/FunnelChart/FunnelChart.plugins.js +1 -1
- package/FunnelChart/FunnelPlot.d.ts +2 -2
- package/FunnelChart/FunnelPlot.js +3 -3
- package/FunnelChart/FunnelSection.d.ts +2 -2
- package/FunnelChart/FunnelSectionLabel.d.ts +2 -2
- package/FunnelChart/categoryAxis.types.d.ts +2 -2
- package/FunnelChart/coordinateMapper.d.ts +2 -2
- package/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
- package/FunnelChart/curves/bump.d.ts +1 -1
- package/FunnelChart/curves/curve.types.d.ts +1 -1
- package/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/FunnelChart/curves/linear.d.ts +1 -1
- package/FunnelChart/curves/pyramid.d.ts +1 -1
- package/FunnelChart/curves/step-pyramid.d.ts +1 -1
- package/FunnelChart/curves/step.d.ts +1 -1
- package/FunnelChart/funnel.types.d.ts +5 -5
- package/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +2 -2
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
- package/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
- package/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
- package/FunnelChart/funnelSlots.types.d.ts +6 -6
- package/FunnelChart/labelUtils.d.ts +2 -2
- package/FunnelChart/seriesConfig/extremums.d.ts +1 -1
- package/FunnelChart/seriesConfig/getColor.d.ts +1 -1
- package/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/FunnelChart/seriesConfig/legend.d.ts +1 -1
- package/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
- package/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/FunnelChart/useFunnelChartProps.d.ts +7 -7
- package/Heatmap/Heatmap.d.ts +13 -13
- package/Heatmap/Heatmap.js +10 -0
- package/Heatmap/Heatmap.plugins.d.ts +3 -3
- package/Heatmap/Heatmap.plugins.js +1 -1
- package/Heatmap/HeatmapItem.d.ts +2 -2
- package/Heatmap/HeatmapPlot.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
- package/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/Heatmap/seriesConfig/extremums.d.ts +1 -1
- package/Heatmap/seriesConfig/getColor.d.ts +1 -1
- package/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/Heatmap/seriesConfig/index.d.ts +1 -1
- package/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
- package/Heatmap/seriesConfig/tooltip.d.ts +1 -1
- package/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
- package/LineChartPro/LineChartPro.d.ts +5 -5
- package/LineChartPro/LineChartPro.js +20 -0
- package/LineChartPro/LineChartPro.plugins.d.ts +4 -4
- package/LineChartPro/LineChartPro.plugins.js +1 -1
- package/PieChartPro/PieChartPro.d.ts +5 -5
- package/PieChartPro/PieChartPro.plugins.d.ts +3 -3
- package/RadarChartPro/RadarChartPro.d.ts +4 -4
- package/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
- package/RadarChartPro/RadarChartPro.plugins.js +1 -1
- package/SankeyChart/SankeyChart.d.ts +1 -1
- package/SankeyChart/SankeyChart.plugins.d.ts +3 -3
- package/SankeyChart/SankeyChart.plugins.js +1 -1
- package/SankeyChart/SankeyLinkElement.js +2 -2
- package/SankeyChart/SankeyLinkLabel.d.ts +1 -1
- package/SankeyChart/SankeyNodeElement.d.ts +0 -4
- package/SankeyChart/SankeyNodeElement.js +5 -24
- package/SankeyChart/SankeyNodeLabel.d.ts +12 -0
- package/SankeyChart/SankeyNodeLabel.js +61 -0
- package/SankeyChart/SankeyPlot.js +10 -7
- package/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
- package/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/SankeyChart/calculateSankeyLayout.d.ts +2 -2
- package/SankeyChart/calculateSankeyLayout.js +12 -33
- package/SankeyChart/d3Sankey/align.d.ts +4 -4
- package/SankeyChart/d3Sankey/sankey.d.ts +3 -3
- package/SankeyChart/d3Sankey/sankey.js +4 -1
- package/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
- package/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
- package/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
- package/SankeyChart/plugins/useSankeyHighlight.js +1 -1
- package/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
- package/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
- package/SankeyChart/sankey.types.d.ts +32 -24
- package/SankeyChart/sankeyClasses.d.ts +3 -1
- package/SankeyChart/sankeyClasses.js +2 -1
- package/SankeyChart/sankeySlots.types.d.ts +4 -4
- package/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
- package/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
- package/SankeyChart/utils.d.ts +1 -1
- package/ScatterChartPro/ScatterChartPro.d.ts +6 -6
- package/ScatterChartPro/ScatterChartPro.js +20 -0
- package/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
- package/ScatterChartPro/ScatterChartPro.plugins.js +1 -1
- package/context/ChartProApi.d.ts +10 -10
- package/context/useChartProApiContext.d.ts +1 -1
- package/esm/BarChartPro/BarChartPro.d.ts +5 -5
- package/esm/BarChartPro/BarChartPro.js +20 -0
- package/esm/BarChartPro/BarChartPro.plugins.d.ts +4 -4
- package/esm/BarChartPro/BarChartPro.plugins.js +2 -2
- package/esm/ChartContainerPro/ChartContainerPro.d.ts +4 -4
- package/esm/ChartContainerPro/useChartContainerProProps.d.ts +4 -4
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +4 -4
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +1 -1
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSlider.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderActiveTrack.js +10 -10
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreview.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderPreviewContent.js +2 -2
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/ChartAxisZoomSliderTrack.js +3 -3
- package/esm/ChartZoomSlider/internals/ChartsTooltipZoomSliderValue.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/AreaPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/BarPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.d.ts +2 -2
- package/esm/ChartZoomSlider/internals/previews/LinePreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/previews/PreviewPlot.types.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.d.ts +1 -1
- package/esm/ChartZoomSlider/internals/previews/ScatterPreviewPlot.js +3 -3
- package/esm/ChartZoomSlider/internals/zoom-utils.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarImageExportTrigger.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPrintExportTrigger.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPro.d.ts +3 -3
- package/esm/ChartsToolbarPro/ChartsToolbarPro.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomInTrigger.js +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.d.ts +2 -2
- package/esm/ChartsToolbarPro/ChartsToolbarZoomOutTrigger.js +2 -2
- package/esm/ChartsToolbarPro/Toolbar.types.d.ts +2 -2
- package/esm/ChartsToolbarPro/internals/ChartsMenu.d.ts +1 -1
- package/esm/ChartsToolbarPro/internals/ChartsToolbarDivider.d.ts +1 -1
- package/esm/FunnelChart/FunnelChart.d.ts +9 -9
- package/esm/FunnelChart/FunnelChart.plugins.d.ts +4 -4
- package/esm/FunnelChart/FunnelChart.plugins.js +2 -2
- package/esm/FunnelChart/FunnelPlot.d.ts +2 -2
- package/esm/FunnelChart/FunnelPlot.js +4 -4
- package/esm/FunnelChart/FunnelSection.d.ts +2 -2
- package/esm/FunnelChart/FunnelSectionLabel.d.ts +2 -2
- package/esm/FunnelChart/categoryAxis.types.d.ts +2 -2
- package/esm/FunnelChart/coordinateMapper.d.ts +2 -2
- package/esm/FunnelChart/curves/borderRadiusPolygon.d.ts +1 -1
- package/esm/FunnelChart/curves/bump.d.ts +1 -1
- package/esm/FunnelChart/curves/curve.types.d.ts +1 -1
- package/esm/FunnelChart/curves/getFunnelCurve.d.ts +1 -1
- package/esm/FunnelChart/curves/linear.d.ts +1 -1
- package/esm/FunnelChart/curves/pyramid.d.ts +1 -1
- package/esm/FunnelChart/curves/step-pyramid.d.ts +1 -1
- package/esm/FunnelChart/curves/step.d.ts +1 -1
- package/esm/FunnelChart/funnel.types.d.ts +5 -5
- package/esm/FunnelChart/funnelAxisPlugin/computeAxisValue.d.ts +4 -4
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.d.ts +2 -2
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.js +3 -3
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxis.types.d.ts +1 -1
- package/esm/FunnelChart/funnelAxisPlugin/useChartFunnelAxisRendering.selectors.d.ts +2 -2
- package/esm/FunnelChart/funnelPlotSlots.types.d.ts +2 -2
- package/esm/FunnelChart/funnelSlots.types.d.ts +6 -6
- package/esm/FunnelChart/labelUtils.d.ts +2 -2
- package/esm/FunnelChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/legend.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/FunnelChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/FunnelChart/useFunnelChartProps.d.ts +7 -7
- package/esm/Heatmap/Heatmap.d.ts +13 -13
- package/esm/Heatmap/Heatmap.js +10 -0
- package/esm/Heatmap/Heatmap.plugins.d.ts +3 -3
- package/esm/Heatmap/Heatmap.plugins.js +2 -2
- package/esm/Heatmap/HeatmapItem.d.ts +2 -2
- package/esm/Heatmap/HeatmapPlot.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.classes.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltip.types.d.ts +1 -1
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipContent.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/extremums.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/getColor.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/index.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/tooltip.d.ts +1 -1
- package/esm/Heatmap/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/LineChartPro/LineChartPro.d.ts +5 -5
- package/esm/LineChartPro/LineChartPro.js +20 -0
- package/esm/LineChartPro/LineChartPro.plugins.d.ts +4 -4
- package/esm/LineChartPro/LineChartPro.plugins.js +2 -2
- package/esm/PieChartPro/PieChartPro.d.ts +5 -5
- package/esm/PieChartPro/PieChartPro.plugins.d.ts +3 -3
- package/esm/RadarChartPro/RadarChartPro.d.ts +4 -4
- package/esm/RadarChartPro/RadarChartPro.plugins.d.ts +3 -3
- package/esm/RadarChartPro/RadarChartPro.plugins.js +2 -2
- package/esm/SankeyChart/SankeyChart.d.ts +1 -1
- package/esm/SankeyChart/SankeyChart.plugins.d.ts +3 -3
- package/esm/SankeyChart/SankeyChart.plugins.js +2 -2
- package/esm/SankeyChart/SankeyLinkElement.js +3 -3
- package/esm/SankeyChart/SankeyLinkLabel.d.ts +1 -1
- package/esm/SankeyChart/SankeyNodeElement.d.ts +0 -4
- package/esm/SankeyChart/SankeyNodeElement.js +7 -26
- package/esm/SankeyChart/SankeyNodeLabel.d.ts +12 -0
- package/esm/SankeyChart/SankeyNodeLabel.js +55 -0
- package/esm/SankeyChart/SankeyPlot.js +10 -7
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.d.ts +1 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltip.types.d.ts +1 -1
- package/esm/SankeyChart/SankeyTooltip/SankeyTooltipContent.d.ts +1 -1
- package/esm/SankeyChart/calculateSankeyLayout.d.ts +2 -2
- package/esm/SankeyChart/calculateSankeyLayout.js +12 -33
- package/esm/SankeyChart/d3Sankey/align.d.ts +4 -4
- package/esm/SankeyChart/d3Sankey/sankey.d.ts +3 -3
- package/esm/SankeyChart/d3Sankey/sankey.js +4 -1
- package/esm/SankeyChart/d3Sankey/sankey.types.d.ts +76 -39
- package/esm/SankeyChart/d3Sankey/sankeyLinkHorizontal.d.ts +2 -2
- package/esm/SankeyChart/plugins/useSankeyHighlight.d.ts +1 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.js +1 -1
- package/esm/SankeyChart/plugins/useSankeyHighlight.selectors.d.ts +2 -2
- package/esm/SankeyChart/plugins/useSankeyHighlight.types.d.ts +3 -3
- package/esm/SankeyChart/sankey.types.d.ts +32 -24
- package/esm/SankeyChart/sankeyClasses.d.ts +3 -1
- package/esm/SankeyChart/sankeyClasses.js +2 -1
- package/esm/SankeyChart/sankeySlots.types.d.ts +4 -4
- package/esm/SankeyChart/seriesConfig/getSeriesWithDefaultValues.js +63 -14
- package/esm/SankeyChart/seriesConfig/tooltipGetter.js +5 -2
- package/esm/SankeyChart/utils.d.ts +1 -1
- package/esm/ScatterChartPro/ScatterChartPro.d.ts +6 -6
- package/esm/ScatterChartPro/ScatterChartPro.js +20 -0
- package/esm/ScatterChartPro/ScatterChartPro.plugins.d.ts +4 -4
- package/esm/ScatterChartPro/ScatterChartPro.plugins.js +2 -2
- package/esm/context/ChartProApi.d.ts +10 -10
- package/esm/context/useChartProApiContext.d.ts +1 -1
- package/esm/hooks/useChartProApiRef.d.ts +3 -3
- package/esm/hooks/useFunnelSeries.d.ts +1 -1
- package/esm/hooks/useHeatmapSeries.d.ts +1 -1
- package/esm/hooks/useSankeySeries.d.ts +2 -2
- package/esm/hooks/useSankeySeries.js +3 -2
- package/esm/hooks/zoom/useIsZoomInteracting.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -0
- package/esm/internals/index.js +1 -0
- package/esm/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/esm/internals/material/components/BasePopper.d.ts +1 -1
- package/esm/internals/material/index.d.ts +3 -3
- package/esm/internals/plugins/allPlugins.d.ts +7 -7
- package/esm/internals/plugins/allPlugins.js +3 -3
- package/esm/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/esm/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
- package/esm/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +3 -3
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +4 -4
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +4 -4
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +3 -3
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/esm/internals/slots/chartBaseSlotProps.d.ts +1 -1
- package/esm/internals/slots/chartsBaseSlots.d.ts +3 -3
- package/esm/internals/slots/chartsIconSlots.d.ts +2 -2
- package/esm/models/seriesType/heatmap.d.ts +2 -2
- package/esm/themeAugmentation/components.d.ts +1 -1
- package/esm/themeAugmentation/overrides.d.ts +1 -1
- package/esm/themeAugmentation/props.d.ts +4 -4
- package/esm/typeOverloads/modules.d.ts +7 -7
- package/hooks/useChartProApiRef.d.ts +3 -3
- package/hooks/useFunnelSeries.d.ts +1 -1
- package/hooks/useHeatmapSeries.d.ts +1 -1
- package/hooks/useSankeySeries.d.ts +2 -2
- package/hooks/useSankeySeries.js +2 -1
- package/hooks/zoom/useIsZoomInteracting.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +12 -0
- package/internals/material/components/BaseMenuItem.d.ts +1 -1
- package/internals/material/components/BasePopper.d.ts +1 -1
- package/internals/material/index.d.ts +3 -3
- package/internals/plugins/allPlugins.d.ts +7 -7
- package/internals/plugins/allPlugins.js +2 -2
- package/internals/plugins/useChartProExport/exportImage.d.ts +1 -1
- package/internals/plugins/useChartProExport/print.d.ts +1 -1
- package/internals/plugins/useChartProExport/useChartProExport.d.ts +2 -2
- package/internals/plugins/useChartProExport/useChartProExport.types.d.ts +1 -1
- package/internals/plugins/useChartProZoom/calculateZoom.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnPressAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/usePanOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoom.utils.d.ts +1 -1
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnBrush.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnDoubleTapReset.js +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnPinch.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnTapAndDrag.js +3 -3
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.d.ts +2 -2
- package/internals/plugins/useChartProZoom/gestureHooks/useZoomOnWheel.js +3 -3
- package/internals/plugins/useChartProZoom/useChartProZoom.d.ts +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.js +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +2 -2
- package/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +2 -2
- package/internals/slots/chartBaseSlotProps.d.ts +1 -1
- package/internals/slots/chartsBaseSlots.d.ts +3 -3
- package/internals/slots/chartsIconSlots.d.ts +2 -2
- package/models/seriesType/heatmap.d.ts +2 -2
- package/package.json +5 -5
- package/themeAugmentation/components.d.ts +1 -1
- package/themeAugmentation/overrides.d.ts +1 -1
- package/themeAugmentation/props.d.ts +4 -4
- package/typeOverloads/modules.d.ts +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
1
|
+
import { type ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
2
2
|
export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
|
|
3
3
|
/**
|
|
4
4
|
* Select the kind of tooltip to display
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
1
|
+
import { type HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
2
|
export interface HeatmapTooltipContentProps extends Pick<HeatmapTooltipProps, 'classes'> {}
|
|
3
3
|
export declare function HeatmapTooltipContent(props: HeatmapTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
export declare namespace HeatmapTooltipContent {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CartesianExtremumGetter } from '@mui/x-charts/internals';
|
|
1
|
+
import { type CartesianExtremumGetter } from '@mui/x-charts/internals';
|
|
2
2
|
export declare const getBaseExtremum: CartesianExtremumGetter<'heatmap'>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
|
|
1
|
+
import { type GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
|
|
2
2
|
declare const getSeriesWithDefaultValues: GetSeriesWithDefaultValues<'heatmap'>;
|
|
3
3
|
export default getSeriesWithDefaultValues;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
|
|
1
|
+
import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
|
|
2
2
|
export declare const heatmapSeriesConfig: ChartSeriesTypeConfig<'heatmap'>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { LineChartProps, LineChartSlots, LineChartSlotProps } from '@mui/x-charts/LineChart';
|
|
3
|
-
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
6
|
-
import { LineChartProPluginSignatures } from "./LineChartPro.plugins.js";
|
|
2
|
+
import { type LineChartProps, type LineChartSlots, type LineChartSlotProps } from '@mui/x-charts/LineChart';
|
|
3
|
+
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
4
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
5
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
6
|
+
import { type LineChartProPluginSignatures } from "./LineChartPro.plugins.js";
|
|
7
7
|
export interface LineChartProSlots extends Omit<LineChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
8
|
export interface LineChartProSlotProps extends Omit<LineChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
9
|
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'line', LineChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps'> {
|
|
@@ -334,6 +334,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
334
334
|
label: _propTypes.default.string,
|
|
335
335
|
labelStyle: _propTypes.default.object,
|
|
336
336
|
offset: _propTypes.default.number,
|
|
337
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
338
|
+
format: _propTypes.default.func.isRequired,
|
|
339
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
340
|
+
isTick: _propTypes.default.func.isRequired
|
|
341
|
+
})]).isRequired),
|
|
337
342
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
338
343
|
reverse: _propTypes.default.bool,
|
|
339
344
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
@@ -402,6 +407,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
402
407
|
label: _propTypes.default.string,
|
|
403
408
|
labelStyle: _propTypes.default.object,
|
|
404
409
|
offset: _propTypes.default.number,
|
|
410
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
411
|
+
format: _propTypes.default.func.isRequired,
|
|
412
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
413
|
+
isTick: _propTypes.default.func.isRequired
|
|
414
|
+
})]).isRequired),
|
|
405
415
|
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
406
416
|
reverse: _propTypes.default.bool,
|
|
407
417
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
@@ -906,6 +916,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
906
916
|
label: _propTypes.default.string,
|
|
907
917
|
labelStyle: _propTypes.default.object,
|
|
908
918
|
offset: _propTypes.default.number,
|
|
919
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
920
|
+
format: _propTypes.default.func.isRequired,
|
|
921
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
922
|
+
isTick: _propTypes.default.func.isRequired
|
|
923
|
+
})]).isRequired),
|
|
909
924
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
910
925
|
reverse: _propTypes.default.bool,
|
|
911
926
|
scaleType: _propTypes.default.oneOf(['band']),
|
|
@@ -973,6 +988,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
973
988
|
label: _propTypes.default.string,
|
|
974
989
|
labelStyle: _propTypes.default.object,
|
|
975
990
|
offset: _propTypes.default.number,
|
|
991
|
+
ordinalTimeTicks: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), _propTypes.default.shape({
|
|
992
|
+
format: _propTypes.default.func.isRequired,
|
|
993
|
+
getTickNumber: _propTypes.default.func.isRequired,
|
|
994
|
+
isTick: _propTypes.default.func.isRequired
|
|
995
|
+
})]).isRequired),
|
|
976
996
|
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
977
997
|
reverse: _propTypes.default.bool,
|
|
978
998
|
scaleType: _propTypes.default.oneOf(['point']),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartBrushSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
import { UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartBrushSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
import { type UseChartProZoomSignature } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
+
export type LineChartProPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'line'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProZoomSignature, UseChartProExportSignature];
|
|
5
5
|
export declare const LINE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<LineChartProPluginSignatures>;
|
|
@@ -7,4 +7,4 @@ exports.LINE_CHART_PRO_PLUGINS = void 0;
|
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
9
|
var _useChartProZoom = require("../internals/plugins/useChartProZoom");
|
|
10
|
-
const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
10
|
+
const LINE_CHART_PRO_PLUGINS = exports.LINE_CHART_PRO_PLUGINS = [_internals.useChartZAxis, _internals.useChartBrush, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartCartesianAxis, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _useChartProZoom.useChartProZoom, _useChartProExport.useChartProExport];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PieChartProps, PieChartSlotProps, PieChartSlots } from '@mui/x-charts/PieChart';
|
|
3
|
-
import { ChartsSlotsPro, ChartsSlotPropsPro } from "../internals/material/index.js";
|
|
4
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
|
-
import { PieChartProPluginSignatures } from "./PieChartPro.plugins.js";
|
|
6
|
-
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
2
|
+
import { type PieChartProps, type PieChartSlotProps, type PieChartSlots } from '@mui/x-charts/PieChart';
|
|
3
|
+
import { type ChartsSlotsPro, type ChartsSlotPropsPro } from "../internals/material/index.js";
|
|
4
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
|
+
import { type PieChartProPluginSignatures } from "./PieChartPro.plugins.js";
|
|
6
|
+
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
7
7
|
export interface PieChartProSlots extends Omit<PieChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
8
8
|
export interface PieChartProSlotProps extends Omit<PieChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
9
9
|
export interface PieChartProProps extends Omit<PieChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<ChartContainerProProps<'pie', PieChartProPluginSignatures>, 'series' | 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature, UseChartKeyboardNavigationSignature } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type PieChartProPluginSignatures = [UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
|
|
1
|
+
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartKeyboardNavigationSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
export type PieChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature, UseChartProExportSignature];
|
|
4
4
|
export declare const PIE_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<PieChartProPluginSignatures>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RadarChartProps, RadarDataProviderProps, RadarChartSlotProps, RadarChartSlots } from '@mui/x-charts/RadarChart';
|
|
3
|
-
import { RadarChartProPluginSignatures } from "./RadarChartPro.plugins.js";
|
|
4
|
-
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
5
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
2
|
+
import { type RadarChartProps, type RadarDataProviderProps, type RadarChartSlotProps, type RadarChartSlots } from '@mui/x-charts/RadarChart';
|
|
3
|
+
import { type RadarChartProPluginSignatures } from "./RadarChartPro.plugins.js";
|
|
4
|
+
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
5
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
6
6
|
export interface RadarChartProSlots extends Omit<RadarChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
|
|
7
7
|
export interface RadarChartProSlotProps extends Omit<RadarChartSlotProps, 'toolbar'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {}
|
|
8
8
|
export interface RadarChartProProps extends Omit<RadarChartProps, 'apiRef' | 'slots' | 'slotProps'>, Omit<RadarDataProviderProps<RadarChartProPluginSignatures>, 'plugins' | 'seriesConfig' | 'slots' | 'slotProps' | 'experimentalFeatures'> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConvertSignaturesIntoPlugins, UseChartHighlightSignature, UseChartInteractionSignature, UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type RadarChartProPluginSignatures = [UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
1
|
+
import { type ConvertSignaturesIntoPlugins, type UseChartHighlightSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartPolarAxisSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
export type RadarChartProPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
4
|
export declare const RADAR_CHART_PRO_PLUGINS: ConvertSignaturesIntoPlugins<RadarChartProPluginSignatures>;
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RADAR_CHART_PRO_PLUGINS = void 0;
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
|
-
const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [_internals.useChartInteraction, _internals.useChartPolarAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport];
|
|
9
|
+
const RADAR_CHART_PRO_PLUGINS = exports.RADAR_CHART_PRO_PLUGINS = [_internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartPolarAxis, _internals.useChartHighlight, _useChartProExport.useChartProExport];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
3
3
|
import type { MakeOptional } from '@mui/x-internals/types';
|
|
4
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
4
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
5
5
|
import { type SankeyPlotProps } from "./SankeyPlot.js";
|
|
6
6
|
import { type SankeyChartPluginSignatures } from "./SankeyChart.plugins.js";
|
|
7
7
|
import type { SankeySeriesType } from "./sankey.types.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConvertSignaturesIntoPlugins, UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
1
|
+
import { type ConvertSignaturesIntoPlugins, type UseChartTooltipSignature, type UseChartInteractionSignature } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { type UseSankeyHighlightSignature } from "./plugins/index.js";
|
|
4
|
-
export type SankeyChartPluginSignatures = [UseChartInteractionSignature, UseSankeyHighlightSignature, UseChartProExportSignature];
|
|
4
|
+
export type SankeyChartPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseSankeyHighlightSignature, UseChartProExportSignature];
|
|
5
5
|
export declare const SANKEY_CHART_PLUGINS: ConvertSignaturesIntoPlugins<SankeyChartPluginSignatures>;
|
|
@@ -7,4 +7,4 @@ exports.SANKEY_CHART_PLUGINS = void 0;
|
|
|
7
7
|
var _internals = require("@mui/x-charts/internals");
|
|
8
8
|
var _useChartProExport = require("../internals/plugins/useChartProExport");
|
|
9
9
|
var _plugins = require("./plugins");
|
|
10
|
-
const SANKEY_CHART_PLUGINS = exports.SANKEY_CHART_PLUGINS = [_internals.useChartInteraction, _plugins.useSankeyHighlight, _useChartProExport.useChartProExport];
|
|
10
|
+
const SANKEY_CHART_PLUGINS = exports.SANKEY_CHART_PLUGINS = [_internals.useChartTooltip, _internals.useChartInteraction, _plugins.useSankeyHighlight, _useChartProExport.useChartProExport];
|
|
@@ -33,8 +33,8 @@ const SankeyLinkElement = exports.SankeyLinkElement = /*#__PURE__*/React.forward
|
|
|
33
33
|
sourceId: link.source.id,
|
|
34
34
|
link
|
|
35
35
|
};
|
|
36
|
-
const isHighlighted =
|
|
37
|
-
const isFaded =
|
|
36
|
+
const isHighlighted = store.use(_plugins.selectorIsLinkHighlighted, link);
|
|
37
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
38
38
|
|
|
39
39
|
// Add interaction props for tooltips
|
|
40
40
|
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
@@ -10,10 +10,6 @@ export interface SankeyNodeElementProps {
|
|
|
10
10
|
* The node data
|
|
11
11
|
*/
|
|
12
12
|
node: SankeyLayoutNode;
|
|
13
|
-
/**
|
|
14
|
-
* Whether to show the node label
|
|
15
|
-
*/
|
|
16
|
-
showLabel?: boolean;
|
|
17
13
|
/**
|
|
18
14
|
* Callback fired when a sankey item is clicked.
|
|
19
15
|
* @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
|
|
@@ -11,7 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
13
13
|
var _internals = require("@mui/x-charts/internals");
|
|
14
|
-
var _styles = require("@mui/material/styles");
|
|
15
14
|
var _plugins = require("./plugins");
|
|
16
15
|
var _useSankeyHighlight = require("./plugins/useSankeyHighlight.selectors");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -21,11 +20,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
20
|
const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNodeElement(props, ref) {
|
|
22
21
|
const {
|
|
23
22
|
node,
|
|
24
|
-
showLabel = true,
|
|
25
23
|
onClick,
|
|
26
24
|
seriesId
|
|
27
25
|
} = props;
|
|
28
|
-
const theme = (0, _styles.useTheme)();
|
|
29
26
|
const store = (0, _internals.useStore)();
|
|
30
27
|
const x0 = node.x0 ?? 0;
|
|
31
28
|
const y0 = node.y0 ?? 0;
|
|
@@ -33,12 +30,6 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
|
|
|
33
30
|
const y1 = node.y1 ?? 0;
|
|
34
31
|
const nodeWidth = x1 - x0;
|
|
35
32
|
const nodeHeight = y1 - y0;
|
|
36
|
-
|
|
37
|
-
// Determine label position
|
|
38
|
-
const labelX = node.depth === 0 ? x1 + 6 // Right side for first column
|
|
39
|
-
: x0 - 6; // Left side for other columns
|
|
40
|
-
|
|
41
|
-
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
42
33
|
const identifier = {
|
|
43
34
|
type: 'sankey',
|
|
44
35
|
seriesId,
|
|
@@ -46,8 +37,8 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
|
|
|
46
37
|
nodeId: node.id,
|
|
47
38
|
node
|
|
48
39
|
};
|
|
49
|
-
const isHighlighted =
|
|
50
|
-
const isFaded =
|
|
40
|
+
const isHighlighted = store.use(_plugins.selectorIsNodeHighlighted, node.id);
|
|
41
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
51
42
|
|
|
52
43
|
// Add interaction props for tooltips
|
|
53
44
|
const interactionProps = (0, _internals.useInteractionItemProps)(identifier);
|
|
@@ -60,10 +51,10 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
|
|
|
60
51
|
} else if (isHighlighted) {
|
|
61
52
|
opacity = 1;
|
|
62
53
|
}
|
|
63
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
64
55
|
ref: ref,
|
|
65
56
|
"data-node": node.id,
|
|
66
|
-
children:
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", (0, _extends2.default)({
|
|
67
58
|
x: node.x0,
|
|
68
59
|
y: node.y0,
|
|
69
60
|
width: nodeWidth,
|
|
@@ -75,17 +66,7 @@ const SankeyNodeElement = exports.SankeyNodeElement = /*#__PURE__*/React.forward
|
|
|
75
66
|
stroke: "none",
|
|
76
67
|
"data-highlighted": isHighlighted || undefined,
|
|
77
68
|
"data-faded": isFaded || undefined
|
|
78
|
-
}, interactionProps))
|
|
79
|
-
x: labelX,
|
|
80
|
-
y: (y0 + y1) / 2,
|
|
81
|
-
textAnchor: labelAnchor,
|
|
82
|
-
fill: (theme.vars || theme).palette.text.primary,
|
|
83
|
-
fontSize: theme.typography.caption.fontSize,
|
|
84
|
-
fontFamily: theme.typography.fontFamily,
|
|
85
|
-
pointerEvents: "none",
|
|
86
|
-
opacity: opacity,
|
|
87
|
-
children: node.label
|
|
88
|
-
})]
|
|
69
|
+
}, interactionProps))
|
|
89
70
|
});
|
|
90
71
|
});
|
|
91
72
|
if (process.env.NODE_ENV !== "production") SankeyNodeElement.displayName = "SankeyNodeElement";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SankeyLayoutNode } from "./sankey.types.js";
|
|
3
|
+
export interface SankeyNodeLabelProps {
|
|
4
|
+
/**
|
|
5
|
+
* The node data
|
|
6
|
+
*/
|
|
7
|
+
node: SankeyLayoutNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @ignore - internal component.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SankeyNodeLabel: React.ForwardRefExoticComponent<SankeyNodeLabelProps & React.RefAttributes<SVGTextElement>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SankeyNodeLabel = void 0;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _internals = require("@mui/x-charts/internals");
|
|
11
|
+
var _styles = require("@mui/material/styles");
|
|
12
|
+
var _plugins = require("./plugins");
|
|
13
|
+
var _useSankeyHighlight = require("./plugins/useSankeyHighlight.selectors");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
/**
|
|
16
|
+
* @ignore - internal component.
|
|
17
|
+
*/
|
|
18
|
+
const SankeyNodeLabel = exports.SankeyNodeLabel = /*#__PURE__*/React.forwardRef(function SankeyNodeLabel(props, ref) {
|
|
19
|
+
const {
|
|
20
|
+
node
|
|
21
|
+
} = props;
|
|
22
|
+
const theme = (0, _styles.useTheme)();
|
|
23
|
+
const store = (0, _internals.useStore)();
|
|
24
|
+
const x0 = node.x0 ?? 0;
|
|
25
|
+
const y0 = node.y0 ?? 0;
|
|
26
|
+
const x1 = node.x1 ?? 0;
|
|
27
|
+
const y1 = node.y1 ?? 0;
|
|
28
|
+
|
|
29
|
+
// Determine label position
|
|
30
|
+
const labelX = node.depth === 0 ? x1 + 6 // Right side for first column
|
|
31
|
+
: x0 - 6; // Left side for other columns
|
|
32
|
+
|
|
33
|
+
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
34
|
+
const isHighlighted = store.use(_plugins.selectorIsNodeHighlighted, node.id);
|
|
35
|
+
const isFaded = store.use(_useSankeyHighlight.selectorIsSankeyItemFaded, isHighlighted);
|
|
36
|
+
let opacity = 1;
|
|
37
|
+
if (isFaded) {
|
|
38
|
+
opacity = 0.3;
|
|
39
|
+
} else if (isHighlighted) {
|
|
40
|
+
opacity = 1;
|
|
41
|
+
}
|
|
42
|
+
if (!node.label) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("text", {
|
|
46
|
+
ref: ref,
|
|
47
|
+
x: labelX,
|
|
48
|
+
y: (y0 + y1) / 2,
|
|
49
|
+
textAnchor: labelAnchor,
|
|
50
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
51
|
+
fontSize: theme.typography.caption.fontSize,
|
|
52
|
+
fontFamily: theme.typography.fontFamily,
|
|
53
|
+
pointerEvents: "none",
|
|
54
|
+
opacity: opacity,
|
|
55
|
+
"data-node": node.id,
|
|
56
|
+
"data-highlighted": isHighlighted || undefined,
|
|
57
|
+
"data-faded": isFaded || undefined,
|
|
58
|
+
children: node.label
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
if (process.env.NODE_ENV !== "production") SankeyNodeLabel.displayName = "SankeyNodeLabel";
|
|
@@ -15,6 +15,7 @@ var _SankeyLinkElement = require("./SankeyLinkElement");
|
|
|
15
15
|
var _SankeyLinkLabel = require("./SankeyLinkLabel");
|
|
16
16
|
var _useSankeySeries = require("../hooks/useSankeySeries");
|
|
17
17
|
var _sankeyClasses = require("./sankeyClasses");
|
|
18
|
+
var _SankeyNodeLabel = require("./SankeyNodeLabel");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const SankeyPlotRoot = (0, _styles.styled)('g')({
|
|
20
21
|
[`.${_sankeyClasses.sankeyPlotClasses.links} path, .${_sankeyClasses.sankeyPlotClasses.nodes} rect`]: {
|
|
@@ -46,18 +47,16 @@ function SankeyPlot(props) {
|
|
|
46
47
|
if (!sankeySeries) {
|
|
47
48
|
throw new Error(`MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.`);
|
|
48
49
|
}
|
|
49
|
-
if (!layout) {
|
|
50
|
+
if (!layout || !layout.links) {
|
|
50
51
|
return null;
|
|
51
52
|
}
|
|
52
53
|
const {
|
|
53
|
-
data,
|
|
54
54
|
linkOptions,
|
|
55
55
|
nodeOptions
|
|
56
56
|
} = sankeySeries;
|
|
57
57
|
// Early return if no data or dimensions
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
58
|
+
|
|
59
|
+
const showNodeLabels = nodeOptions?.showLabels ?? true;
|
|
61
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SankeyPlotRoot, {
|
|
62
61
|
className: classes.root,
|
|
63
62
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
@@ -73,14 +72,18 @@ function SankeyPlot(props) {
|
|
|
73
72
|
children: layout.nodes.map(node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyNodeElement.SankeyNodeElement, {
|
|
74
73
|
seriesId: sankeySeries.id,
|
|
75
74
|
node: node,
|
|
76
|
-
showLabel: nodeOptions?.showLabels,
|
|
77
75
|
onClick: onNodeClick
|
|
78
76
|
}, node.id))
|
|
79
77
|
}), linkOptions?.showValues && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
80
78
|
className: classes.linkLabels,
|
|
81
79
|
children: layout.links.map(link => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyLinkLabel.SankeyLinkLabel, {
|
|
82
80
|
link: link
|
|
83
|
-
}, `label-${link.source.id}-${link.target.id}`))
|
|
81
|
+
}, `label-link-${link.source.id}-${link.target.id}`))
|
|
82
|
+
}), showNodeLabels && /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
83
|
+
className: classes.nodeLabels,
|
|
84
|
+
children: layout.nodes.map(node => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SankeyNodeLabel.SankeyNodeLabel, {
|
|
85
|
+
node: node
|
|
86
|
+
}, `label-node-${node.id}`))
|
|
84
87
|
})]
|
|
85
88
|
});
|
|
86
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
1
|
+
import { type SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
2
2
|
declare function SankeyTooltip(props: SankeyTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace SankeyTooltip {
|
|
4
4
|
var propTypes: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
1
|
+
import { type ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
2
2
|
export interface SankeyTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
|
|
3
3
|
/**
|
|
4
4
|
* Select the kind of tooltip to display
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
1
|
+
import { type SankeyTooltipProps } from "./SankeyTooltip.types.js";
|
|
2
2
|
export interface SankeyTooltipContentProps extends Pick<SankeyTooltipProps, 'classes'> {}
|
|
3
3
|
export declare function SankeyTooltipContent(props: SankeyTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
export declare namespace SankeyTooltipContent {
|
|
@@ -8,5 +8,5 @@ import type { SankeyLayout, SankeyLayoutLink, DefaultizedSankeySeriesType } from
|
|
|
8
8
|
* @param options Layout configuration options
|
|
9
9
|
* @returns The calculated layout
|
|
10
10
|
*/
|
|
11
|
-
export declare function calculateSankeyLayout(series: DefaultizedSankeySeriesType, drawingArea: ChartDrawingArea): SankeyLayout
|
|
12
|
-
export declare function improvedNaiveSankeyLinkPathHorizontal(link: SankeyLayoutLink
|
|
11
|
+
export declare function calculateSankeyLayout(series: DefaultizedSankeySeriesType, drawingArea: ChartDrawingArea): SankeyLayout<true>;
|
|
12
|
+
export declare function improvedNaiveSankeyLinkPathHorizontal(link: SankeyLayoutLink<true>, curveCorrection?: number): string;
|
|
@@ -30,14 +30,19 @@ function calculateSankeyLayout(series, drawingArea) {
|
|
|
30
30
|
const {
|
|
31
31
|
width: nodeWidth = 15,
|
|
32
32
|
padding: nodePadding = 10,
|
|
33
|
-
align: nodeAlign
|
|
33
|
+
align: nodeAlign,
|
|
34
34
|
sort: nodeSort
|
|
35
35
|
} = nodeOptions ?? {};
|
|
36
36
|
const {
|
|
37
|
-
color: linkColor = 'source',
|
|
38
37
|
sort: linkSort,
|
|
39
38
|
curveCorrection = 10
|
|
40
39
|
} = linkOptions ?? {};
|
|
40
|
+
if (!data || !data.links) {
|
|
41
|
+
return {
|
|
42
|
+
nodes: [],
|
|
43
|
+
links: []
|
|
44
|
+
};
|
|
45
|
+
}
|
|
41
46
|
const {
|
|
42
47
|
width,
|
|
43
48
|
height,
|
|
@@ -46,21 +51,9 @@ function calculateSankeyLayout(series, drawingArea) {
|
|
|
46
51
|
bottom,
|
|
47
52
|
right
|
|
48
53
|
} = drawingArea;
|
|
49
|
-
if (!data || !data.links) {
|
|
50
|
-
return {
|
|
51
|
-
nodes: [],
|
|
52
|
-
links: []
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Prepare the data structure expected by d3-sankey
|
|
57
|
-
const graph = {
|
|
58
|
-
nodes: data.nodes.values().toArray().map(v => (0, _extends2.default)({}, v)),
|
|
59
|
-
links: data.links.map(v => (0, _extends2.default)({}, v))
|
|
60
|
-
};
|
|
61
54
|
|
|
62
55
|
// Create the sankey layout generator
|
|
63
|
-
const sankeyGenerator = (0, _d3Sankey.sankey)().nodeWidth(nodeWidth).nodePadding(nodePadding).nodeAlign((0, _utils.getNodeAlignFunction)(nodeAlign)).extent([[left, top], [width + right, height + bottom]]).
|
|
56
|
+
const sankeyGenerator = (0, _d3Sankey.sankey)(true).nodeWidth(nodeWidth).nodePadding(nodePadding).nodeAlign((0, _utils.getNodeAlignFunction)(nodeAlign)).nodeId(d => d.id).extent([[left, top], [width + right, height + bottom]]).iterations(iterations);
|
|
64
57
|
|
|
65
58
|
// For 'auto' or undefined, don't set anything (use d3-sankey default behavior)
|
|
66
59
|
if (typeof nodeSort === 'function') {
|
|
@@ -80,7 +73,7 @@ function calculateSankeyLayout(series, drawingArea) {
|
|
|
80
73
|
// Generate the layout
|
|
81
74
|
let result;
|
|
82
75
|
try {
|
|
83
|
-
result = sankeyGenerator(
|
|
76
|
+
result = sankeyGenerator(data);
|
|
84
77
|
} catch (error) {
|
|
85
78
|
// There are two errors that can occur:
|
|
86
79
|
// 1. If the data contains circular references, d3-sankey will throw an error.
|
|
@@ -98,27 +91,13 @@ function calculateSankeyLayout(series, drawingArea) {
|
|
|
98
91
|
|
|
99
92
|
// Convert d3-sankey links to our format
|
|
100
93
|
const layoutLinks = links.map(link => {
|
|
101
|
-
|
|
102
|
-
const originalLink = data.links.find(l => {
|
|
103
|
-
return l.source === link.source.id && l.target === link.target.id;
|
|
104
|
-
});
|
|
105
|
-
let resolvedColor = originalLink?.color ?? linkColor;
|
|
106
|
-
if (resolvedColor === 'source') {
|
|
107
|
-
resolvedColor = link.source.color ?? linkColor;
|
|
108
|
-
} else if (resolvedColor === 'target') {
|
|
109
|
-
resolvedColor = link.target.color ?? linkColor;
|
|
110
|
-
}
|
|
111
|
-
return (0, _extends2.default)({}, originalLink, link, {
|
|
112
|
-
color: resolvedColor,
|
|
94
|
+
const rep = (0, _extends2.default)({}, link, {
|
|
113
95
|
path: improvedNaiveSankeyLinkPathHorizontal(link, curveCorrection)
|
|
114
96
|
});
|
|
115
|
-
|
|
116
|
-
const layoutNodes = nodes.map(node => {
|
|
117
|
-
const originalNode = data.nodes.get(node.id) || {};
|
|
118
|
-
return (0, _extends2.default)({}, originalNode, node);
|
|
97
|
+
return rep;
|
|
119
98
|
});
|
|
120
99
|
return {
|
|
121
|
-
nodes
|
|
100
|
+
nodes,
|
|
122
101
|
links: layoutLinks
|
|
123
102
|
};
|
|
124
103
|
}
|
|
@@ -5,7 +5,7 @@ import type { SankeyNode } from "./sankey.types.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @param node Sankey node for which to calculate the horizontal node position.
|
|
7
7
|
*/
|
|
8
|
-
export declare function sankeyLeft(node: SankeyNode<{}, {}>): number;
|
|
8
|
+
export declare function sankeyLeft<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>): number;
|
|
9
9
|
/**
|
|
10
10
|
* Compute the horizontal node position of a node in a Sankey layout with right alignment.
|
|
11
11
|
* Returns (n - 1 - node.height) to indicate the desired horizontal position of the node in the generated Sankey diagram.
|
|
@@ -13,7 +13,7 @@ export declare function sankeyLeft(node: SankeyNode<{}, {}>): number;
|
|
|
13
13
|
* @param node Sankey node for which to calculate the horizontal node position.
|
|
14
14
|
* @param n Total depth n of the graph (one plus the maximum node.depth)
|
|
15
15
|
*/
|
|
16
|
-
export declare function sankeyRight(node: SankeyNode<{}, {}>, n: number): number;
|
|
16
|
+
export declare function sankeyRight<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>, n: number): number;
|
|
17
17
|
/**
|
|
18
18
|
* Compute the horizontal node position of a node in a Sankey layout with justified alignment.
|
|
19
19
|
* Like d3.sankeyLeft, except that nodes without any outgoing links are moved to the far right.
|
|
@@ -22,7 +22,7 @@ export declare function sankeyRight(node: SankeyNode<{}, {}>, n: number): number
|
|
|
22
22
|
* @param node Sankey node for which to calculate the horizontal node position.
|
|
23
23
|
* @param n Total depth n of the graph (one plus the maximum node.depth)
|
|
24
24
|
*/
|
|
25
|
-
export declare function sankeyJustify(node: SankeyNode<{}, {}>, n: number): number;
|
|
25
|
+
export declare function sankeyJustify<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>, n: number): number;
|
|
26
26
|
/**
|
|
27
27
|
* Compute the horizontal node position of a node in a Sankey layout with center alignment.
|
|
28
28
|
* Like d3.sankeyLeft, except that nodes without any incoming links are moved as right as possible.
|
|
@@ -30,4 +30,4 @@ export declare function sankeyJustify(node: SankeyNode<{}, {}>, n: number): numb
|
|
|
30
30
|
*
|
|
31
31
|
* @param node Sankey node for which to calculate the horizontal node position.
|
|
32
32
|
*/
|
|
33
|
-
export declare function sankeyCenter(node: SankeyNode<{}, {}>): number;
|
|
33
|
+
export declare function sankeyCenter<WithPosition extends boolean>(node: SankeyNode<WithPosition, {}, {}>): number;
|