@mui/x-charts 8.1.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/BarChart.js +1 -1
- package/BarChart/BarLabel/BarLabel.types.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelPlot.d.ts +1 -1
- package/BarChart/BarLabel/barLabelClasses.d.ts +1 -1
- package/BarChart/BarLabel/index.d.ts +4 -4
- package/BarChart/checkScaleErrors.d.ts +3 -3
- package/BarChart/checkScaleErrors.js +4 -4
- package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/BarChart/seriesConfig/seriesProcessor.js +2 -2
- package/BarChart/seriesConfig/tooltip.d.ts +1 -1
- package/BarChart/types.d.ts +2 -2
- package/BarChart/useBarChartProps.d.ts +2 -2
- package/BarChart/useBarChartProps.js +20 -2
- package/CHANGELOG.md +233 -7
- package/ChartContainer/ChartContainer.js +1 -1
- package/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -1
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -1
- package/ChartsClipPath/ChartsClipPath.d.ts +8 -0
- package/ChartsClipPath/ChartsClipPath.js +8 -0
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -2
- package/ChartsGrid/ChartsVerticalGrid.d.ts +2 -2
- package/ChartsLabel/ChartsLabelMark.js +8 -4
- package/ChartsLabel/index.d.ts +4 -4
- package/ChartsLabel/labelClasses.d.ts +1 -1
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/ChartsLegend/ChartsLegend.d.ts +2 -2
- package/ChartsLegend/ContinuousColorLegend.d.ts +1 -1
- package/ChartsLegend/PiecewiseColorLegend.d.ts +1 -1
- package/ChartsLegend/chartsLegend.types.d.ts +1 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +2 -2
- package/ChartsLegend/continuousColorLegendClasses.d.ts +2 -2
- package/ChartsLegend/index.d.ts +4 -4
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +2 -2
- package/ChartsLegend/useAxis.d.ts +2 -2
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
- package/ChartsLocalizationProvider/index.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -1
- package/ChartsOverlay/index.d.ts +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/ChartsText/index.d.ts +2 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +1 -0
- package/ChartsTooltip/index.d.ts +3 -3
- package/ChartsTooltip/useAxisTooltip.d.ts +2 -2
- package/LineChart/AnimatedArea.d.ts +1 -1
- package/LineChart/AnimatedLine.d.ts +1 -1
- package/LineChart/AppearingMask.js +1 -2
- package/LineChart/AreaPlot.js +2 -2
- package/LineChart/CircleMarkElement.d.ts +10 -0
- package/LineChart/CircleMarkElement.js +5 -15
- package/LineChart/LineChart.js +1 -1
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LinePlot.js +2 -2
- package/LineChart/MarkElement.d.ts +10 -0
- package/LineChart/MarkElement.js +15 -15
- package/LineChart/MarkPlot.js +19 -3
- package/LineChart/index.d.ts +1 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/LineChart/seriesConfig/seriesProcessor.js +2 -2
- package/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/LineChart/useLineChartProps.d.ts +2 -2
- package/PieChart/PieArcLabel.js +3 -4
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadarChart/RadarGrid/index.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/index.d.ts +2 -2
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -3
- package/RadarChart/index.d.ts +2 -2
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadarChart/useRadarChartProps.d.ts +2 -2
- package/ScatterChart/ScatterChart.js +1 -1
- package/ScatterChart/ScatterMarker.types.d.ts +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/ScatterChart/useScatterChartProps.d.ts +3 -3
- package/SparkLineChart/SparkLineChart.d.ts +19 -0
- package/SparkLineChart/SparkLineChart.js +53 -16
- package/Toolbar/Toolbar.d.ts +5 -0
- package/Toolbar/Toolbar.js +34 -0
- package/Toolbar/ToolbarButton.d.ts +5 -0
- package/Toolbar/ToolbarButton.js +27 -0
- package/Toolbar/index.d.ts +2 -0
- package/Toolbar/index.js +27 -0
- package/colorPalettes/categorical/blueberryTwilight.d.ts +4 -0
- package/colorPalettes/categorical/blueberryTwilight.js +10 -0
- package/colorPalettes/categorical/cheerfulFiesta.d.ts +4 -0
- package/colorPalettes/categorical/cheerfulFiesta.js +10 -0
- package/colorPalettes/categorical/mangoFusion.d.ts +4 -0
- package/colorPalettes/categorical/mangoFusion.js +10 -0
- package/colorPalettes/categorical/rainbowSurge.d.ts +4 -0
- package/colorPalettes/categorical/rainbowSurge.js +10 -0
- package/colorPalettes/index.d.ts +14 -1
- package/colorPalettes/index.js +147 -4
- package/colorPalettes/sequential/blue.d.ts +4 -0
- package/colorPalettes/sequential/blue.js +12 -0
- package/colorPalettes/sequential/cyan.d.ts +4 -0
- package/colorPalettes/sequential/cyan.js +12 -0
- package/colorPalettes/sequential/green.d.ts +4 -0
- package/colorPalettes/sequential/green.js +12 -0
- package/colorPalettes/sequential/orange.d.ts +4 -0
- package/colorPalettes/sequential/orange.js +12 -0
- package/colorPalettes/sequential/pink.d.ts +4 -0
- package/colorPalettes/sequential/pink.js +12 -0
- package/colorPalettes/sequential/purple.d.ts +4 -0
- package/colorPalettes/sequential/purple.js +12 -0
- package/colorPalettes/sequential/red.d.ts +4 -0
- package/colorPalettes/sequential/red.js +12 -0
- package/colorPalettes/sequential/strawberrySky.d.ts +4 -0
- package/colorPalettes/sequential/strawberrySky.js +10 -0
- package/colorPalettes/sequential/yellow.d.ts +4 -0
- package/colorPalettes/sequential/yellow.js +12 -0
- package/colorPalettes/types.d.ts +4 -0
- package/colorPalettes/types.js +5 -0
- package/context/ChartProvider/ChartContext.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/context/ChartProvider/useChartContext.js +1 -1
- package/context/index.d.ts +1 -1
- package/esm/BarChart/BarChart.js +1 -1
- package/esm/BarChart/BarLabel/BarLabel.types.d.ts +1 -1
- package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +1 -1
- package/esm/BarChart/BarLabel/barLabelClasses.d.ts +1 -1
- package/esm/BarChart/BarLabel/index.d.ts +4 -4
- package/esm/BarChart/checkScaleErrors.d.ts +3 -3
- package/esm/BarChart/checkScaleErrors.js +4 -4
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/BarChart/seriesConfig/seriesProcessor.js +2 -2
- package/esm/BarChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/BarChart/types.d.ts +2 -2
- package/esm/BarChart/useBarChartProps.d.ts +2 -2
- package/esm/BarChart/useBarChartProps.js +20 -2
- package/esm/ChartContainer/ChartContainer.js +1 -1
- package/esm/ChartContainer/useChartContainerProps.d.ts +1 -1
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -1
- package/esm/ChartsClipPath/ChartsClipPath.d.ts +8 -0
- package/esm/ChartsClipPath/ChartsClipPath.js +8 -0
- package/esm/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -2
- package/esm/ChartsGrid/ChartsVerticalGrid.d.ts +2 -2
- package/esm/ChartsLabel/ChartsLabelMark.js +8 -4
- package/esm/ChartsLabel/index.d.ts +4 -4
- package/esm/ChartsLabel/labelClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/esm/ChartsLegend/ChartsLegend.d.ts +2 -2
- package/esm/ChartsLegend/ContinuousColorLegend.d.ts +1 -1
- package/esm/ChartsLegend/PiecewiseColorLegend.d.ts +1 -1
- package/esm/ChartsLegend/chartsLegend.types.d.ts +1 -1
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +2 -2
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +2 -2
- package/esm/ChartsLegend/index.d.ts +4 -4
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +2 -2
- package/esm/ChartsLegend/useAxis.d.ts +2 -2
- package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
- package/esm/ChartsLocalizationProvider/index.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -1
- package/esm/ChartsOverlay/index.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +2 -2
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +1 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +1 -1
- package/esm/ChartsText/index.d.ts +2 -2
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +1 -0
- package/esm/ChartsTooltip/index.d.ts +3 -3
- package/esm/ChartsTooltip/useAxisTooltip.d.ts +2 -2
- package/esm/LineChart/AnimatedArea.d.ts +1 -1
- package/esm/LineChart/AnimatedLine.d.ts +1 -1
- package/esm/LineChart/AppearingMask.js +1 -2
- package/esm/LineChart/AreaPlot.js +2 -2
- package/esm/LineChart/CircleMarkElement.d.ts +10 -0
- package/esm/LineChart/CircleMarkElement.js +5 -15
- package/esm/LineChart/LineChart.js +1 -1
- package/esm/LineChart/LineHighlightPlot.js +1 -1
- package/esm/LineChart/LinePlot.js +2 -2
- package/esm/LineChart/MarkElement.d.ts +10 -0
- package/esm/LineChart/MarkElement.js +15 -15
- package/esm/LineChart/MarkPlot.js +20 -4
- package/esm/LineChart/index.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/LineChart/seriesConfig/seriesProcessor.js +2 -2
- package/esm/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/LineChart/useLineChartProps.d.ts +2 -2
- package/esm/PieChart/PieArcLabel.js +3 -4
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/RadarChart/RadarGrid/index.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/index.d.ts +2 -2
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -3
- package/esm/RadarChart/index.d.ts +2 -2
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/RadarChart/useRadarChartProps.d.ts +2 -2
- package/esm/ScatterChart/ScatterChart.js +1 -1
- package/esm/ScatterChart/ScatterMarker.types.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/seriesProcessor.js +1 -1
- package/esm/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/ScatterChart/useScatterChartProps.d.ts +3 -3
- package/esm/SparkLineChart/SparkLineChart.d.ts +19 -0
- package/esm/SparkLineChart/SparkLineChart.js +53 -16
- package/esm/Toolbar/Toolbar.d.ts +5 -0
- package/esm/Toolbar/Toolbar.js +27 -0
- package/esm/Toolbar/ToolbarButton.d.ts +5 -0
- package/esm/Toolbar/ToolbarButton.js +20 -0
- package/esm/Toolbar/index.d.ts +2 -0
- package/esm/Toolbar/index.js +2 -0
- package/esm/colorPalettes/categorical/blueberryTwilight.d.ts +4 -0
- package/esm/colorPalettes/categorical/blueberryTwilight.js +3 -0
- package/esm/colorPalettes/categorical/cheerfulFiesta.d.ts +4 -0
- package/esm/colorPalettes/categorical/cheerfulFiesta.js +3 -0
- package/esm/colorPalettes/categorical/mangoFusion.d.ts +4 -0
- package/esm/colorPalettes/categorical/mangoFusion.js +3 -0
- package/esm/colorPalettes/categorical/rainbowSurge.d.ts +4 -0
- package/esm/colorPalettes/categorical/rainbowSurge.js +3 -0
- package/esm/colorPalettes/index.d.ts +14 -1
- package/esm/colorPalettes/index.js +20 -1
- package/esm/colorPalettes/sequential/blue.d.ts +4 -0
- package/esm/colorPalettes/sequential/blue.js +5 -0
- package/esm/colorPalettes/sequential/cyan.d.ts +4 -0
- package/esm/colorPalettes/sequential/cyan.js +5 -0
- package/esm/colorPalettes/sequential/green.d.ts +4 -0
- package/esm/colorPalettes/sequential/green.js +5 -0
- package/esm/colorPalettes/sequential/orange.d.ts +4 -0
- package/esm/colorPalettes/sequential/orange.js +5 -0
- package/esm/colorPalettes/sequential/pink.d.ts +4 -0
- package/esm/colorPalettes/sequential/pink.js +5 -0
- package/esm/colorPalettes/sequential/purple.d.ts +4 -0
- package/esm/colorPalettes/sequential/purple.js +5 -0
- package/esm/colorPalettes/sequential/red.d.ts +4 -0
- package/esm/colorPalettes/sequential/red.js +5 -0
- package/esm/colorPalettes/sequential/strawberrySky.d.ts +4 -0
- package/esm/colorPalettes/sequential/strawberrySky.js +3 -0
- package/esm/colorPalettes/sequential/yellow.d.ts +4 -0
- package/esm/colorPalettes/sequential/yellow.js +5 -0
- package/esm/colorPalettes/types.d.ts +4 -0
- package/esm/colorPalettes/types.js +1 -0
- package/esm/context/ChartProvider/ChartContext.d.ts +1 -1
- package/esm/context/ChartProvider/ChartProvider.d.ts +1 -1
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/context/ChartProvider/useChartContext.js +1 -1
- package/esm/context/index.d.ts +1 -1
- package/esm/hooks/animation/useAnimateArea.d.ts +1 -1
- package/esm/hooks/animation/useAnimateBar.d.ts +1 -1
- package/esm/hooks/animation/useAnimateBarLabel.d.ts +1 -1
- package/esm/hooks/animation/useAnimateLine.d.ts +1 -1
- package/esm/hooks/animation/useAnimatePieArc.d.ts +1 -1
- package/esm/hooks/animation/useAnimatePieArcLabel.d.ts +11 -2
- package/esm/hooks/animation/useAnimatePieArcLabel.js +4 -4
- package/esm/hooks/useAxis.d.ts +6 -6
- package/esm/hooks/useChartsLocalization.d.ts +1 -1
- package/esm/hooks/useChartsLocalization.js +1 -1
- package/esm/hooks/useItemHighlightedGetter.d.ts +2 -2
- package/esm/hooks/useLegend.d.ts +1 -1
- package/esm/hooks/useSeries.d.ts +1 -1
- package/esm/hooks/useSvgRef.js +1 -1
- package/esm/hooks/useZAxis.d.ts +3 -3
- package/esm/index.d.ts +2 -1
- package/esm/index.js +3 -2
- package/esm/internals/constants.d.ts +4 -0
- package/esm/internals/constants.js +5 -0
- package/esm/internals/createSeriesSelectorOfType.d.ts +1 -1
- package/esm/internals/createSeriesSelectorOfType.js +1 -1
- package/esm/internals/createSvgIcon.d.ts +3 -0
- package/esm/internals/createSvgIcon.js +2 -0
- package/esm/internals/defaultizeMargin.d.ts +1 -1
- package/esm/internals/geometry.js +1 -1
- package/esm/internals/getPercentageValue.js +1 -1
- package/esm/internals/index.d.ts +4 -1
- package/esm/internals/index.js +4 -1
- package/esm/internals/material/index.d.ts +4 -0
- package/esm/internals/material/index.js +7 -0
- package/esm/internals/plugins/allPlugins.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +6 -4
- package/esm/internals/plugins/corePlugins/corePlugins.js +1 -1
- package/esm/internals/plugins/corePlugins/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +3 -3
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +2 -2
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +177 -142
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartId/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +20 -20
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +6 -7
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +12 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +22 -10
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +7 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +68 -68
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +5 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +20 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +26 -26
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1051 -892
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +11 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/index.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +28 -13
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +77 -77
- package/esm/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +68 -68
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +512 -512
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartZAxis/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +10 -10
- package/esm/internals/plugins/models/chart.d.ts +3 -3
- package/esm/internals/plugins/models/helpers.d.ts +1 -2
- package/esm/internals/plugins/models/plugin.d.ts +2 -32
- package/esm/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.d.ts +3 -3
- package/esm/internals/plugins/models/seriesConfig/colorProcessor.types.d.ts +5 -5
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +2 -2
- package/esm/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +3 -3
- package/esm/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +3 -3
- package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +6 -6
- package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +3 -3
- package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +4 -4
- package/esm/internals/plugins/utils/ChartStore.d.ts +2 -2
- package/esm/internals/stackSeries.d.ts +1 -1
- package/esm/internals/store/useCharts.d.ts +2 -2
- package/esm/internals/store/useCharts.js +11 -12
- package/esm/internals/store/useStore.js +1 -1
- package/esm/locales/enUS.d.ts +2 -0
- package/esm/locales/enUS.js +3 -1
- package/esm/locales/frFR.d.ts +2 -0
- package/esm/locales/frFR.js +2 -0
- package/esm/locales/index.d.ts +1 -1
- package/esm/locales/utils/chartsLocaleTextApi.d.ts +8 -0
- package/esm/locales/utils/getChartsLocalization.d.ts +2 -0
- package/esm/models/axis.d.ts +22 -3
- package/esm/models/axis.js +12 -0
- package/esm/models/index.d.ts +4 -3
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/common.d.ts +2 -2
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/slots/chartsBaseSlotProps.d.ts +13 -0
- package/esm/models/slots/chartsBaseSlotProps.js +1 -0
- package/esm/models/slots/chartsBaseSlots.d.ts +5 -0
- package/esm/models/slots/chartsBaseSlots.js +1 -0
- package/esm/models/slots/chartsIconSlots.d.ts +1 -0
- package/esm/models/slots/chartsIconSlots.js +1 -0
- package/esm/models/slots/index.d.ts +3 -0
- package/esm/models/slots/index.js +3 -0
- package/esm/themeAugmentation/components.js +1 -0
- package/esm/themeAugmentation/index.d.ts +3 -3
- package/esm/themeAugmentation/overrides.d.ts +3 -12
- package/esm/themeAugmentation/overrides.js +2 -0
- package/esm/themeAugmentation/props.d.ts +0 -7
- package/esm/themeAugmentation/props.js +2 -0
- package/hooks/animation/useAnimateArea.d.ts +1 -1
- package/hooks/animation/useAnimateBar.d.ts +1 -1
- package/hooks/animation/useAnimateBarLabel.d.ts +1 -1
- package/hooks/animation/useAnimateLine.d.ts +1 -1
- package/hooks/animation/useAnimatePieArc.d.ts +1 -1
- package/hooks/animation/useAnimatePieArcLabel.d.ts +11 -2
- package/hooks/animation/useAnimatePieArcLabel.js +4 -4
- package/hooks/useAxis.d.ts +6 -6
- package/hooks/useChartsLocalization.d.ts +1 -1
- package/hooks/useChartsLocalization.js +1 -1
- package/hooks/useItemHighlightedGetter.d.ts +2 -2
- package/hooks/useLegend.d.ts +1 -1
- package/hooks/useSeries.d.ts +1 -1
- package/hooks/useSvgRef.js +1 -1
- package/hooks/useZAxis.d.ts +3 -3
- package/index.d.ts +2 -1
- package/index.js +12 -1
- package/internals/constants.d.ts +4 -0
- package/internals/constants.js +11 -0
- package/internals/createSeriesSelectorOfType.d.ts +1 -1
- package/internals/createSeriesSelectorOfType.js +1 -1
- package/internals/createSvgIcon.d.ts +3 -0
- package/internals/createSvgIcon.js +8 -0
- package/internals/defaultizeMargin.d.ts +1 -1
- package/internals/geometry.js +1 -1
- package/internals/getPercentageValue.js +1 -1
- package/internals/index.d.ts +4 -1
- package/internals/index.js +36 -0
- package/internals/material/index.d.ts +4 -0
- package/internals/material/index.js +14 -0
- package/internals/plugins/allPlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/corePlugins.d.ts +6 -4
- package/internals/plugins/corePlugins/corePlugins.js +1 -1
- package/internals/plugins/corePlugins/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +2 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +177 -142
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +2 -2
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartId/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +20 -20
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +6 -7
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +12 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +27 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeZoom.js +7 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +68 -68
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +5 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +20 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +26 -26
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +1051 -892
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/zoom.types.d.ts +11 -1
- package/internals/plugins/featurePlugins/useChartHighlight/index.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +28 -13
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +77 -77
- package/internals/plugins/featurePlugins/useChartInteraction/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +68 -68
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/defaultizeAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +512 -512
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartVoronoi/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartVoronoi/useChartVoronoi.selectors.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartZAxis/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +10 -10
- package/internals/plugins/models/chart.d.ts +3 -3
- package/internals/plugins/models/helpers.d.ts +1 -2
- package/internals/plugins/models/plugin.d.ts +2 -32
- package/internals/plugins/models/seriesConfig/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/models/seriesConfig/colorProcessor.types.d.ts +5 -5
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +2 -2
- package/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +3 -3
- package/internals/plugins/models/seriesConfig/polarExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +6 -6
- package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +3 -3
- package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +4 -4
- package/internals/plugins/utils/ChartStore.d.ts +2 -2
- package/internals/stackSeries.d.ts +1 -1
- package/internals/store/useCharts.d.ts +2 -2
- package/internals/store/useCharts.js +11 -12
- package/internals/store/useStore.js +1 -1
- package/locales/enUS.d.ts +2 -0
- package/locales/enUS.js +3 -1
- package/locales/frFR.d.ts +2 -0
- package/locales/frFR.js +2 -0
- package/locales/index.d.ts +1 -1
- package/locales/utils/chartsLocaleTextApi.d.ts +8 -0
- package/locales/utils/getChartsLocalization.d.ts +2 -0
- package/models/axis.d.ts +22 -3
- package/models/axis.js +12 -0
- package/models/index.d.ts +4 -3
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/common.d.ts +2 -2
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/slots/chartsBaseSlotProps.d.ts +13 -0
- package/models/slots/chartsBaseSlotProps.js +5 -0
- package/models/slots/chartsBaseSlots.d.ts +5 -0
- package/models/slots/chartsBaseSlots.js +5 -0
- package/models/slots/chartsIconSlots.d.ts +1 -0
- package/models/slots/chartsIconSlots.js +5 -0
- package/models/slots/index.d.ts +3 -0
- package/models/slots/index.js +38 -0
- package/package.json +5 -5
- package/themeAugmentation/components.js +5 -0
- package/themeAugmentation/index.d.ts +3 -3
- package/themeAugmentation/overrides.d.ts +3 -12
- package/themeAugmentation/overrides.js +5 -0
- package/themeAugmentation/props.d.ts +0 -7
- package/themeAugmentation/props.js +5 -0
- package/colorPalettes/colorPalettes.d.ts +0 -16
- package/colorPalettes/colorPalettes.js +0 -22
- package/esm/colorPalettes/colorPalettes.d.ts +0 -16
- package/esm/colorPalettes/colorPalettes.js +0 -12
- package/esm/internals/store/useChartModels.d.ts +0 -7
- package/esm/internals/store/useChartModels.js +0 -64
- package/internals/store/useChartModels.d.ts +0 -7
- package/internals/store/useChartModels.js +0 -73
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChartRootSelector } from "../../utils/selectors.js";
|
|
2
2
|
import { UseChartVoronoiSignature } from "./useChartVoronoi.types.js";
|
|
3
|
-
export declare const selectorChartsVoronoiIsVoronoiEnabled: ((state: import("../../corePlugins/useChartId/useChartId.types").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("
|
|
4
|
-
cacheKey: import("../../models").ChartStateCacheKey;
|
|
3
|
+
export declare const selectorChartsVoronoiIsVoronoiEnabled: ((state: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartVoronoi.types.js").UseChartVoronoiState & Partial<{}> & {
|
|
4
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
5
5
|
}) => boolean | undefined) & {
|
|
6
6
|
clearCache: () => void;
|
|
7
7
|
resultsCount: () => number;
|
|
@@ -42,7 +42,7 @@ function getZAxisState(zAxis, dataset) {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
if (dataset === undefined) {
|
|
45
|
-
throw new Error('MUI X: z-axis uses `dataKey` but no `dataset` is provided.');
|
|
45
|
+
throw new Error('MUI X Charts: z-axis uses `dataKey` but no `dataset` is provided.');
|
|
46
46
|
}
|
|
47
47
|
zAxisLookup[defaultizedId] = processColorMap(addDefaultId(_extends({}, axisConfig, {
|
|
48
48
|
data: dataset.map(d => d[dataKey])
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ChartState } from "../../models/chart.js";
|
|
2
2
|
import { UseChartZAxisSignature } from "./useChartZAxis.types.js";
|
|
3
|
-
export declare const selectorChartZAxis: ((state: import("../../corePlugins/useChartId/useChartId.types").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types").UseChartSeriesState<keyof import("
|
|
4
|
-
cacheKey: import("../../models").ChartStateCacheKey;
|
|
3
|
+
export declare const selectorChartZAxis: ((state: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("./useChartZAxis.types.js").UseChartZAxisState & Partial<{}> & {
|
|
4
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
5
5
|
}) => {
|
|
6
6
|
axis: {
|
|
7
|
-
[axisId: string]: import("
|
|
7
|
+
[axisId: string]: import("../../../index.js").ZAxisDefaultized;
|
|
8
8
|
};
|
|
9
|
-
axisIds: import("
|
|
9
|
+
axisIds: import("../../../index.js").AxisId[];
|
|
10
10
|
}) & {
|
|
11
11
|
clearCache: () => void;
|
|
12
12
|
resultsCount: () => number;
|
|
@@ -14,15 +14,15 @@ export declare const selectorChartZAxis: ((state: import("../../corePlugins/useC
|
|
|
14
14
|
} & {
|
|
15
15
|
resultFunc: (resultFuncArgs_0: ChartState<[UseChartZAxisSignature]>) => {
|
|
16
16
|
axis: {
|
|
17
|
-
[axisId: string]: import("
|
|
17
|
+
[axisId: string]: import("../../../index.js").ZAxisDefaultized;
|
|
18
18
|
};
|
|
19
|
-
axisIds: import("
|
|
19
|
+
axisIds: import("../../../index.js").AxisId[];
|
|
20
20
|
};
|
|
21
21
|
memoizedResultFunc: ((resultFuncArgs_0: ChartState<[UseChartZAxisSignature]>) => {
|
|
22
22
|
axis: {
|
|
23
|
-
[axisId: string]: import("
|
|
23
|
+
[axisId: string]: import("../../../index.js").ZAxisDefaultized;
|
|
24
24
|
};
|
|
25
|
-
axisIds: import("
|
|
25
|
+
axisIds: import("../../../index.js").AxisId[];
|
|
26
26
|
}) & {
|
|
27
27
|
clearCache: () => void;
|
|
28
28
|
resultsCount: () => number;
|
|
@@ -30,9 +30,9 @@ export declare const selectorChartZAxis: ((state: import("../../corePlugins/useC
|
|
|
30
30
|
};
|
|
31
31
|
lastResult: () => {
|
|
32
32
|
axis: {
|
|
33
|
-
[axisId: string]: import("
|
|
33
|
+
[axisId: string]: import("../../../index.js").ZAxisDefaultized;
|
|
34
34
|
};
|
|
35
|
-
axisIds: import("
|
|
35
|
+
axisIds: import("../../../index.js").AxisId[];
|
|
36
36
|
};
|
|
37
37
|
dependencies: [(state: ChartState<[UseChartZAxisSignature]>) => ChartState<[UseChartZAxisSignature]>];
|
|
38
38
|
recomputations: () => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChartAnyPluginSignature } from
|
|
2
|
-
import type { MergeSignaturesProperty } from
|
|
3
|
-
import type { ChartCorePluginSignatures } from
|
|
1
|
+
import type { ChartAnyPluginSignature } from "./plugin.js";
|
|
2
|
+
import type { MergeSignaturesProperty } from "./helpers.js";
|
|
3
|
+
import type { ChartCorePluginSignatures } from "../corePlugins/index.js";
|
|
4
4
|
export type ChartInstance<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> = MergeSignaturesProperty<[...ChartCorePluginSignatures, ...TSignatures], 'instance'> & Partial<MergeSignaturesProperty<TOptionalSignatures, 'instance'>>;
|
|
5
5
|
export type ChartPublicAPI<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> = MergeSignaturesProperty<[...ChartCorePluginSignatures, ...TSignatures], 'publicAPI'> & Partial<MergeSignaturesProperty<TOptionalSignatures, 'instance'>>;
|
|
6
6
|
export type ChartStateCacheKey = {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { ChartAnyPluginSignature, ChartPlugin } from
|
|
1
|
+
import type { ChartAnyPluginSignature, ChartPlugin } from "./plugin.js";
|
|
2
2
|
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
3
3
|
export type OptionalIfEmpty<A extends string, B> = keyof B extends never ? Partial<Record<A, B>> : IsAny<B> extends true ? Partial<Record<A, B>> : Record<A, B>;
|
|
4
4
|
export type MergeSignaturesProperty<TSignatures extends readonly any[], TProperty extends keyof ChartAnyPluginSignature> = TSignatures extends readonly [plugin: infer P, ...otherPlugin: infer R] ? P extends ChartAnyPluginSignature ? P[TProperty] & MergeSignaturesProperty<R, TProperty> : {} : {};
|
|
5
|
-
export type ConvertPluginsIntoSignatures<TPlugins extends readonly ChartPlugin<ChartAnyPluginSignature>[]> = TPlugins extends readonly [plugin: infer TPlugin, ...otherPlugin: infer R] ? R extends readonly ChartPlugin<any>[] ? TPlugin extends ChartPlugin<infer TSignature> ? readonly [TSignature, ...ConvertPluginsIntoSignatures<R>] : never : never : [];
|
|
6
5
|
export type ConvertSignaturesIntoPlugins<TSignatures extends readonly ChartAnyPluginSignature[]> = TSignatures extends readonly [signature: infer TSignature, ...otherSignatures: infer R] ? R extends readonly ChartAnyPluginSignature[] ? TSignature extends ChartAnyPluginSignature ? readonly [ChartPlugin<TSignature>, ...ConvertSignaturesIntoPlugins<R>] : never : never : [];
|
|
7
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { MergeSignaturesProperty, OptionalIfEmpty } from
|
|
3
|
-
import type { ChartCorePluginSignatures } from
|
|
2
|
+
import type { MergeSignaturesProperty, OptionalIfEmpty } from "./helpers.js";
|
|
3
|
+
import type { ChartCorePluginSignatures } from "../corePlugins/index.js";
|
|
4
4
|
import { ChartStore } from "../utils/ChartStore.js";
|
|
5
5
|
import { ChartSeriesConfig } from "./seriesConfig/index.js";
|
|
6
6
|
export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature> {
|
|
@@ -12,11 +12,6 @@ export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature>
|
|
|
12
12
|
* The parameters after being processed with the default values.
|
|
13
13
|
*/
|
|
14
14
|
params: ChartUsedDefaultizedParams<TSignature>;
|
|
15
|
-
/**
|
|
16
|
-
* The store of controlled properties.
|
|
17
|
-
* If they are not controlled by the user, they will be initialized by the plugin.
|
|
18
|
-
*/
|
|
19
|
-
models: ChartUsedControlModels<TSignature>;
|
|
20
15
|
/**
|
|
21
16
|
* The store that can be used to access the state of other plugins.
|
|
22
17
|
*/
|
|
@@ -38,9 +33,6 @@ export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature>
|
|
|
38
33
|
*/
|
|
39
34
|
seriesConfig: ChartSeriesConfig<any>;
|
|
40
35
|
}
|
|
41
|
-
type ChartControlModelsInitializer<TSignature extends ChartAnyPluginSignature> = { [TControlled in keyof TSignature['models']]: {
|
|
42
|
-
getDefaultValue: (params: TSignature['defaultizedParams']) => Exclude<TSignature['defaultizedParams'][TControlled], undefined>;
|
|
43
|
-
} };
|
|
44
36
|
type ChartResponse<TSignature extends ChartAnyPluginSignature> = OptionalIfEmpty<'publicAPI', TSignature['publicAPI']> & OptionalIfEmpty<'instance', TSignature['instance']>;
|
|
45
37
|
export type ChartPluginSignature<T extends {
|
|
46
38
|
params?: {};
|
|
@@ -83,14 +75,6 @@ export type ChartPluginSignature<T extends {
|
|
|
83
75
|
publicAPI: T extends {
|
|
84
76
|
publicAPI: {};
|
|
85
77
|
} ? T['publicAPI'] : {};
|
|
86
|
-
/**
|
|
87
|
-
* A helper for controlled properties.
|
|
88
|
-
* Properties defined here can be controlled by the user. If they are not controlled, they will be initialized by the plugin.
|
|
89
|
-
*/
|
|
90
|
-
models: T extends {
|
|
91
|
-
defaultizedParams: {};
|
|
92
|
-
modelNames: keyof T['defaultizedParams'];
|
|
93
|
-
} ? { [TControlled in T['modelNames']]-?: ChartControlModel<Exclude<T['defaultizedParams'][TControlled], undefined>> } : {};
|
|
94
78
|
/**
|
|
95
79
|
* Any plugins that this plugin depends on.
|
|
96
80
|
*/
|
|
@@ -110,7 +94,6 @@ export type ChartAnyPluginSignature = ChartPluginSignature<{
|
|
|
110
94
|
instance: any;
|
|
111
95
|
publicAPI: any;
|
|
112
96
|
state: any;
|
|
113
|
-
modelNames: any;
|
|
114
97
|
dependencies: any;
|
|
115
98
|
optionalDependencies: any;
|
|
116
99
|
}>;
|
|
@@ -124,14 +107,6 @@ export type ChartUsedInstance<TSignature extends ChartAnyPluginSignature> = Plug
|
|
|
124
107
|
*/
|
|
125
108
|
$$signature: TSignature;
|
|
126
109
|
};
|
|
127
|
-
export interface ChartControlModel<TValue> {
|
|
128
|
-
name: string;
|
|
129
|
-
value: TValue;
|
|
130
|
-
setControlledValue: (value: TValue | ((prevValue: TValue) => TValue)) => void;
|
|
131
|
-
isControlled: boolean;
|
|
132
|
-
}
|
|
133
|
-
type RemoveSetValue<Models extends Record<string, ChartControlModel<any>>> = { [K in keyof Models]: Omit<Models[K], 'setValue'> };
|
|
134
|
-
export type ChartUsedControlModels<TSignature extends ChartAnyPluginSignature> = TSignature['models'] & RemoveSetValue<MergeSignaturesProperty<ChartRequiredPlugins<TSignature>, 'models'>>;
|
|
135
110
|
export type ChartUsedStore<TSignature extends ChartAnyPluginSignature> = ChartStore<[TSignature, ...TSignature['dependencies']], TSignature['optionalDependencies']>;
|
|
136
111
|
export type ChartPlugin<TSignature extends ChartAnyPluginSignature> = {
|
|
137
112
|
/**
|
|
@@ -152,11 +127,6 @@ export type ChartPlugin<TSignature extends ChartAnyPluginSignature> = {
|
|
|
152
127
|
* @returns {TSignature['state']} The initial state of the plugin.
|
|
153
128
|
*/
|
|
154
129
|
getInitialState?: (params: ChartUsedDefaultizedParams<TSignature>, currentState: MergeSignaturesProperty<ChartRequiredPlugins<TSignature>, 'state'>, seriesConfig: ChartSeriesConfig<any>) => TSignature['state'];
|
|
155
|
-
/**
|
|
156
|
-
* The configuration of properties that can be controlled by the user.
|
|
157
|
-
* If they are not controlled, they will be initialized by the plugin.
|
|
158
|
-
*/
|
|
159
|
-
models?: ChartControlModelsInitializer<TSignature>;
|
|
160
130
|
/**
|
|
161
131
|
* An object where each property used by the plugin is set to `true`.
|
|
162
132
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CartesianChartSeriesType, ChartSeriesDefaultized } from
|
|
2
|
-
import type { AxisConfig, AxisId } from
|
|
3
|
-
import type { SeriesId } from
|
|
1
|
+
import type { CartesianChartSeriesType, ChartSeriesDefaultized } from "../../../../models/seriesType/config.js";
|
|
2
|
+
import type { AxisConfig, AxisId } from "../../../../models/axis.js";
|
|
3
|
+
import type { SeriesId } from "../../../../models/seriesType/common.js";
|
|
4
4
|
type CartesianExtremumGetterParams<TSeriesType extends CartesianChartSeriesType> = {
|
|
5
5
|
series: Record<SeriesId, ChartSeriesDefaultized<TSeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { DefaultizedSeriesType } from
|
|
3
|
-
import type { ZAxisDefaultized } from
|
|
4
|
-
import type { ChartSeriesType } from
|
|
1
|
+
import type { ComputedXAxis, ComputedYAxis } from "../../../../models/axis.js";
|
|
2
|
+
import type { DefaultizedSeriesType } from "../../../../models/seriesType/index.js";
|
|
3
|
+
import type { ZAxisDefaultized } from "../../../../models/z-axis.js";
|
|
4
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
5
5
|
/**
|
|
6
6
|
* Map data index to a color.
|
|
7
7
|
* If dataIndex is not defined, it falls back to the series color when defined.
|
|
@@ -11,4 +11,4 @@ export type ColorGetter<TSeriesType extends ChartSeriesType> = TSeriesType exten
|
|
|
11
11
|
* Transforms charts config to a color getter.
|
|
12
12
|
* If dataIndex is not defined, it falls back to the series color.
|
|
13
13
|
*/
|
|
14
|
-
export type ColorProcessor<TSeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<TSeriesType>, xAxis?:
|
|
14
|
+
export type ColorProcessor<TSeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<TSeriesType>, xAxis?: ComputedXAxis, yAxis?: ComputedYAxis, zAxis?: ZAxisDefaultized) => ColorGetter<TSeriesType>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ChartSeries, ChartSeriesType } from
|
|
2
|
-
import type { AllSeriesType } from
|
|
1
|
+
import type { ChartSeries, ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
|
+
import type { AllSeriesType } from "../../../../models/seriesType/index.js";
|
|
3
3
|
export type GetSeriesWithDefaultValues<T extends ChartSeriesType> = (series: AllSeriesType<T>, seriesIndex: number, colors: string[]) => ChartSeries<T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LegendItemParams } from
|
|
2
|
-
import type { ChartSeriesType } from
|
|
3
|
-
import type { SeriesProcessorResult } from
|
|
1
|
+
import type { LegendItemParams } from "../../../../ChartsLegend/index.js";
|
|
2
|
+
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
+
import type { SeriesProcessorResult } from "./seriesProcessor.types.js";
|
|
4
4
|
export type LegendGetter<T extends ChartSeriesType> = (series: SeriesProcessorResult<T>) => LegendItemParams[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PolarChartSeriesType, ChartSeriesDefaultized } from
|
|
2
|
-
import type { AxisConfig } from
|
|
3
|
-
import type { SeriesId } from
|
|
1
|
+
import type { PolarChartSeriesType, ChartSeriesDefaultized } from "../../../../models/seriesType/config.js";
|
|
2
|
+
import type { AxisConfig } from "../../../../models/axis.js";
|
|
3
|
+
import type { SeriesId } from "../../../../models/seriesType/common.js";
|
|
4
4
|
type PolarExtremumGetterParams<TSeriesType extends PolarChartSeriesType> = {
|
|
5
5
|
series: Record<SeriesId, ChartSeriesDefaultized<TSeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { SeriesProcessor } from
|
|
2
|
-
import type { CartesianChartSeriesType, ChartSeriesType, PolarChartSeriesType } from
|
|
3
|
-
import type { ColorProcessor } from
|
|
4
|
-
import type { CartesianExtremumGetter } from
|
|
5
|
-
import type { LegendGetter } from
|
|
6
|
-
import type { AxisTooltipGetter, TooltipGetter } from
|
|
1
|
+
import type { SeriesProcessor } from "./seriesProcessor.types.js";
|
|
2
|
+
import type { CartesianChartSeriesType, ChartSeriesType, PolarChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
+
import type { ColorProcessor } from "./colorProcessor.types.js";
|
|
4
|
+
import type { CartesianExtremumGetter } from "./cartesianExtremumGetter.types.js";
|
|
5
|
+
import type { LegendGetter } from "./legendGetter.types.js";
|
|
6
|
+
import type { AxisTooltipGetter, TooltipGetter } from "./tooltipGetter.types.js";
|
|
7
7
|
import { PolarExtremumGetter } from "./polarExtremumGetter.types.js";
|
|
8
8
|
import { GetSeriesWithDefaultValues } from "./getSeriesWithDefaultValues.types.js";
|
|
9
9
|
export type ChartSeriesTypeConfig<TSeriesType extends ChartSeriesType> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChartSeriesDefaultized, ChartSeriesType, ChartsSeriesConfig, DatasetType } from
|
|
2
|
-
import type { SeriesId } from
|
|
3
|
-
import type { StackingGroupsType } from
|
|
1
|
+
import type { ChartSeriesDefaultized, ChartSeriesType, ChartsSeriesConfig, DatasetType } from "../../../../models/seriesType/config.js";
|
|
2
|
+
import type { SeriesId } from "../../../../models/seriesType/common.js";
|
|
3
|
+
import type { StackingGroupsType } from "../../../stackSeries.js";
|
|
4
4
|
export type SeriesProcessorParams<TSeriesType extends ChartSeriesType> = {
|
|
5
5
|
series: Record<SeriesId, ChartsSeriesConfig[TSeriesType]['seriesInput']>;
|
|
6
6
|
seriesOrder: SeriesId[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChartItemIdentifier, ChartSeriesDefaultized, ChartSeriesType, ChartsSeriesConfig } from
|
|
1
|
+
import type { ChartItemIdentifier, ChartSeriesDefaultized, ChartSeriesType, ChartsSeriesConfig } from "../../../../models/seriesType/config.js";
|
|
2
2
|
import { SeriesId } from "../../../../models/seriesType/common.js";
|
|
3
|
-
import {
|
|
3
|
+
import { AxisId, ChartsRotationAxisProps, ChartsRadiusAxisProps, PolarAxisDefaultized, ComputedXAxis, ComputedYAxis } from "../../../../models/axis.js";
|
|
4
4
|
import { ChartsLabelMarkProps } from "../../../../ChartsLabel/ChartsLabelMark.js";
|
|
5
5
|
import { ColorGetter } from "./colorProcessor.types.js";
|
|
6
6
|
export interface ItemTooltip<T extends ChartSeriesType> {
|
|
@@ -50,8 +50,8 @@ export type ItemTooltipWithMultipleValues<T extends 'radar' = 'radar'> = Pick<It
|
|
|
50
50
|
}[];
|
|
51
51
|
};
|
|
52
52
|
export interface TooltipGetterAxesConfig {
|
|
53
|
-
x?:
|
|
54
|
-
y?:
|
|
53
|
+
x?: ComputedXAxis;
|
|
54
|
+
y?: ComputedYAxis;
|
|
55
55
|
rotation?: PolarAxisDefaultized<any, any, ChartsRotationAxisProps>;
|
|
56
56
|
radius?: PolarAxisDefaultized<any, any, ChartsRadiusAxisProps>;
|
|
57
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChartState } from
|
|
2
|
-
import type { ChartAnyPluginSignature } from
|
|
1
|
+
import type { ChartState } from "../models/chart.js";
|
|
2
|
+
import type { ChartAnyPluginSignature } from "../models/plugin.js";
|
|
3
3
|
type Listener<T> = (value: T) => void;
|
|
4
4
|
export type StoreUpdater<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> = (prevState: ChartState<TSignatures, TOptionalSignatures>) => ChartState<TSignatures, TOptionalSignatures>;
|
|
5
5
|
export declare class ChartStore<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Series } from '@mui/x-charts-vendor/d3-shape';
|
|
2
|
-
import type { StackOffsetType, StackOrderType } from
|
|
2
|
+
import type { StackOffsetType, StackOrderType } from "../models/stacking.js";
|
|
3
3
|
import { SeriesId, StackableSeriesType } from "../models/seriesType/common.js";
|
|
4
4
|
type FormatterParams<T> = {
|
|
5
5
|
series: Record<SeriesId, T>;
|
|
@@ -16,11 +16,11 @@ import { ChartSeriesConfig } from "../plugins/models/seriesConfig/index.js";
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function useCharts<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]>(inPlugins: ConvertSignaturesIntoPlugins<TSignatures>, props: Partial<UseChartBaseProps<TSignatures>>, seriesConfig: ChartSeriesConfig<TSeriesType>): {
|
|
18
18
|
contextValue: {
|
|
19
|
-
store: ChartStore<readonly [import("
|
|
19
|
+
store: ChartStore<readonly [import("../index.js").UseChartIdSignature, import("../index.js").UseChartDimensionsSignature, import("../index.js").UseChartSeriesSignature, import("../plugins/corePlugins/useChartAnimation/index.js").UseChartAnimationSignature, ...TSignatures]> & UseChartInteractionState;
|
|
20
20
|
publicAPI: ChartPublicAPI<TSignatures>;
|
|
21
21
|
instance: ChartInstance<TSignatures>;
|
|
22
22
|
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
23
23
|
chartRootRef: React.RefObject<HTMLDivElement | null>;
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
|
-
export declare function useChartApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): T
|
|
26
|
+
export declare function useChartApiInitialization<T>(inputApiRef: React.RefObject<T | undefined> | undefined): React.RefObject<T>;
|
|
@@ -3,7 +3,6 @@ import useId from '@mui/utils/useId';
|
|
|
3
3
|
import { ChartStore } from "../plugins/utils/ChartStore.js";
|
|
4
4
|
import { CHART_CORE_PLUGINS } from "../plugins/corePlugins/index.js";
|
|
5
5
|
import { extractPluginParamsFromProps } from "./extractPluginParamsFromProps.js";
|
|
6
|
-
import { useChartModels } from "./useChartModels.js";
|
|
7
6
|
let globalId = 0;
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -23,7 +22,6 @@ export function useCharts(inPlugins, props, seriesConfig) {
|
|
|
23
22
|
props
|
|
24
23
|
});
|
|
25
24
|
pluginParams.id = pluginParams.id ?? chartId;
|
|
26
|
-
const models = useChartModels(plugins, pluginParams);
|
|
27
25
|
const instanceRef = React.useRef({});
|
|
28
26
|
const instance = instanceRef.current;
|
|
29
27
|
const publicAPI = useChartApiInitialization(props.apiRef);
|
|
@@ -53,11 +51,10 @@ export function useCharts(inPlugins, props, seriesConfig) {
|
|
|
53
51
|
store: storeRef.current,
|
|
54
52
|
svgRef: innerSvgRef,
|
|
55
53
|
chartRootRef: innerChartRootRef,
|
|
56
|
-
seriesConfig
|
|
57
|
-
models
|
|
54
|
+
seriesConfig
|
|
58
55
|
});
|
|
59
56
|
if (pluginResponse.publicAPI) {
|
|
60
|
-
Object.assign(publicAPI, pluginResponse.publicAPI);
|
|
57
|
+
Object.assign(publicAPI.current, pluginResponse.publicAPI);
|
|
61
58
|
}
|
|
62
59
|
if (pluginResponse.instance) {
|
|
63
60
|
Object.assign(instance, pluginResponse.instance);
|
|
@@ -66,7 +63,7 @@ export function useCharts(inPlugins, props, seriesConfig) {
|
|
|
66
63
|
plugins.forEach(runPlugin);
|
|
67
64
|
const contextValue = React.useMemo(() => ({
|
|
68
65
|
store: storeRef.current,
|
|
69
|
-
publicAPI,
|
|
66
|
+
publicAPI: publicAPI.current,
|
|
70
67
|
instance,
|
|
71
68
|
svgRef: innerSvgRef,
|
|
72
69
|
chartRootRef: innerChartRootRef
|
|
@@ -75,14 +72,16 @@ export function useCharts(inPlugins, props, seriesConfig) {
|
|
|
75
72
|
contextValue
|
|
76
73
|
};
|
|
77
74
|
}
|
|
75
|
+
function initializeInputApiRef(inputApiRef) {
|
|
76
|
+
if (inputApiRef.current == null) {
|
|
77
|
+
inputApiRef.current = {};
|
|
78
|
+
}
|
|
79
|
+
return inputApiRef;
|
|
80
|
+
}
|
|
78
81
|
export function useChartApiInitialization(inputApiRef) {
|
|
79
82
|
const fallbackPublicApiRef = React.useRef({});
|
|
80
83
|
if (inputApiRef) {
|
|
81
|
-
|
|
82
|
-
// eslint-disable-next-line react-compiler/react-compiler
|
|
83
|
-
inputApiRef.current = {};
|
|
84
|
-
}
|
|
85
|
-
return inputApiRef.current;
|
|
84
|
+
return initializeInputApiRef(inputApiRef);
|
|
86
85
|
}
|
|
87
|
-
return fallbackPublicApiRef
|
|
86
|
+
return fallbackPublicApiRef;
|
|
88
87
|
}
|
|
@@ -3,7 +3,7 @@ import { useChartContext } from "../../context/ChartProvider/index.js";
|
|
|
3
3
|
export function useStore() {
|
|
4
4
|
const context = useChartContext();
|
|
5
5
|
if (!context) {
|
|
6
|
-
throw new Error(['MUI X: Could not find the charts context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
|
|
6
|
+
throw new Error(['MUI X Charts: Could not find the charts context.', 'It looks like you rendered your component outside of a ChartContainer parent component.'].join('\n'));
|
|
7
7
|
}
|
|
8
8
|
return context.store;
|
|
9
9
|
}
|
package/esm/locales/enUS.d.ts
CHANGED
package/esm/locales/enUS.js
CHANGED
|
@@ -5,7 +5,9 @@ import { getChartsLocalization } from "./utils/getChartsLocalization.js";
|
|
|
5
5
|
export const enUSLocaleText = {
|
|
6
6
|
// Overlay
|
|
7
7
|
loading: 'Loading data…',
|
|
8
|
-
noData: 'No data to display'
|
|
8
|
+
noData: 'No data to display',
|
|
9
|
+
zoomIn: 'Zoom in',
|
|
10
|
+
zoomOut: 'Zoom out'
|
|
9
11
|
};
|
|
10
12
|
export const DEFAULT_LOCALE = enUSLocaleText;
|
|
11
13
|
export const enUS = getChartsLocalization(enUSLocaleText);
|
package/esm/locales/frFR.d.ts
CHANGED
package/esm/locales/frFR.js
CHANGED
package/esm/locales/index.d.ts
CHANGED
|
@@ -7,5 +7,13 @@ export interface ChartsLocaleText {
|
|
|
7
7
|
* Title displayed in the overlay if there is no data to display.
|
|
8
8
|
*/
|
|
9
9
|
noData: string;
|
|
10
|
+
/**
|
|
11
|
+
* Tooltip text shown when hovering over the zoom in button.
|
|
12
|
+
*/
|
|
13
|
+
zoomIn: string;
|
|
14
|
+
/**
|
|
15
|
+
* Tooltip text shown when hovering over the zoom out button.
|
|
16
|
+
*/
|
|
17
|
+
zoomOut: string;
|
|
10
18
|
}
|
|
11
19
|
export type ChartsTranslationKeys = keyof ChartsLocaleText;
|
package/esm/models/axis.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime } from '@mui/x-charts-vendor/d3-scale';
|
|
2
2
|
import { SxProps } from '@mui/system/styleFunctionSx';
|
|
3
3
|
import { type MakeOptional, MakeRequired } from '@mui/x-internals/types';
|
|
4
|
+
import type { DefaultizedZoomOptions } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
|
|
4
5
|
import { ChartsAxisClasses } from "../ChartsAxis/axisClasses.js";
|
|
5
|
-
import type { TickParams } from
|
|
6
|
+
import type { TickParams } from "../hooks/useTicks.js";
|
|
6
7
|
import { ChartsTextProps } from "../ChartsText/index.js";
|
|
7
8
|
import { ContinuousColorConfig, OrdinalColorConfig, PiecewiseColorConfig } from "./colorMapping.js";
|
|
8
9
|
export type AxisId = string | number;
|
|
@@ -289,7 +290,9 @@ export type AxisValueFormatterContext<S extends ScaleName = ScaleName> = {
|
|
|
289
290
|
*/
|
|
290
291
|
type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
291
292
|
/**
|
|
292
|
-
*
|
|
293
|
+
* ID used to identify the axis.
|
|
294
|
+
*
|
|
295
|
+
* The ID must be unique across all axes in this chart.
|
|
293
296
|
*/
|
|
294
297
|
id: AxisId;
|
|
295
298
|
/**
|
|
@@ -368,7 +371,7 @@ export type PolarAxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisP
|
|
|
368
371
|
*/
|
|
369
372
|
triggerTooltip?: boolean;
|
|
370
373
|
};
|
|
371
|
-
export type
|
|
374
|
+
export type ComputedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsXAxisProps | ChartsYAxisProps> = MakeRequired<Omit<DefaultedAxis<S, V, AxisProps>, 'scaleType'>, 'offset'> & AxisScaleConfig[S] & AxisScaleComputedConfig[S] & {
|
|
372
375
|
/**
|
|
373
376
|
* An indication of the expected number of ticks.
|
|
374
377
|
*/
|
|
@@ -378,6 +381,8 @@ export type AxisDefaultized<S extends ScaleName = ScaleName, V = any, AxisProps
|
|
|
378
381
|
*/
|
|
379
382
|
triggerTooltip?: boolean;
|
|
380
383
|
} & (AxisProps extends ChartsXAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'height'> : AxisProps extends ChartsYAxisProps ? MakeRequired<AxisSideConfig<AxisProps>, 'width'> : AxisSideConfig<AxisProps>);
|
|
384
|
+
export type ComputedXAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsXAxisProps>;
|
|
385
|
+
export type ComputedYAxis<S extends ScaleName = ScaleName, V = any> = ComputedAxis<S, V, ChartsYAxisProps>;
|
|
381
386
|
export declare function isBandScaleConfig(scaleConfig: AxisConfig<ScaleName>): scaleConfig is AxisConfig<'band'> & {
|
|
382
387
|
scaleType: 'band';
|
|
383
388
|
};
|
|
@@ -405,4 +410,18 @@ export type XAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleNam
|
|
|
405
410
|
export type YAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? MakeOptional<AxisConfig<S, V, ChartsYAxisProps>, 'id'> : never;
|
|
406
411
|
export type RotationAxis<S extends ScaleName = ScaleName, V = any> = S extends ScaleName ? AxisConfig<S, V, ChartsRotationAxisProps> : never;
|
|
407
412
|
export type RadiusAxis<S extends 'linear' = 'linear', V = any> = S extends 'linear' ? AxisConfig<S, V, ChartsRadiusAxisProps> : never;
|
|
413
|
+
/**
|
|
414
|
+
* The axis configuration with missing values filled with default values.
|
|
415
|
+
*/
|
|
416
|
+
export type DefaultedAxis<S extends ScaleName = ScaleName, V = any, AxisProps extends ChartsAxisProps = ChartsXAxisProps | ChartsYAxisProps> = AxisConfig<S, V, AxisProps> & {
|
|
417
|
+
zoom: DefaultizedZoomOptions | undefined;
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* The x-axis configuration with missing values filled with default values.
|
|
421
|
+
*/
|
|
422
|
+
export type DefaultedXAxis<S extends ScaleName = ScaleName, V = any> = DefaultedAxis<S, V, ChartsXAxisProps>;
|
|
423
|
+
/**
|
|
424
|
+
* The y-axis configuration with missing values filled with default values.
|
|
425
|
+
*/
|
|
426
|
+
export type DefaultedYAxis<S extends ScaleName = ScaleName, V = any> = DefaultedAxis<S, V, ChartsYAxisProps>;
|
|
408
427
|
export {};
|
package/esm/models/axis.js
CHANGED
|
@@ -20,4 +20,16 @@ export function isPointScaleConfig(scaleConfig) {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* The data format returned by onAxisClick.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* The axis configuration with missing values filled with default values.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The x-axis configuration with missing values filled with default values.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The y-axis configuration with missing values filled with default values.
|
|
23
35
|
*/
|
package/esm/models/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./seriesType/index.js";
|
|
2
2
|
export * from "./stacking.js";
|
|
3
|
-
export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, ChartsAxisData, XAxis, YAxis, RadiusAxis, RotationAxis } from
|
|
3
|
+
export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, ChartsAxisData, XAxis, YAxis, RadiusAxis, RotationAxis } from "./axis.js";
|
|
4
4
|
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
5
|
-
export type { Position } from
|
|
6
|
-
export type { CurveType } from
|
|
5
|
+
export type { Position } from "./position.js";
|
|
6
|
+
export type { CurveType } from "./curve.js";
|
|
7
|
+
export type { ChartBaseCommonProps, ChartBaseIconProps, ChartsIconSlots, ChartsBaseSlots } from "./slots/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import type { StackOffsetType } from
|
|
2
|
+
import type { StackOffsetType } from "../stacking.js";
|
|
3
3
|
import { CartesianSeriesType, CommonSeriesType, CommonDefaultizedProps, StackableSeriesType } from "./common.js";
|
|
4
4
|
export interface BarSeriesType extends CommonSeriesType<number | null>, CartesianSeriesType, StackableSeriesType {
|
|
5
5
|
type: 'bar';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChartsLabelMarkProps } from
|
|
1
|
+
import type { ChartsLabelMarkProps } from "../../ChartsLabel/index.js";
|
|
2
2
|
import { HighlightScope } from "../../internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.js";
|
|
3
|
-
import type { StackOffsetType, StackOrderType } from
|
|
3
|
+
import type { StackOffsetType, StackOrderType } from "../stacking.js";
|
|
4
4
|
export type SeriesId = number | string;
|
|
5
5
|
export type SeriesValueFormatterContext = {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import type { StackOffsetType } from
|
|
2
|
+
import type { StackOffsetType } from "../stacking.js";
|
|
3
3
|
import { CartesianSeriesType, CommonDefaultizedProps, CommonSeriesType, SeriesId, StackableSeriesType } from "./common.js";
|
|
4
4
|
import { CurveType } from "../curve.js";
|
|
5
5
|
export interface ShowMarkParams<AxisValue = number | Date> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PieArcDatum as D3PieArcDatum } from '@mui/x-charts-vendor/d3-shape';
|
|
2
2
|
import { DefaultizedProps } from '@mui/x-internals/types';
|
|
3
3
|
import { CommonDefaultizedProps, CommonSeriesType, SeriesId } from "./common.js";
|
|
4
|
-
import type { ChartsLabelMarkProps } from
|
|
4
|
+
import type { ChartsLabelMarkProps } from "../../ChartsLabel/index.js";
|
|
5
5
|
export type PieItemId = string | number;
|
|
6
6
|
export type PieValueType = {
|
|
7
7
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export type ChartBaseCommonProps<T = HTMLElement> = React.DOMAttributes<T> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
[k: `aria-${string}`]: any;
|
|
6
|
+
[k: `data-${string}`]: any;
|
|
7
|
+
};
|
|
8
|
+
export type ChartBaseIconProps = ChartBaseCommonProps<SVGSVGElement> & {
|
|
9
|
+
titleAccess?: string;
|
|
10
|
+
};
|
|
11
|
+
export type ChartBaseIconButtonProps = ChartBaseCommonProps & {
|
|
12
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
13
|
+
};
|