@mui/x-charts 8.0.0-alpha.12 → 8.0.0-alpha.13
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.d.ts +1 -1
- package/BarChart/BarChart.js +14 -30
- package/BarChart/useBarChartProps.js +3 -18
- package/CHANGELOG.md +299 -0
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/ChartContainer.js +15 -7
- package/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.js +4 -3
- package/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/ChartsAxis/ChartsAxis.js +25 -87
- package/ChartsAxis/axisClasses.d.ts +5 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/ChartsLabel/ChartsLabelMark.js +15 -2
- package/ChartsLabel/index.d.ts +1 -1
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxis.js +70 -57
- package/ChartsYAxis/ChartsYAxis.js +11 -15
- package/Gauge/Gauge.js +4 -3
- package/Gauge/GaugeContainer.js +7 -5
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +14 -30
- package/LineChart/useLineChartProps.js +2 -17
- package/PieChart/PieArcLabelPlot.js +1 -1
- package/PieChart/PieArcPlot.js +1 -1
- package/PieChart/PieChart.d.ts +1 -1
- package/PieChart/PieChart.js +6 -4
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +14 -30
- package/ScatterChart/useScatterChartProps.js +2 -17
- package/SparkLineChart/SparkLineChart.d.ts +4 -8
- package/SparkLineChart/SparkLineChart.js +23 -21
- package/constants/index.d.ts +8 -1
- package/constants/index.js +13 -6
- package/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/context/PolarProvider/Polar.types.d.ts +3 -2
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +14 -30
- package/esm/BarChart/useBarChartProps.js +3 -18
- package/esm/ChartContainer/ChartContainer.d.ts +1 -1
- package/esm/ChartContainer/ChartContainer.js +15 -7
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/esm/ChartDataProvider/ChartDataProvider.js +4 -3
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/esm/ChartsAxis/ChartsAxis.js +24 -86
- package/esm/ChartsAxis/axisClasses.d.ts +5 -1
- package/esm/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/esm/ChartsLabel/ChartsLabelMark.js +15 -2
- package/esm/ChartsLabel/index.d.ts +1 -1
- package/esm/ChartsLabel/index.js +0 -3
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.js +1 -1
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +70 -57
- package/esm/ChartsYAxis/ChartsYAxis.js +12 -16
- package/esm/Gauge/Gauge.js +4 -3
- package/esm/Gauge/GaugeContainer.js +7 -5
- package/esm/LineChart/LineChart.d.ts +1 -1
- package/esm/LineChart/LineChart.js +14 -30
- package/esm/LineChart/useLineChartProps.js +2 -17
- package/esm/PieChart/PieArcLabelPlot.js +1 -1
- package/esm/PieChart/PieArcPlot.js +1 -1
- package/esm/PieChart/PieChart.d.ts +1 -1
- package/esm/PieChart/PieChart.js +6 -4
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +14 -30
- package/esm/ScatterChart/useScatterChartProps.js +2 -17
- package/esm/SparkLineChart/SparkLineChart.d.ts +4 -8
- package/esm/SparkLineChart/SparkLineChart.js +23 -21
- package/esm/constants/index.d.ts +8 -1
- package/esm/constants/index.js +12 -5
- package/esm/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/esm/context/PolarProvider/Polar.types.d.ts +3 -2
- package/esm/hooks/useAxis.d.ts +2 -2
- package/esm/hooks/useAxis.js +1 -1
- package/esm/hooks/useSvgRef.js +1 -1
- package/esm/index.js +1 -1
- package/esm/internals/defaultizeColor.d.ts +23 -23
- package/esm/internals/defaultizeMargin.d.ts +3 -0
- package/esm/internals/defaultizeMargin.js +15 -0
- package/esm/internals/domUtils.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +37 -9
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +15 -14
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/{internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/esm/internals/plugins/models/plugin.d.ts +1 -1
- package/esm/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/esm/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/esm/internals/plugins/utils/selectors.d.ts +1 -0
- package/esm/internals/store/useCharts.js +0 -8
- package/esm/internals/store/useSelector.d.ts +1 -1
- package/esm/internals/store/useSelector.js +4 -1
- package/esm/internals/store/useStore.js +1 -1
- package/esm/models/axis.d.ts +56 -10
- package/esm/models/colorMapping.d.ts +1 -1
- package/esm/models/index.d.ts +0 -1
- package/esm/models/index.js +0 -1
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/config.d.ts +1 -1
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/seriesType/scatter.d.ts +1 -1
- package/esm/models/z-axis.d.ts +1 -1
- package/hooks/useAxis.d.ts +2 -2
- package/hooks/useAxis.js +5 -5
- package/hooks/useSvgRef.js +1 -1
- package/index.js +1 -1
- package/internals/defaultizeColor.d.ts +23 -23
- package/internals/defaultizeMargin.d.ts +3 -0
- package/internals/defaultizeMargin.js +22 -0
- package/internals/domUtils.js +1 -0
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +51 -30
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +20 -19
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +39 -37
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +36 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +16 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +11 -0
- package/{modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/internals/plugins/featurePlugins/useChartCartesianAxis/{useChartCartesianAxis.selectors.js → useChartCartesianAxisRendering.selectors.js} +10 -13
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +10 -5
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/internals/plugins/models/plugin.d.ts +1 -1
- package/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/internals/plugins/utils/selectors.d.ts +1 -0
- package/internals/store/useCharts.js +0 -8
- package/internals/store/useSelector.d.ts +1 -1
- package/internals/store/useSelector.js +5 -1
- package/internals/store/useStore.js +1 -1
- package/models/axis.d.ts +56 -10
- package/models/colorMapping.d.ts +1 -1
- package/models/index.d.ts +0 -1
- package/models/index.js +0 -11
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/config.d.ts +1 -1
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +1 -1
- package/models/z-axis.d.ts +1 -1
- package/modern/BarChart/BarChart.d.ts +1 -1
- package/modern/BarChart/BarChart.js +14 -30
- package/modern/BarChart/useBarChartProps.js +3 -18
- package/modern/ChartContainer/ChartContainer.d.ts +1 -1
- package/modern/ChartContainer/ChartContainer.js +15 -7
- package/modern/ChartDataProvider/ChartDataProvider.d.ts +2 -2
- package/modern/ChartDataProvider/ChartDataProvider.js +4 -3
- package/modern/ChartsAxis/ChartsAxis.d.ts +1 -25
- package/modern/ChartsAxis/ChartsAxis.js +24 -86
- package/modern/ChartsAxis/axisClasses.d.ts +5 -1
- package/modern/ChartsLabel/ChartsLabelMark.d.ts +6 -1
- package/modern/ChartsLabel/ChartsLabelMark.js +15 -2
- package/modern/ChartsLabel/index.d.ts +1 -1
- package/modern/ChartsLabel/index.js +0 -3
- package/modern/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.d.ts +1 -1
- package/modern/ChartsLabel/labelMarkClasses.js +1 -1
- package/modern/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/modern/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/modern/ChartsTooltip/ChartsTooltipTable.js +1 -1
- package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/modern/ChartsXAxis/ChartsXAxis.js +70 -57
- package/modern/ChartsYAxis/ChartsYAxis.js +12 -16
- package/modern/Gauge/Gauge.js +4 -3
- package/modern/Gauge/GaugeContainer.js +7 -5
- package/modern/LineChart/LineChart.d.ts +1 -1
- package/modern/LineChart/LineChart.js +14 -30
- package/modern/LineChart/useLineChartProps.js +2 -17
- package/modern/PieChart/PieArcLabelPlot.js +1 -1
- package/modern/PieChart/PieArcPlot.js +1 -1
- package/modern/PieChart/PieChart.d.ts +1 -1
- package/modern/PieChart/PieChart.js +6 -4
- package/modern/ScatterChart/ScatterChart.d.ts +1 -1
- package/modern/ScatterChart/ScatterChart.js +14 -30
- package/modern/ScatterChart/useScatterChartProps.js +2 -17
- package/modern/SparkLineChart/SparkLineChart.d.ts +4 -8
- package/modern/SparkLineChart/SparkLineChart.js +23 -21
- package/modern/constants/index.d.ts +8 -1
- package/modern/constants/index.js +12 -5
- package/modern/context/AnimationProvider/useSkipAnimation.js +1 -1
- package/modern/context/ChartProvider/ChartProvider.types.d.ts +6 -6
- package/modern/context/PolarProvider/Polar.types.d.ts +3 -2
- package/modern/hooks/useAxis.d.ts +2 -2
- package/modern/hooks/useAxis.js +1 -1
- package/modern/hooks/useSvgRef.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/defaultizeColor.d.ts +23 -23
- package/modern/internals/defaultizeMargin.d.ts +3 -0
- package/modern/internals/defaultizeMargin.js +15 -0
- package/modern/internals/domUtils.js +1 -0
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.d.ts +1 -1
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +52 -31
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +549 -105
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +19 -18
- package/modern/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.types.d.ts +7 -16
- package/modern/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +2 -2
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +2 -3
- package/modern/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -3
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +7 -2
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.d.ts +13 -15
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/createAxisFilterMapper.js +37 -35
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +3 -36
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +37 -9
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -1
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +216 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +6 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +15 -14
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +15 -13
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +70 -0
- package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -0
- package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.d.ts → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts} +1815 -911
- package/{esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.selectors.js → modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js} +4 -6
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +86 -130
- package/modern/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +2 -2
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +188 -71
- package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +9 -4
- package/modern/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.types.d.ts +2 -2
- package/modern/internals/plugins/models/plugin.d.ts +1 -1
- package/modern/internals/plugins/models/seriesConfig/seriesProcessor.types.d.ts +1 -1
- package/modern/internals/plugins/utils/ChartStore.d.ts +7 -7
- package/modern/internals/plugins/utils/selectors.d.ts +1 -0
- package/modern/internals/store/useCharts.js +0 -8
- package/modern/internals/store/useSelector.d.ts +1 -1
- package/modern/internals/store/useSelector.js +4 -1
- package/modern/internals/store/useStore.js +1 -1
- package/modern/models/axis.d.ts +56 -10
- package/modern/models/colorMapping.d.ts +1 -1
- package/modern/models/index.d.ts +0 -1
- package/modern/models/index.js +0 -1
- package/modern/models/seriesType/bar.d.ts +1 -1
- package/modern/models/seriesType/config.d.ts +1 -1
- package/modern/models/seriesType/line.d.ts +1 -1
- package/modern/models/seriesType/pie.d.ts +1 -1
- package/modern/models/seriesType/scatter.d.ts +1 -1
- package/modern/models/z-axis.d.ts +1 -1
- package/package.json +3 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/esm/internals/calculateMargins.d.ts +0 -7
- package/esm/internals/calculateMargins.js +0 -25
- package/esm/models/layout.d.ts +0 -18
- package/esm/models/layout.js +0 -1
- package/internals/calculateMargins.d.ts +0 -7
- package/internals/calculateMargins.js +0 -33
- package/models/layout.d.ts +0 -18
- package/models/layout.js +0 -5
- package/modern/internals/calculateMargins.d.ts +0 -7
- package/modern/internals/calculateMargins.js +0 -25
- package/modern/models/layout.d.ts +0 -18
- package/modern/models/layout.js +0 -1
|
@@ -47,7 +47,6 @@ const YAxisRoot = (0, _styles.styled)(_AxisSharedComponents.AxisRoot, {
|
|
|
47
47
|
overridesResolver: (props, styles) => styles.root
|
|
48
48
|
})({});
|
|
49
49
|
const defaultProps = {
|
|
50
|
-
position: 'left',
|
|
51
50
|
disableLine: false,
|
|
52
51
|
disableTicks: false,
|
|
53
52
|
tickSize: 6
|
|
@@ -93,13 +92,11 @@ function ChartsYAxis(inProps) {
|
|
|
93
92
|
tickLabelPlacement,
|
|
94
93
|
tickInterval,
|
|
95
94
|
tickLabelInterval,
|
|
96
|
-
sx
|
|
95
|
+
sx,
|
|
96
|
+
offset
|
|
97
97
|
} = defaultizedProps;
|
|
98
|
-
const theme = (0, _styles.useTheme)();
|
|
99
98
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
100
|
-
const classes = useUtilityClasses(
|
|
101
|
-
theme
|
|
102
|
-
}));
|
|
99
|
+
const classes = useUtilityClasses(defaultizedProps);
|
|
103
100
|
const {
|
|
104
101
|
instance
|
|
105
102
|
} = (0, _ChartProvider.useChartContext)();
|
|
@@ -165,14 +162,16 @@ function ChartsYAxis(inProps) {
|
|
|
165
162
|
});
|
|
166
163
|
const domain = yScale.domain();
|
|
167
164
|
const ordinalAxis = (0, _isBandScale.isBandScale)(yScale);
|
|
165
|
+
|
|
168
166
|
// Skip axis rendering if no data is available
|
|
169
167
|
// - The domain is an empty array for band/point scales.
|
|
170
168
|
// - The domains contains Infinity for continuous scales.
|
|
171
|
-
|
|
169
|
+
// - The position is 'none'.
|
|
170
|
+
if (ordinalAxis && domain.length === 0 || !ordinalAxis && domain.some(_isInfinity.isInfinity) || position === 'none') {
|
|
172
171
|
return null;
|
|
173
172
|
}
|
|
174
173
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(YAxisRoot, {
|
|
175
|
-
transform: `translate(${position === 'right' ? left + width : left}, 0)`,
|
|
174
|
+
transform: `translate(${position === 'right' ? left + width + offset : left - offset}, 0)`,
|
|
176
175
|
className: classes.root,
|
|
177
176
|
sx: sx,
|
|
178
177
|
children: [!disableLine && /*#__PURE__*/(0, _jsxRuntime.jsx)(Line, (0, _extends2.default)({
|
|
@@ -181,7 +180,7 @@ function ChartsYAxis(inProps) {
|
|
|
181
180
|
className: classes.line
|
|
182
181
|
}, lineSlotProps)), yTicks.map(({
|
|
183
182
|
formattedValue,
|
|
184
|
-
offset,
|
|
183
|
+
offset: tickOffset,
|
|
185
184
|
labelOffset,
|
|
186
185
|
value
|
|
187
186
|
}, index) => {
|
|
@@ -190,7 +189,7 @@ function ChartsYAxis(inProps) {
|
|
|
190
189
|
const skipLabel = typeof tickLabelInterval === 'function' && !tickLabelInterval?.(value, index);
|
|
191
190
|
const showLabel = instance.isPointInside({
|
|
192
191
|
x: -1,
|
|
193
|
-
y:
|
|
192
|
+
y: tickOffset
|
|
194
193
|
}, {
|
|
195
194
|
direction: 'y'
|
|
196
195
|
});
|
|
@@ -198,7 +197,7 @@ function ChartsYAxis(inProps) {
|
|
|
198
197
|
return null;
|
|
199
198
|
}
|
|
200
199
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", {
|
|
201
|
-
transform: `translate(0, ${
|
|
200
|
+
transform: `translate(0, ${tickOffset})`,
|
|
202
201
|
className: classes.tickContainer,
|
|
203
202
|
children: [!disableTicks && /*#__PURE__*/(0, _jsxRuntime.jsx)(Tick, (0, _extends2.default)({
|
|
204
203
|
x2: positionSign * tickSize,
|
|
@@ -222,6 +221,7 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
222
221
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
223
222
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
224
223
|
// ----------------------------------------------------------------------
|
|
224
|
+
axis: _propTypes.default.oneOf(['y']),
|
|
225
225
|
/**
|
|
226
226
|
* The id of the axis to render.
|
|
227
227
|
* If undefined, it will be the first defined axis.
|
|
@@ -254,10 +254,6 @@ process.env.NODE_ENV !== "production" ? ChartsYAxis.propTypes = {
|
|
|
254
254
|
* The style applied to the axis label.
|
|
255
255
|
*/
|
|
256
256
|
labelStyle: _propTypes.default.object,
|
|
257
|
-
/**
|
|
258
|
-
* Position of the axis.
|
|
259
|
-
*/
|
|
260
|
-
position: _propTypes.default.oneOf(['left', 'right']),
|
|
261
257
|
/**
|
|
262
258
|
* The props used for each component slot.
|
|
263
259
|
* @default {}
|
package/Gauge/Gauge.js
CHANGED
|
@@ -104,14 +104,15 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
104
104
|
/**
|
|
105
105
|
* The margin between the SVG and the drawing area.
|
|
106
106
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
107
|
-
*
|
|
107
|
+
*
|
|
108
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
108
109
|
*/
|
|
109
|
-
margin: _propTypes.default.shape({
|
|
110
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
110
111
|
bottom: _propTypes.default.number,
|
|
111
112
|
left: _propTypes.default.number,
|
|
112
113
|
right: _propTypes.default.number,
|
|
113
114
|
top: _propTypes.default.number
|
|
114
|
-
}),
|
|
115
|
+
})]),
|
|
115
116
|
/**
|
|
116
117
|
* The radius between circle center and the end of the arc.
|
|
117
118
|
* Can be a number (in px) or a string with a percentage such as '50%'.
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -15,6 +15,7 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _ChartsSurface = require("../ChartsSurface");
|
|
16
16
|
var _GaugeProvider = require("./GaugeProvider");
|
|
17
17
|
var _ChartProvider = require("../context/ChartProvider");
|
|
18
|
+
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
20
|
const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
20
21
|
const GStyled = (0, _styles.styled)('g')(({
|
|
@@ -48,12 +49,12 @@ const GaugeContainer = exports.GaugeContainer = /*#__PURE__*/React.forwardRef(fu
|
|
|
48
49
|
pluginParams: {
|
|
49
50
|
width: inWidth,
|
|
50
51
|
height: inHeight,
|
|
51
|
-
margin: (0,
|
|
52
|
+
margin: (0, _defaultizeMargin.defaultizeMargin)(margin, {
|
|
52
53
|
left: 10,
|
|
53
54
|
right: 10,
|
|
54
55
|
top: 10,
|
|
55
56
|
bottom: 10
|
|
56
|
-
}
|
|
57
|
+
})
|
|
57
58
|
},
|
|
58
59
|
plugins: [],
|
|
59
60
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_GaugeProvider.GaugeProvider, {
|
|
@@ -134,14 +135,15 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
134
135
|
/**
|
|
135
136
|
* The margin between the SVG and the drawing area.
|
|
136
137
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
137
|
-
*
|
|
138
|
+
*
|
|
139
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
138
140
|
*/
|
|
139
|
-
margin: _propTypes.default.shape({
|
|
141
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
140
142
|
bottom: _propTypes.default.number,
|
|
141
143
|
left: _propTypes.default.number,
|
|
142
144
|
right: _propTypes.default.number,
|
|
143
145
|
top: _propTypes.default.number
|
|
144
|
-
}),
|
|
146
|
+
})]),
|
|
145
147
|
/**
|
|
146
148
|
* The radius between circle center and the end of the arc.
|
|
147
149
|
* Can be a number (in px) or a string with a percentage such as '50%'.
|
package/LineChart/LineChart.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface LineChartProps extends Omit<ChartContainerProps<'line', LineCha
|
|
|
21
21
|
* The series to display in the line chart.
|
|
22
22
|
* An array of [[LineSeriesType]] objects.
|
|
23
23
|
*/
|
|
24
|
-
series: MakeOptional<LineSeriesType, 'type'>[]
|
|
24
|
+
series: Readonly<MakeOptional<LineSeriesType, 'type'>[]>;
|
|
25
25
|
/**
|
|
26
26
|
* Option to display a cartesian grid in the background.
|
|
27
27
|
*/
|
package/LineChart/LineChart.js
CHANGED
|
@@ -94,12 +94,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
94
94
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
95
95
|
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
96
96
|
}),
|
|
97
|
-
/**
|
|
98
|
-
* Indicate which axis to display the bottom of the charts.
|
|
99
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
100
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
101
|
-
*/
|
|
102
|
-
bottomAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
103
97
|
children: _propTypes.default.node,
|
|
104
98
|
className: _propTypes.default.string,
|
|
105
99
|
/**
|
|
@@ -150,12 +144,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
150
144
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
151
145
|
*/
|
|
152
146
|
id: _propTypes.default.string,
|
|
153
|
-
/**
|
|
154
|
-
* Indicate which axis to display the left of the charts.
|
|
155
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
156
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
157
|
-
*/
|
|
158
|
-
leftAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
159
147
|
/**
|
|
160
148
|
* If `true`, a loading overlay is displayed.
|
|
161
149
|
* @default false
|
|
@@ -164,14 +152,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
164
152
|
/**
|
|
165
153
|
* The margin between the SVG and the drawing area.
|
|
166
154
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
167
|
-
*
|
|
155
|
+
*
|
|
156
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
168
157
|
*/
|
|
169
|
-
margin: _propTypes.default.shape({
|
|
158
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
170
159
|
bottom: _propTypes.default.number,
|
|
171
160
|
left: _propTypes.default.number,
|
|
172
161
|
right: _propTypes.default.number,
|
|
173
162
|
top: _propTypes.default.number
|
|
174
|
-
}),
|
|
163
|
+
})]),
|
|
175
164
|
/**
|
|
176
165
|
* Callback fired when an area element is clicked.
|
|
177
166
|
*/
|
|
@@ -197,12 +186,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
197
186
|
* Callback fired when a mark element is clicked.
|
|
198
187
|
*/
|
|
199
188
|
onMarkClick: _propTypes.default.func,
|
|
200
|
-
/**
|
|
201
|
-
* Indicate which axis to display the right of the charts.
|
|
202
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
203
|
-
* @default null
|
|
204
|
-
*/
|
|
205
|
-
rightAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
206
189
|
/**
|
|
207
190
|
* The series to display in the line chart.
|
|
208
191
|
* An array of [[LineSeriesType]] objects.
|
|
@@ -226,12 +209,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
226
209
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
227
210
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
228
211
|
title: _propTypes.default.string,
|
|
229
|
-
/**
|
|
230
|
-
* Indicate which axis to display the top of the charts.
|
|
231
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
232
|
-
* @default null
|
|
233
|
-
*/
|
|
234
|
-
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
235
212
|
/**
|
|
236
213
|
* The width of the chart in px. If not defined, it takes the width of the parent element.
|
|
237
214
|
*/
|
|
@@ -242,6 +219,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
242
219
|
* An array of [[AxisConfig]] objects.
|
|
243
220
|
*/
|
|
244
221
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
222
|
+
axis: _propTypes.default.oneOf(['x']),
|
|
245
223
|
classes: _propTypes.default.object,
|
|
246
224
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
247
225
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -264,13 +242,15 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
264
242
|
disableTicks: _propTypes.default.bool,
|
|
265
243
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
266
244
|
fill: _propTypes.default.string,
|
|
245
|
+
height: _propTypes.default.number,
|
|
267
246
|
hideTooltip: _propTypes.default.bool,
|
|
268
247
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
269
248
|
label: _propTypes.default.string,
|
|
270
249
|
labelStyle: _propTypes.default.object,
|
|
271
250
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
272
251
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
273
|
-
|
|
252
|
+
offset: _propTypes.default.number,
|
|
253
|
+
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
274
254
|
reverse: _propTypes.default.bool,
|
|
275
255
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
276
256
|
slotProps: _propTypes.default.object,
|
|
@@ -279,6 +259,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
279
259
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
280
260
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
281
261
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
262
|
+
tickLabelMinGap: _propTypes.default.number,
|
|
282
263
|
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
283
264
|
tickLabelStyle: _propTypes.default.object,
|
|
284
265
|
tickMaxStep: _propTypes.default.number,
|
|
@@ -294,6 +275,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
294
275
|
* An array of [[AxisConfig]] objects.
|
|
295
276
|
*/
|
|
296
277
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
278
|
+
axis: _propTypes.default.oneOf(['y']),
|
|
297
279
|
classes: _propTypes.default.object,
|
|
298
280
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
299
281
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -322,7 +304,8 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
322
304
|
labelStyle: _propTypes.default.object,
|
|
323
305
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
324
306
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
325
|
-
|
|
307
|
+
offset: _propTypes.default.number,
|
|
308
|
+
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
326
309
|
reverse: _propTypes.default.bool,
|
|
327
310
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
328
311
|
slotProps: _propTypes.default.object,
|
|
@@ -338,6 +321,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
338
321
|
tickNumber: _propTypes.default.number,
|
|
339
322
|
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
340
323
|
tickSize: _propTypes.default.number,
|
|
341
|
-
valueFormatter: _propTypes.default.func
|
|
324
|
+
valueFormatter: _propTypes.default.func,
|
|
325
|
+
width: _propTypes.default.number
|
|
342
326
|
}))
|
|
343
327
|
} : void 0;
|
|
@@ -10,9 +10,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
12
12
|
var _constants = require("../constants");
|
|
13
|
-
var _calculateMargins = require("../internals/calculateMargins");
|
|
14
13
|
var _LineChart = require("./LineChart.plugins");
|
|
15
|
-
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "onAreaClick", "onLineClick", "onMarkClick", "axisHighlight", "disableLineItemHighlight", "hideLegend", "grid", "
|
|
14
|
+
const _excluded = ["xAxis", "yAxis", "series", "width", "height", "margin", "colors", "dataset", "sx", "onAreaClick", "onLineClick", "onMarkClick", "axisHighlight", "disableLineItemHighlight", "hideLegend", "grid", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
16
15
|
/**
|
|
17
16
|
* A helper function that extracts LineChartProps from the input props
|
|
18
17
|
* and returns an object with props for the children components of LineChart.
|
|
@@ -36,12 +35,7 @@ const useLineChartProps = props => {
|
|
|
36
35
|
onMarkClick,
|
|
37
36
|
axisHighlight,
|
|
38
37
|
disableLineItemHighlight,
|
|
39
|
-
hideLegend,
|
|
40
38
|
grid,
|
|
41
|
-
topAxis,
|
|
42
|
-
leftAxis,
|
|
43
|
-
rightAxis,
|
|
44
|
-
bottomAxis,
|
|
45
39
|
children,
|
|
46
40
|
slots,
|
|
47
41
|
slotProps,
|
|
@@ -61,12 +55,7 @@ const useLineChartProps = props => {
|
|
|
61
55
|
}, s)),
|
|
62
56
|
width,
|
|
63
57
|
height,
|
|
64
|
-
margin
|
|
65
|
-
margin,
|
|
66
|
-
hideLegend,
|
|
67
|
-
slotProps,
|
|
68
|
-
series
|
|
69
|
-
}),
|
|
58
|
+
margin,
|
|
70
59
|
colors,
|
|
71
60
|
dataset,
|
|
72
61
|
xAxis: xAxis ?? [{
|
|
@@ -116,10 +105,6 @@ const useLineChartProps = props => {
|
|
|
116
105
|
loading
|
|
117
106
|
};
|
|
118
107
|
const chartsAxisProps = {
|
|
119
|
-
topAxis,
|
|
120
|
-
leftAxis,
|
|
121
|
-
rightAxis,
|
|
122
|
-
bottomAxis,
|
|
123
108
|
slots,
|
|
124
109
|
slotProps
|
|
125
110
|
};
|
|
@@ -140,7 +140,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
|
|
|
140
140
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
141
141
|
index: _propTypes.default.number.isRequired,
|
|
142
142
|
label: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
|
|
143
|
-
labelMarkType: _propTypes.default.oneOf(['circle', 'line', 'square']),
|
|
143
|
+
labelMarkType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'square']), _propTypes.default.func]),
|
|
144
144
|
padAngle: _propTypes.default.number.isRequired,
|
|
145
145
|
startAngle: _propTypes.default.number.isRequired,
|
|
146
146
|
value: _propTypes.default.number.isRequired
|
package/PieChart/PieArcPlot.js
CHANGED
|
@@ -106,7 +106,7 @@ process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
|
|
|
106
106
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
107
107
|
index: _propTypes.default.number.isRequired,
|
|
108
108
|
label: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
|
|
109
|
-
labelMarkType: _propTypes.default.oneOf(['circle', 'line', 'square']),
|
|
109
|
+
labelMarkType: _propTypes.default.oneOfType([_propTypes.default.oneOf(['circle', 'line', 'square']), _propTypes.default.func]),
|
|
110
110
|
padAngle: _propTypes.default.number.isRequired,
|
|
111
111
|
startAngle: _propTypes.default.number.isRequired,
|
|
112
112
|
value: _propTypes.default.number.isRequired
|
package/PieChart/PieChart.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface PieChartProps extends Omit<ChartContainerProps<'pie', PieChartP
|
|
|
15
15
|
* The series to display in the pie chart.
|
|
16
16
|
* An array of [[PieSeriesType]] objects.
|
|
17
17
|
*/
|
|
18
|
-
series: MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[]
|
|
18
|
+
series: Readonly<MakeOptional<PieSeriesType<MakeOptional<PieValueType, 'id'>>, 'type'>[]>;
|
|
19
19
|
/**
|
|
20
20
|
* If `true`, the legend is not rendered.
|
|
21
21
|
*/
|
package/PieChart/PieChart.js
CHANGED
|
@@ -21,6 +21,7 @@ var _ChartDataProvider = require("../ChartDataProvider");
|
|
|
21
21
|
var _useChartContainerProps = require("../ChartContainer/useChartContainerProps");
|
|
22
22
|
var _ChartsWrapper = require("../internals/components/ChartsWrapper");
|
|
23
23
|
var _PieChart = require("./PieChart.plugins");
|
|
24
|
+
var _defaultizeMargin = require("../internals/defaultizeMargin");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const _excluded = ["series", "width", "height", "margin", "colors", "sx", "skipAnimation", "hideLegend", "children", "slots", "slotProps", "onItemClick", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
26
27
|
const defaultMargin = {
|
|
@@ -64,7 +65,7 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
|
|
|
64
65
|
className
|
|
65
66
|
} = props,
|
|
66
67
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
67
|
-
const margin = (0,
|
|
68
|
+
const margin = (0, _defaultizeMargin.defaultizeMargin)(marginProps, defaultMargin);
|
|
68
69
|
const {
|
|
69
70
|
chartDataProviderProps,
|
|
70
71
|
chartsSurfaceProps
|
|
@@ -157,14 +158,15 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
|
|
|
157
158
|
/**
|
|
158
159
|
* The margin between the SVG and the drawing area.
|
|
159
160
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
160
|
-
*
|
|
161
|
+
*
|
|
162
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
161
163
|
*/
|
|
162
|
-
margin: _propTypes.default.shape({
|
|
164
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
163
165
|
bottom: _propTypes.default.number,
|
|
164
166
|
left: _propTypes.default.number,
|
|
165
167
|
right: _propTypes.default.number,
|
|
166
168
|
top: _propTypes.default.number
|
|
167
|
-
}),
|
|
169
|
+
})]),
|
|
168
170
|
/**
|
|
169
171
|
* The callback fired when the highlighted item changes.
|
|
170
172
|
*
|
|
@@ -19,7 +19,7 @@ export interface ScatterChartProps extends Omit<ChartContainerProps<'scatter', S
|
|
|
19
19
|
* The series to display in the scatter chart.
|
|
20
20
|
* An array of [[ScatterSeriesType]] objects.
|
|
21
21
|
*/
|
|
22
|
-
series: MakeOptional<ScatterSeriesType, 'type'>[]
|
|
22
|
+
series: Readonly<MakeOptional<ScatterSeriesType, 'type'>[]>;
|
|
23
23
|
/**
|
|
24
24
|
* The configuration of axes highlight.
|
|
25
25
|
* @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
|
|
@@ -85,12 +85,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
85
85
|
x: _propTypes.default.oneOf(['band', 'line', 'none']),
|
|
86
86
|
y: _propTypes.default.oneOf(['band', 'line', 'none'])
|
|
87
87
|
}),
|
|
88
|
-
/**
|
|
89
|
-
* Indicate which axis to display the bottom of the charts.
|
|
90
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
91
|
-
* @default xAxisIds[0] The id of the first provided axis
|
|
92
|
-
*/
|
|
93
|
-
bottomAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
94
88
|
children: _propTypes.default.node,
|
|
95
89
|
className: _propTypes.default.string,
|
|
96
90
|
/**
|
|
@@ -142,12 +136,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
142
136
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
143
137
|
*/
|
|
144
138
|
id: _propTypes.default.string,
|
|
145
|
-
/**
|
|
146
|
-
* Indicate which axis to display the left of the charts.
|
|
147
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
148
|
-
* @default yAxisIds[0] The id of the first provided axis
|
|
149
|
-
*/
|
|
150
|
-
leftAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
151
139
|
/**
|
|
152
140
|
* If `true`, a loading overlay is displayed.
|
|
153
141
|
* @default false
|
|
@@ -156,14 +144,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
156
144
|
/**
|
|
157
145
|
* The margin between the SVG and the drawing area.
|
|
158
146
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
159
|
-
*
|
|
147
|
+
*
|
|
148
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
160
149
|
*/
|
|
161
|
-
margin: _propTypes.default.shape({
|
|
150
|
+
margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
162
151
|
bottom: _propTypes.default.number,
|
|
163
152
|
left: _propTypes.default.number,
|
|
164
153
|
right: _propTypes.default.number,
|
|
165
154
|
top: _propTypes.default.number
|
|
166
|
-
}),
|
|
155
|
+
})]),
|
|
167
156
|
/**
|
|
168
157
|
* The function called for onClick events.
|
|
169
158
|
* The second argument contains information about all line/bar elements at the current mouse position.
|
|
@@ -183,12 +172,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
183
172
|
* @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier.
|
|
184
173
|
*/
|
|
185
174
|
onItemClick: _propTypes.default.func,
|
|
186
|
-
/**
|
|
187
|
-
* Indicate which axis to display the right of the charts.
|
|
188
|
-
* Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
|
|
189
|
-
* @default null
|
|
190
|
-
*/
|
|
191
|
-
rightAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
192
175
|
/**
|
|
193
176
|
* The series to display in the scatter chart.
|
|
194
177
|
* An array of [[ScatterSeriesType]] objects.
|
|
@@ -212,12 +195,6 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
212
195
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
213
196
|
theme: _propTypes.default.oneOf(['dark', 'light']),
|
|
214
197
|
title: _propTypes.default.string,
|
|
215
|
-
/**
|
|
216
|
-
* Indicate which axis to display the top of the charts.
|
|
217
|
-
* Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
|
|
218
|
-
* @default null
|
|
219
|
-
*/
|
|
220
|
-
topAxis: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.string]),
|
|
221
198
|
/**
|
|
222
199
|
* Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
|
|
223
200
|
* If `undefined`, the radius is assumed to be infinite.
|
|
@@ -233,6 +210,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
233
210
|
* An array of [[AxisConfig]] objects.
|
|
234
211
|
*/
|
|
235
212
|
xAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
213
|
+
axis: _propTypes.default.oneOf(['x']),
|
|
236
214
|
classes: _propTypes.default.object,
|
|
237
215
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
238
216
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -255,13 +233,15 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
255
233
|
disableTicks: _propTypes.default.bool,
|
|
256
234
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
257
235
|
fill: _propTypes.default.string,
|
|
236
|
+
height: _propTypes.default.number,
|
|
258
237
|
hideTooltip: _propTypes.default.bool,
|
|
259
238
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
260
239
|
label: _propTypes.default.string,
|
|
261
240
|
labelStyle: _propTypes.default.object,
|
|
262
241
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
263
242
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
264
|
-
|
|
243
|
+
offset: _propTypes.default.number,
|
|
244
|
+
position: _propTypes.default.oneOf(['bottom', 'none', 'top']),
|
|
265
245
|
reverse: _propTypes.default.bool,
|
|
266
246
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
267
247
|
slotProps: _propTypes.default.object,
|
|
@@ -270,6 +250,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
270
250
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
271
251
|
tickInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.array, _propTypes.default.func]),
|
|
272
252
|
tickLabelInterval: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.func]),
|
|
253
|
+
tickLabelMinGap: _propTypes.default.number,
|
|
273
254
|
tickLabelPlacement: _propTypes.default.oneOf(['middle', 'tick']),
|
|
274
255
|
tickLabelStyle: _propTypes.default.object,
|
|
275
256
|
tickMaxStep: _propTypes.default.number,
|
|
@@ -285,6 +266,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
285
266
|
* An array of [[AxisConfig]] objects.
|
|
286
267
|
*/
|
|
287
268
|
yAxis: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
269
|
+
axis: _propTypes.default.oneOf(['y']),
|
|
288
270
|
classes: _propTypes.default.object,
|
|
289
271
|
colorMap: _propTypes.default.oneOfType([_propTypes.default.shape({
|
|
290
272
|
colors: _propTypes.default.arrayOf(_propTypes.default.string).isRequired,
|
|
@@ -313,7 +295,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
313
295
|
labelStyle: _propTypes.default.object,
|
|
314
296
|
max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
315
297
|
min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
|
|
316
|
-
|
|
298
|
+
offset: _propTypes.default.number,
|
|
299
|
+
position: _propTypes.default.oneOf(['left', 'none', 'right']),
|
|
317
300
|
reverse: _propTypes.default.bool,
|
|
318
301
|
scaleType: _propTypes.default.oneOf(['band', 'linear', 'log', 'point', 'pow', 'sqrt', 'time', 'utc']),
|
|
319
302
|
slotProps: _propTypes.default.object,
|
|
@@ -329,7 +312,8 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
|
|
|
329
312
|
tickNumber: _propTypes.default.number,
|
|
330
313
|
tickPlacement: _propTypes.default.oneOf(['end', 'extremities', 'middle', 'start']),
|
|
331
314
|
tickSize: _propTypes.default.number,
|
|
332
|
-
valueFormatter: _propTypes.default.func
|
|
315
|
+
valueFormatter: _propTypes.default.func,
|
|
316
|
+
width: _propTypes.default.number
|
|
333
317
|
})),
|
|
334
318
|
/**
|
|
335
319
|
* The configuration of the z-axes.
|
|
@@ -8,9 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useScatterChartProps = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
-
var _calculateMargins = require("../internals/calculateMargins");
|
|
12
11
|
var _ScatterChart = require("./ScatterChart.plugins");
|
|
13
|
-
const _excluded = ["xAxis", "yAxis", "zAxis", "series", "axisHighlight", "voronoiMaxRadius", "disableVoronoi", "hideLegend", "width", "height", "margin", "colors", "sx", "grid", "
|
|
12
|
+
const _excluded = ["xAxis", "yAxis", "zAxis", "series", "axisHighlight", "voronoiMaxRadius", "disableVoronoi", "hideLegend", "width", "height", "margin", "colors", "sx", "grid", "onItemClick", "children", "slots", "slotProps", "loading", "highlightedItem", "onHighlightChange", "className"];
|
|
14
13
|
/**
|
|
15
14
|
* A helper function that extracts ScatterChartProps from the input props
|
|
16
15
|
* and returns an object with props for the children components of ScatterChart.
|
|
@@ -27,17 +26,12 @@ const useScatterChartProps = props => {
|
|
|
27
26
|
axisHighlight,
|
|
28
27
|
voronoiMaxRadius,
|
|
29
28
|
disableVoronoi,
|
|
30
|
-
hideLegend,
|
|
31
29
|
width,
|
|
32
30
|
height,
|
|
33
31
|
margin,
|
|
34
32
|
colors,
|
|
35
33
|
sx,
|
|
36
34
|
grid,
|
|
37
|
-
topAxis,
|
|
38
|
-
leftAxis,
|
|
39
|
-
rightAxis,
|
|
40
|
-
bottomAxis,
|
|
41
35
|
onItemClick,
|
|
42
36
|
children,
|
|
43
37
|
slots,
|
|
@@ -54,12 +48,7 @@ const useScatterChartProps = props => {
|
|
|
54
48
|
}, s)),
|
|
55
49
|
width,
|
|
56
50
|
height,
|
|
57
|
-
margin
|
|
58
|
-
margin,
|
|
59
|
-
hideLegend,
|
|
60
|
-
slotProps,
|
|
61
|
-
series
|
|
62
|
-
}),
|
|
51
|
+
margin,
|
|
63
52
|
colors,
|
|
64
53
|
xAxis,
|
|
65
54
|
yAxis,
|
|
@@ -73,10 +62,6 @@ const useScatterChartProps = props => {
|
|
|
73
62
|
plugins: _ScatterChart.SCATTER_CHART_PLUGINS
|
|
74
63
|
});
|
|
75
64
|
const chartsAxisProps = {
|
|
76
|
-
topAxis,
|
|
77
|
-
leftAxis,
|
|
78
|
-
rightAxis,
|
|
79
|
-
bottomAxis,
|
|
80
65
|
slots,
|
|
81
66
|
slotProps
|
|
82
67
|
};
|
|
@@ -67,15 +67,11 @@ export interface SparkLineChartProps extends Omit<ChartContainerProps, 'series'
|
|
|
67
67
|
/**
|
|
68
68
|
* The margin between the SVG and the drawing area.
|
|
69
69
|
* It's used for leaving some space for extra information such as the x- and y-axis or legend.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* bottom: 5,
|
|
74
|
-
* left: 5,
|
|
75
|
-
* right: 5,
|
|
76
|
-
* }
|
|
70
|
+
*
|
|
71
|
+
* Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
|
|
72
|
+
* @default 5
|
|
77
73
|
*/
|
|
78
|
-
margin?: Partial<ChartMargin
|
|
74
|
+
margin?: Partial<ChartMargin> | number;
|
|
79
75
|
/**
|
|
80
76
|
* Overridable component slots.
|
|
81
77
|
* @default {}
|