@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,12 +1,12 @@
|
|
|
1
|
-
import { ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
2
|
-
import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
3
|
-
import { ChartsLegendSlotExtension } from '@mui/x-charts/ChartsLegend';
|
|
4
|
-
import { ChartsAxisHighlightProps } from '@mui/x-charts/ChartsAxisHighlight';
|
|
1
|
+
import { type ChartsOverlayProps } from '@mui/x-charts/ChartsOverlay';
|
|
2
|
+
import { type ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
3
|
+
import { type ChartsLegendSlotExtension } from '@mui/x-charts/ChartsLegend';
|
|
4
|
+
import { type ChartsAxisHighlightProps } from '@mui/x-charts/ChartsAxisHighlight';
|
|
5
5
|
import type { ChartsWrapperProps } from '@mui/x-charts/ChartsWrapper';
|
|
6
|
-
import { FunnelChartPluginSignatures } from "./FunnelChart.plugins.js";
|
|
7
|
-
import { FunnelPlotProps } from "./FunnelPlot.js";
|
|
6
|
+
import { type FunnelChartPluginSignatures } from "./FunnelChart.plugins.js";
|
|
7
|
+
import { type FunnelPlotProps } from "./FunnelPlot.js";
|
|
8
8
|
import type { FunnelChartProps } from "./FunnelChart.js";
|
|
9
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
9
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
10
10
|
/**
|
|
11
11
|
* A helper function that extracts FunnelChartProps from the input props
|
|
12
12
|
* and returns an object with props for the children components of FunnelChart.
|
package/esm/Heatmap/Heatmap.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
|
-
import { ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
4
|
-
import { ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
5
|
-
import { ChartsAxisSlots, ChartsAxisSlotProps, XAxis, YAxis } from '@mui/x-charts/internals';
|
|
6
|
-
import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
7
|
-
import { ChartsLegendSlotProps, ChartsLegendSlots } from '@mui/x-charts/ChartsLegend';
|
|
8
|
-
import { ChartsSlotPropsPro, ChartsSlotsPro } from "../internals/material/index.js";
|
|
9
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
10
|
-
import { HeatmapSeriesType } from "../models/seriesType/heatmap.js";
|
|
11
|
-
import { HeatmapTooltipProps } from "./HeatmapTooltip/index.js";
|
|
12
|
-
import { HeatmapItemSlotProps, HeatmapItemSlots } from "./HeatmapItem.js";
|
|
13
|
-
import { HeatmapPluginSignatures } from "./Heatmap.plugins.js";
|
|
14
|
-
import { ChartsToolbarProSlotProps, ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
2
|
+
import { type MakeOptional } from '@mui/x-internals/types';
|
|
3
|
+
import { type ChartsAxisProps } from '@mui/x-charts/ChartsAxis';
|
|
4
|
+
import { type ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
|
|
5
|
+
import { type ChartsAxisSlots, type ChartsAxisSlotProps, type XAxis, type YAxis } from '@mui/x-charts/internals';
|
|
6
|
+
import { type ChartsOverlayProps, type ChartsOverlaySlotProps, type ChartsOverlaySlots } from '@mui/x-charts/ChartsOverlay';
|
|
7
|
+
import { type ChartsLegendSlotProps, type ChartsLegendSlots } from '@mui/x-charts/ChartsLegend';
|
|
8
|
+
import { type ChartsSlotPropsPro, type ChartsSlotsPro } from "../internals/material/index.js";
|
|
9
|
+
import { type ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
10
|
+
import { type HeatmapSeriesType } from "../models/seriesType/heatmap.js";
|
|
11
|
+
import { type HeatmapTooltipProps } from "./HeatmapTooltip/index.js";
|
|
12
|
+
import { type HeatmapItemSlotProps, type HeatmapItemSlots } from "./HeatmapItem.js";
|
|
13
|
+
import { type HeatmapPluginSignatures } from "./Heatmap.plugins.js";
|
|
14
|
+
import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from "../ChartsToolbarPro/Toolbar.types.js";
|
|
15
15
|
export interface HeatmapSlots extends ChartsAxisSlots, ChartsOverlaySlots, HeatmapItemSlots, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {
|
|
16
16
|
/**
|
|
17
17
|
* Custom component for the tooltip.
|
package/esm/Heatmap/Heatmap.js
CHANGED
|
@@ -317,6 +317,11 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
317
317
|
label: PropTypes.string,
|
|
318
318
|
labelStyle: PropTypes.object,
|
|
319
319
|
offset: PropTypes.number,
|
|
320
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
321
|
+
format: PropTypes.func.isRequired,
|
|
322
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
323
|
+
isTick: PropTypes.func.isRequired
|
|
324
|
+
})]).isRequired),
|
|
320
325
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
321
326
|
reverse: PropTypes.bool,
|
|
322
327
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -377,6 +382,11 @@ process.env.NODE_ENV !== "production" ? Heatmap.propTypes = {
|
|
|
377
382
|
label: PropTypes.string,
|
|
378
383
|
labelStyle: PropTypes.object,
|
|
379
384
|
offset: PropTypes.number,
|
|
385
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
386
|
+
format: PropTypes.func.isRequired,
|
|
387
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
388
|
+
isTick: PropTypes.func.isRequired
|
|
389
|
+
})]).isRequired),
|
|
380
390
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
381
391
|
reverse: PropTypes.bool,
|
|
382
392
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseChartZAxisSignature, UseChartCartesianAxisSignature, UseChartInteractionSignature, UseChartHighlightSignature, ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
-
import { UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature];
|
|
1
|
+
import { type UseChartZAxisSignature, type UseChartCartesianAxisSignature, type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type ConvertSignaturesIntoPlugins } from '@mui/x-charts/internals';
|
|
2
|
+
import { type UseChartProExportSignature } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
+
export type HeatmapPluginSignatures = [UseChartZAxisSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'heatmap'>, UseChartHighlightSignature, UseChartProExportSignature];
|
|
4
4
|
export declare const HEATMAP_PLUGINS: ConvertSignaturesIntoPlugins<HeatmapPluginSignatures>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export const HEATMAP_PLUGINS = [useChartZAxis, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartProExport];
|
|
3
|
+
export const HEATMAP_PLUGINS = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartProExport];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { SeriesId } from '@mui/x-charts/internals';
|
|
3
|
-
import { HeatmapClasses } from "./heatmapClasses.js";
|
|
2
|
+
import { type SeriesId } from '@mui/x-charts/internals';
|
|
3
|
+
import { type HeatmapClasses } from "./heatmapClasses.js";
|
|
4
4
|
export interface HeatmapItemSlots {
|
|
5
5
|
/**
|
|
6
6
|
* The component that renders the heatmap cell.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HeatmapItemProps } from "./HeatmapItem.js";
|
|
1
|
+
import { type HeatmapItemProps } from "./HeatmapItem.js";
|
|
2
2
|
export interface HeatmapPlotProps extends Pick<HeatmapItemProps, 'slots' | 'slotProps'> {}
|
|
3
3
|
declare function HeatmapPlot(props: HeatmapPlotProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
4
|
declare namespace HeatmapPlot {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
1
|
+
import { type HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
2
|
export declare const useUtilityClasses: (props: Pick<HeatmapTooltipProps, "classes">) => Record<"mark" | "table" | "cell" | "row" | "root" | "paper" | "markContainer" | "labelCell" | "valueCell", string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
1
|
+
import { type HeatmapTooltipProps } from "./HeatmapTooltip.types.js";
|
|
2
2
|
declare function HeatmapTooltip(props: HeatmapTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace HeatmapTooltip {
|
|
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 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'> {
|
|
@@ -327,6 +327,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
327
327
|
label: PropTypes.string,
|
|
328
328
|
labelStyle: PropTypes.object,
|
|
329
329
|
offset: PropTypes.number,
|
|
330
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
331
|
+
format: PropTypes.func.isRequired,
|
|
332
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
333
|
+
isTick: PropTypes.func.isRequired
|
|
334
|
+
})]).isRequired),
|
|
330
335
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
331
336
|
reverse: PropTypes.bool,
|
|
332
337
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -395,6 +400,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
395
400
|
label: PropTypes.string,
|
|
396
401
|
labelStyle: PropTypes.object,
|
|
397
402
|
offset: PropTypes.number,
|
|
403
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
404
|
+
format: PropTypes.func.isRequired,
|
|
405
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
406
|
+
isTick: PropTypes.func.isRequired
|
|
407
|
+
})]).isRequired),
|
|
398
408
|
position: PropTypes.oneOf(['bottom', 'none', 'top']),
|
|
399
409
|
reverse: PropTypes.bool,
|
|
400
410
|
scaleType: PropTypes.oneOf(['point']),
|
|
@@ -899,6 +909,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
899
909
|
label: PropTypes.string,
|
|
900
910
|
labelStyle: PropTypes.object,
|
|
901
911
|
offset: PropTypes.number,
|
|
912
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
913
|
+
format: PropTypes.func.isRequired,
|
|
914
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
915
|
+
isTick: PropTypes.func.isRequired
|
|
916
|
+
})]).isRequired),
|
|
902
917
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
903
918
|
reverse: PropTypes.bool,
|
|
904
919
|
scaleType: PropTypes.oneOf(['band']),
|
|
@@ -966,6 +981,11 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
|
|
|
966
981
|
label: PropTypes.string,
|
|
967
982
|
labelStyle: PropTypes.object,
|
|
968
983
|
offset: PropTypes.number,
|
|
984
|
+
ordinalTimeTicks: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['biweekly', 'days', 'hours', 'months', 'quarterly', 'weeks', 'years']), PropTypes.shape({
|
|
985
|
+
format: PropTypes.func.isRequired,
|
|
986
|
+
getTickNumber: PropTypes.func.isRequired,
|
|
987
|
+
isTick: PropTypes.func.isRequired
|
|
988
|
+
})]).isRequired),
|
|
969
989
|
position: PropTypes.oneOf(['left', 'none', 'right']),
|
|
970
990
|
reverse: PropTypes.bool,
|
|
971
991
|
scaleType: PropTypes.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>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useChartZAxis, useChartCartesianAxis, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartZAxis, useChartCartesianAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartBrush } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { useChartProZoom } from "../internals/plugins/useChartProZoom/index.js";
|
|
4
|
-
export const LINE_CHART_PRO_PLUGINS = [useChartZAxis, useChartBrush, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartKeyboardNavigation, useChartProZoom, useChartProExport];
|
|
4
|
+
export const LINE_CHART_PRO_PLUGINS = [useChartZAxis, useChartBrush, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight, useChartKeyboardNavigation, useChartProZoom, 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>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { useChartHighlight, useChartInteraction, useChartPolarAxis } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartHighlight, useChartTooltip, useChartInteraction, useChartPolarAxis } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
|
-
export const RADAR_CHART_PRO_PLUGINS = [useChartInteraction, useChartPolarAxis, useChartHighlight, useChartProExport];
|
|
3
|
+
export const RADAR_CHART_PRO_PLUGINS = [useChartTooltip, useChartInteraction, useChartPolarAxis, useChartHighlight, 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>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useChartInteraction } from '@mui/x-charts/internals';
|
|
1
|
+
import { useChartTooltip, useChartInteraction } from '@mui/x-charts/internals';
|
|
2
2
|
import { useChartProExport } from "../internals/plugins/useChartProExport/index.js";
|
|
3
3
|
import { useSankeyHighlight } from "./plugins/index.js";
|
|
4
|
-
export const SANKEY_CHART_PLUGINS = [useChartInteraction, useSankeyHighlight, useChartProExport];
|
|
4
|
+
export const SANKEY_CHART_PLUGINS = [useChartTooltip, useChartInteraction, useSankeyHighlight, useChartProExport];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
|
-
import { useInteractionItemProps, useStore
|
|
6
|
+
import { useInteractionItemProps, useStore } from '@mui/x-charts/internals';
|
|
7
7
|
import { selectorIsLinkHighlighted } from "./plugins/index.js";
|
|
8
8
|
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,8 +26,8 @@ export const SankeyLinkElement = /*#__PURE__*/React.forwardRef(function SankeyLi
|
|
|
26
26
|
sourceId: link.source.id,
|
|
27
27
|
link
|
|
28
28
|
};
|
|
29
|
-
const isHighlighted =
|
|
30
|
-
const isFaded =
|
|
29
|
+
const isHighlighted = store.use(selectorIsLinkHighlighted, link);
|
|
30
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
31
31
|
|
|
32
32
|
// Add interaction props for tooltips
|
|
33
33
|
const interactionProps = 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.
|
|
@@ -3,22 +3,19 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
6
|
-
import { useInteractionItemProps, useStore
|
|
7
|
-
import { useTheme } from '@mui/material/styles';
|
|
6
|
+
import { useInteractionItemProps, useStore } from '@mui/x-charts/internals';
|
|
8
7
|
import { selectorIsNodeHighlighted } from "./plugins/index.js";
|
|
9
8
|
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
10
|
-
import { jsx as _jsx
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
10
|
/**
|
|
12
11
|
* @ignore - internal component.
|
|
13
12
|
*/
|
|
14
13
|
export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNodeElement(props, ref) {
|
|
15
14
|
const {
|
|
16
15
|
node,
|
|
17
|
-
showLabel = true,
|
|
18
16
|
onClick,
|
|
19
17
|
seriesId
|
|
20
18
|
} = props;
|
|
21
|
-
const theme = useTheme();
|
|
22
19
|
const store = useStore();
|
|
23
20
|
const x0 = node.x0 ?? 0;
|
|
24
21
|
const y0 = node.y0 ?? 0;
|
|
@@ -26,12 +23,6 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
|
|
|
26
23
|
const y1 = node.y1 ?? 0;
|
|
27
24
|
const nodeWidth = x1 - x0;
|
|
28
25
|
const nodeHeight = y1 - y0;
|
|
29
|
-
|
|
30
|
-
// Determine label position
|
|
31
|
-
const labelX = node.depth === 0 ? x1 + 6 // Right side for first column
|
|
32
|
-
: x0 - 6; // Left side for other columns
|
|
33
|
-
|
|
34
|
-
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
35
26
|
const identifier = {
|
|
36
27
|
type: 'sankey',
|
|
37
28
|
seriesId,
|
|
@@ -39,8 +30,8 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
|
|
|
39
30
|
nodeId: node.id,
|
|
40
31
|
node
|
|
41
32
|
};
|
|
42
|
-
const isHighlighted =
|
|
43
|
-
const isFaded =
|
|
33
|
+
const isHighlighted = store.use(selectorIsNodeHighlighted, node.id);
|
|
34
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
44
35
|
|
|
45
36
|
// Add interaction props for tooltips
|
|
46
37
|
const interactionProps = useInteractionItemProps(identifier);
|
|
@@ -53,10 +44,10 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
|
|
|
53
44
|
} else if (isHighlighted) {
|
|
54
45
|
opacity = 1;
|
|
55
46
|
}
|
|
56
|
-
return /*#__PURE__*/
|
|
47
|
+
return /*#__PURE__*/_jsx("g", {
|
|
57
48
|
ref: ref,
|
|
58
49
|
"data-node": node.id,
|
|
59
|
-
children:
|
|
50
|
+
children: /*#__PURE__*/_jsx("rect", _extends({
|
|
60
51
|
x: node.x0,
|
|
61
52
|
y: node.y0,
|
|
62
53
|
width: nodeWidth,
|
|
@@ -68,17 +59,7 @@ export const SankeyNodeElement = /*#__PURE__*/React.forwardRef(function SankeyNo
|
|
|
68
59
|
stroke: "none",
|
|
69
60
|
"data-highlighted": isHighlighted || undefined,
|
|
70
61
|
"data-faded": isFaded || undefined
|
|
71
|
-
}, interactionProps))
|
|
72
|
-
x: labelX,
|
|
73
|
-
y: (y0 + y1) / 2,
|
|
74
|
-
textAnchor: labelAnchor,
|
|
75
|
-
fill: (theme.vars || theme).palette.text.primary,
|
|
76
|
-
fontSize: theme.typography.caption.fontSize,
|
|
77
|
-
fontFamily: theme.typography.fontFamily,
|
|
78
|
-
pointerEvents: "none",
|
|
79
|
-
opacity: opacity,
|
|
80
|
-
children: node.label
|
|
81
|
-
})]
|
|
62
|
+
}, interactionProps))
|
|
82
63
|
});
|
|
83
64
|
});
|
|
84
65
|
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,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { useStore } from '@mui/x-charts/internals';
|
|
5
|
+
import { useTheme } from '@mui/material/styles';
|
|
6
|
+
import { selectorIsNodeHighlighted } from "./plugins/index.js";
|
|
7
|
+
import { selectorIsSankeyItemFaded } from "./plugins/useSankeyHighlight.selectors.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* @ignore - internal component.
|
|
11
|
+
*/
|
|
12
|
+
export const SankeyNodeLabel = /*#__PURE__*/React.forwardRef(function SankeyNodeLabel(props, ref) {
|
|
13
|
+
const {
|
|
14
|
+
node
|
|
15
|
+
} = props;
|
|
16
|
+
const theme = useTheme();
|
|
17
|
+
const store = useStore();
|
|
18
|
+
const x0 = node.x0 ?? 0;
|
|
19
|
+
const y0 = node.y0 ?? 0;
|
|
20
|
+
const x1 = node.x1 ?? 0;
|
|
21
|
+
const y1 = node.y1 ?? 0;
|
|
22
|
+
|
|
23
|
+
// Determine label position
|
|
24
|
+
const labelX = node.depth === 0 ? x1 + 6 // Right side for first column
|
|
25
|
+
: x0 - 6; // Left side for other columns
|
|
26
|
+
|
|
27
|
+
const labelAnchor = node.depth === 0 ? 'start' : 'end';
|
|
28
|
+
const isHighlighted = store.use(selectorIsNodeHighlighted, node.id);
|
|
29
|
+
const isFaded = store.use(selectorIsSankeyItemFaded, isHighlighted);
|
|
30
|
+
let opacity = 1;
|
|
31
|
+
if (isFaded) {
|
|
32
|
+
opacity = 0.3;
|
|
33
|
+
} else if (isHighlighted) {
|
|
34
|
+
opacity = 1;
|
|
35
|
+
}
|
|
36
|
+
if (!node.label) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/_jsx("text", {
|
|
40
|
+
ref: ref,
|
|
41
|
+
x: labelX,
|
|
42
|
+
y: (y0 + y1) / 2,
|
|
43
|
+
textAnchor: labelAnchor,
|
|
44
|
+
fill: (theme.vars || theme).palette.text.primary,
|
|
45
|
+
fontSize: theme.typography.caption.fontSize,
|
|
46
|
+
fontFamily: theme.typography.fontFamily,
|
|
47
|
+
pointerEvents: "none",
|
|
48
|
+
opacity: opacity,
|
|
49
|
+
"data-node": node.id,
|
|
50
|
+
"data-highlighted": isHighlighted || undefined,
|
|
51
|
+
"data-faded": isFaded || undefined,
|
|
52
|
+
children: node.label
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
if (process.env.NODE_ENV !== "production") SankeyNodeLabel.displayName = "SankeyNodeLabel";
|
|
@@ -8,6 +8,7 @@ import { SankeyLinkElement } from "./SankeyLinkElement.js";
|
|
|
8
8
|
import { SankeyLinkLabel } from "./SankeyLinkLabel.js";
|
|
9
9
|
import { useSankeyLayout, useSankeySeriesContext } from "../hooks/useSankeySeries.js";
|
|
10
10
|
import { sankeyPlotClasses, useUtilityClasses } from "./sankeyClasses.js";
|
|
11
|
+
import { SankeyNodeLabel } from "./SankeyNodeLabel.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
13
|
const SankeyPlotRoot = styled('g')({
|
|
13
14
|
[`.${sankeyPlotClasses.links} path, .${sankeyPlotClasses.nodes} rect`]: {
|
|
@@ -39,18 +40,16 @@ function SankeyPlot(props) {
|
|
|
39
40
|
if (!sankeySeries) {
|
|
40
41
|
throw new Error(`MUI X Charts: Sankey series context is missing. Ensure the SankeyPlot is used inside a properly configured ChartDataProviderPro.`);
|
|
41
42
|
}
|
|
42
|
-
if (!layout) {
|
|
43
|
+
if (!layout || !layout.links) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
46
|
const {
|
|
46
|
-
data,
|
|
47
47
|
linkOptions,
|
|
48
48
|
nodeOptions
|
|
49
49
|
} = sankeySeries;
|
|
50
50
|
// Early return if no data or dimensions
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
51
|
+
|
|
52
|
+
const showNodeLabels = nodeOptions?.showLabels ?? true;
|
|
54
53
|
return /*#__PURE__*/_jsxs(SankeyPlotRoot, {
|
|
55
54
|
className: classes.root,
|
|
56
55
|
children: [/*#__PURE__*/_jsx("g", {
|
|
@@ -66,14 +65,18 @@ function SankeyPlot(props) {
|
|
|
66
65
|
children: layout.nodes.map(node => /*#__PURE__*/_jsx(SankeyNodeElement, {
|
|
67
66
|
seriesId: sankeySeries.id,
|
|
68
67
|
node: node,
|
|
69
|
-
showLabel: nodeOptions?.showLabels,
|
|
70
68
|
onClick: onNodeClick
|
|
71
69
|
}, node.id))
|
|
72
70
|
}), linkOptions?.showValues && /*#__PURE__*/_jsx("g", {
|
|
73
71
|
className: classes.linkLabels,
|
|
74
72
|
children: layout.links.map(link => /*#__PURE__*/_jsx(SankeyLinkLabel, {
|
|
75
73
|
link: link
|
|
76
|
-
}, `label-${link.source.id}-${link.target.id}`))
|
|
74
|
+
}, `label-link-${link.source.id}-${link.target.id}`))
|
|
75
|
+
}), showNodeLabels && /*#__PURE__*/_jsx("g", {
|
|
76
|
+
className: classes.nodeLabels,
|
|
77
|
+
children: layout.nodes.map(node => /*#__PURE__*/_jsx(SankeyNodeLabel, {
|
|
78
|
+
node: node
|
|
79
|
+
}, `label-node-${node.id}`))
|
|
77
80
|
})]
|
|
78
81
|
});
|
|
79
82
|
}
|
|
@@ -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
|