@mui/x-charts 8.27.0 → 9.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/AnimatedBarElement.d.ts +2 -2
- package/BarChart/AnimatedBarElement.js +1 -1
- package/BarChart/BarChart.d.ts +1 -1
- package/BarChart/BarChart.js +30 -8
- package/BarChart/BarElement.d.ts +2 -2
- package/BarChart/BarElement.js +9 -9
- package/BarChart/BarLabel/BarLabel.js +1 -1
- package/BarChart/FocusedBar.js +4 -6
- package/BarChart/IndividualBarPlot.js +1 -1
- package/BarChart/barClasses.d.ts +1 -1
- package/BarChart/barClasses.js +2 -2
- package/BarChart/barElementClasses.d.ts +2 -1
- package/BarChart/barElementClasses.js +2 -2
- package/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +2 -2
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +2 -1
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.js +2 -15
- package/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/BarChart/seriesConfig/bar/legend.js +0 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltip.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.js +5 -6
- package/BarChart/seriesConfig/index.d.ts +1 -1
- package/BarChart/seriesConfig/index.js +3 -1
- package/BarChart/useBarPlotData.d.ts +1 -1
- package/BarChart/useBarPlotData.js +9 -10
- package/BarChart/useRegisterItemClickHandlers.js +2 -2
- package/CHANGELOG.md +373 -3
- package/ChartContainer/ChartContainer.d.ts +16 -29
- package/ChartContainer/ChartContainer.js +14 -1691
- package/ChartContainer/index.d.ts +1 -8
- package/ChartContainer/useChartContainerProps.d.ts +10 -12
- package/ChartContainer/useChartContainerProps.js +10 -95
- package/ChartDataProvider/ChartDataProvider.d.ts +5 -3
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartDataProvider/useChartDataProviderProps.js +7 -6
- package/ChartsAxis/ChartsAxis.d.ts +1 -0
- package/ChartsAxis/ChartsAxis.js +4 -2
- package/ChartsAxis/axisClasses.d.ts +0 -7
- package/ChartsAxis/axisClasses.js +1 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +2 -2
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +2 -2
- package/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/ChartsContainer/ChartsContainer.js +1715 -0
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainer/useChartsContainerProps.d.ts +12 -0
- package/ChartsContainer/useChartsContainerProps.js +109 -0
- package/ChartsLabel/ChartsLabelMark.js +34 -32
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -3
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLegend/ChartsLegend.js +14 -14
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/legendContext.types.d.ts +10 -6
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -15
- package/ChartsOverlay/ChartsNoDataOverlay.js +3 -15
- package/ChartsOverlay/common.d.ts +1 -0
- package/ChartsOverlay/common.js +22 -0
- package/ChartsSurface/ChartsSurface.js +2 -4
- package/ChartsTooltip/ChartTooltip.types.d.ts +5 -4
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +7 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +22 -2
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/ChartsTooltip/ChartsTooltip.d.ts +10 -2
- package/ChartsTooltip/ChartsTooltip.js +18 -5
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +17 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +20 -4
- package/ChartsTooltip/index.d.ts +1 -2
- package/ChartsTooltip/index.js +0 -12
- package/ChartsTooltip/useAxesTooltip.d.ts +29 -3
- package/ChartsTooltip/useAxesTooltip.js +173 -6
- package/ChartsTooltip/useItemTooltip.d.ts +1 -1
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsWrapper/ChartsWrapper.d.ts +1 -4
- package/ChartsWrapper/ChartsWrapper.js +7 -4
- package/ChartsXAxis/ChartsXAxis.d.ts +3 -1
- package/ChartsXAxis/ChartsXAxis.js +2 -1
- package/ChartsXAxis/ChartsXAxisImpl.js +1 -1
- package/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/ChartsXAxis/shortenLabels.d.ts +2 -2
- package/ChartsXAxis/useAxisTicksProps.d.ts +674 -671
- package/ChartsXAxis/useAxisTicksProps.js +1 -1
- package/ChartsXAxis/utilities.d.ts +1 -1
- package/ChartsXAxis/utilities.js +2 -3
- package/ChartsYAxis/ChartsYAxis.d.ts +3 -1
- package/ChartsYAxis/ChartsYAxis.js +2 -1
- package/ChartsYAxis/ChartsYAxisImpl.js +1 -1
- package/ChartsYAxis/shortenLabels.d.ts +2 -2
- package/ChartsYAxis/useAxisTicksProps.d.ts +674 -671
- package/ChartsYAxis/useAxisTicksProps.js +1 -1
- package/ChartsYAxis/utilities.js +2 -3
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +3 -1
- package/LineChart/AnimatedArea.js +3 -3
- package/LineChart/AnimatedLine.js +4 -4
- package/LineChart/AppearingMask.d.ts +1 -1
- package/LineChart/AppearingMask.js +1 -1
- package/LineChart/AreaElement.d.ts +2 -2
- package/LineChart/AreaElement.js +8 -8
- package/LineChart/AreaPlot.js +1 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/CircleMarkElement.js +5 -5
- package/LineChart/LineChart.d.ts +1 -1
- package/LineChart/LineChart.js +30 -8
- package/LineChart/LineElement.d.ts +2 -2
- package/LineChart/LineElement.js +8 -8
- package/LineChart/LineHighlightElement.d.ts +4 -4
- package/LineChart/LineHighlightElement.js +4 -4
- package/LineChart/LineHighlightPlot.js +3 -3
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +5 -5
- package/LineChart/MarkPlot.js +1 -1
- package/LineChart/markElementClasses.d.ts +1 -1
- package/LineChart/markElementClasses.js +2 -2
- package/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/LineChart/seriesConfig/index.d.ts +1 -1
- package/LineChart/seriesConfig/index.js +3 -1
- package/LineChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/LineChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/LineChart/seriesConfig/legend.d.ts +1 -1
- package/LineChart/seriesConfig/legend.js +0 -1
- package/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/LineChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/LineChart/useMarkPlotData.js +2 -2
- package/PieChart/FocusedPieArc.d.ts +1 -1
- package/PieChart/FocusedPieArc.js +1 -1
- package/PieChart/PieArc.d.ts +4 -4
- package/PieChart/PieArc.js +7 -7
- package/PieChart/PieArcLabel.d.ts +4 -4
- package/PieChart/PieArcLabel.js +6 -6
- package/PieChart/PieArcLabelPlot.d.ts +5 -1
- package/PieChart/PieArcLabelPlot.js +5 -5
- package/PieChart/PieArcPlot.d.ts +5 -1
- package/PieChart/PieArcPlot.js +6 -6
- package/PieChart/PieChart.d.ts +3 -3
- package/PieChart/PieChart.js +9 -8
- package/PieChart/PiePlot.js +2 -2
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +12 -0
- package/PieChart/pieClasses.d.ts +1 -1
- package/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/PieChart/seriesConfig/index.d.ts +1 -1
- package/PieChart/seriesConfig/index.js +3 -1
- package/PieChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/PieChart/seriesConfig/legend.d.ts +1 -1
- package/PieChart/seriesConfig/legend.js +0 -1
- package/PieChart/seriesConfig/seriesLayout.d.ts +1 -1
- package/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/PieChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/RadarChart/RadarAxisHighlight/index.d.ts +2 -1
- package/RadarChart/RadarChart.d.ts +1 -1
- package/RadarChart/RadarChart.js +8 -8
- package/RadarChart/RadarGrid/index.d.ts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +2 -0
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +2 -2
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
- package/RadarChart/index.d.ts +1 -1
- package/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/RadarChart/seriesConfig/index.d.ts +1 -1
- package/RadarChart/seriesConfig/index.js +3 -1
- package/RadarChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/RadarChart/seriesConfig/legend.js +0 -1
- package/RadarChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadarChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/ScatterChart/BatchScatter.d.ts +1 -1
- package/ScatterChart/BatchScatter.js +7 -7
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +30 -8
- package/ScatterChart/scatterClasses.js +2 -2
- package/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.js +3 -1
- package/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/ScatterChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/ScatterChart/seriesConfig/legend.js +0 -1
- package/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/ScatterChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +47 -31
- package/context/ChartProvider/ChartProvider.d.ts +3 -4
- package/context/ChartProvider/ChartProvider.js +2 -15
- package/context/ChartProvider/ChartProvider.types.d.ts +3 -18
- package/context/index.d.ts +2 -1
- package/esm/BarChart/AnimatedBarElement.d.ts +2 -2
- package/esm/BarChart/AnimatedBarElement.js +1 -1
- package/esm/BarChart/BarChart.d.ts +1 -1
- package/esm/BarChart/BarChart.js +30 -8
- package/esm/BarChart/BarElement.d.ts +2 -2
- package/esm/BarChart/BarElement.js +9 -9
- package/esm/BarChart/BarLabel/BarLabel.js +1 -1
- package/esm/BarChart/FocusedBar.js +4 -6
- package/esm/BarChart/IndividualBarPlot.js +1 -1
- package/esm/BarChart/barClasses.d.ts +1 -1
- package/esm/BarChart/barClasses.js +2 -2
- package/esm/BarChart/barElementClasses.d.ts +2 -1
- package/esm/BarChart/barElementClasses.js +2 -2
- package/esm/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +2 -2
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +2 -1
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.js +3 -16
- package/esm/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/legend.js +0 -1
- package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltip.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.js +5 -6
- package/esm/BarChart/seriesConfig/index.d.ts +1 -1
- package/esm/BarChart/seriesConfig/index.js +3 -1
- package/esm/BarChart/useBarPlotData.d.ts +1 -1
- package/esm/BarChart/useBarPlotData.js +9 -10
- package/esm/BarChart/useRegisterItemClickHandlers.js +2 -2
- package/esm/ChartContainer/ChartContainer.d.ts +16 -29
- package/esm/ChartContainer/ChartContainer.js +15 -1690
- package/esm/ChartContainer/index.d.ts +1 -8
- package/esm/ChartContainer/index.js +1 -6
- package/esm/ChartContainer/useChartContainerProps.d.ts +10 -12
- package/esm/ChartContainer/useChartContainerProps.js +11 -94
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +5 -3
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -6
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -0
- package/esm/ChartsAxis/ChartsAxis.js +4 -2
- package/esm/ChartsAxis/axisClasses.d.ts +0 -7
- package/esm/ChartsAxis/axisClasses.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -1
- package/esm/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/esm/ChartsContainer/ChartsContainer.js +1709 -0
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +1 -0
- package/esm/ChartsContainer/useChartsContainerProps.d.ts +12 -0
- package/esm/ChartsContainer/useChartsContainerProps.js +102 -0
- package/esm/ChartsLabel/ChartsLabelMark.js +35 -33
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -3
- package/esm/ChartsLabel/labelMarkClasses.js +1 -2
- package/esm/ChartsLegend/ChartsLegend.js +14 -14
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/legendContext.types.d.ts +10 -6
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +2 -14
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +2 -14
- package/esm/ChartsOverlay/common.d.ts +1 -0
- package/esm/ChartsOverlay/common.js +16 -0
- package/esm/ChartsSurface/ChartsSurface.js +3 -5
- package/esm/ChartsTooltip/ChartTooltip.types.d.ts +5 -4
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +7 -0
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +22 -2
- package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/esm/ChartsTooltip/ChartsTooltip.d.ts +10 -2
- package/esm/ChartsTooltip/ChartsTooltip.js +18 -5
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +17 -2
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +19 -3
- package/esm/ChartsTooltip/index.d.ts +1 -2
- package/esm/ChartsTooltip/index.js +0 -1
- package/esm/ChartsTooltip/useAxesTooltip.d.ts +29 -3
- package/esm/ChartsTooltip/useAxesTooltip.js +173 -5
- package/esm/ChartsTooltip/useItemTooltip.d.ts +1 -1
- package/esm/ChartsTooltip/useItemTooltip.js +1 -1
- package/esm/ChartsWrapper/ChartsWrapper.d.ts +1 -4
- package/esm/ChartsWrapper/ChartsWrapper.js +6 -3
- package/esm/ChartsXAxis/ChartsXAxis.d.ts +3 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -2
- package/esm/ChartsXAxis/ChartsXAxisImpl.js +1 -1
- package/esm/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/esm/ChartsXAxis/shortenLabels.d.ts +2 -2
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +674 -671
- package/esm/ChartsXAxis/useAxisTicksProps.js +1 -1
- package/esm/ChartsXAxis/utilities.d.ts +1 -1
- package/esm/ChartsXAxis/utilities.js +2 -3
- package/esm/ChartsYAxis/ChartsYAxis.d.ts +3 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -2
- package/esm/ChartsYAxis/ChartsYAxisImpl.js +1 -1
- package/esm/ChartsYAxis/shortenLabels.d.ts +2 -2
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +674 -671
- package/esm/ChartsYAxis/useAxisTicksProps.js +1 -1
- package/esm/ChartsYAxis/utilities.js +2 -3
- package/esm/Gauge/GaugeContainer.d.ts +1 -1
- package/esm/Gauge/GaugeContainer.js +3 -1
- package/esm/LineChart/AnimatedArea.js +3 -3
- package/esm/LineChart/AnimatedLine.js +4 -4
- package/esm/LineChart/AppearingMask.d.ts +1 -1
- package/esm/LineChart/AppearingMask.js +1 -1
- package/esm/LineChart/AreaElement.d.ts +2 -2
- package/esm/LineChart/AreaElement.js +8 -8
- package/esm/LineChart/AreaPlot.js +1 -1
- package/esm/LineChart/CircleMarkElement.d.ts +1 -1
- package/esm/LineChart/CircleMarkElement.js +5 -5
- package/esm/LineChart/LineChart.d.ts +1 -1
- package/esm/LineChart/LineChart.js +30 -8
- package/esm/LineChart/LineElement.d.ts +2 -2
- package/esm/LineChart/LineElement.js +8 -8
- package/esm/LineChart/LineHighlightElement.d.ts +4 -4
- package/esm/LineChart/LineHighlightElement.js +4 -4
- package/esm/LineChart/LineHighlightPlot.js +2 -2
- package/esm/LineChart/LinePlot.js +1 -1
- package/esm/LineChart/MarkElement.d.ts +1 -1
- package/esm/LineChart/MarkElement.js +5 -5
- package/esm/LineChart/MarkPlot.js +1 -1
- package/esm/LineChart/markElementClasses.d.ts +1 -1
- package/esm/LineChart/markElementClasses.js +2 -2
- package/esm/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.js +3 -1
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.js +3 -16
- package/esm/LineChart/seriesConfig/legend.d.ts +1 -1
- package/esm/LineChart/seriesConfig/legend.js +0 -1
- package/esm/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/LineChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/LineChart/useMarkPlotData.js +2 -2
- package/esm/PieChart/FocusedPieArc.d.ts +1 -1
- package/esm/PieChart/FocusedPieArc.js +1 -1
- package/esm/PieChart/PieArc.d.ts +4 -4
- package/esm/PieChart/PieArc.js +7 -7
- package/esm/PieChart/PieArcLabel.d.ts +4 -4
- package/esm/PieChart/PieArcLabel.js +6 -6
- package/esm/PieChart/PieArcLabelPlot.d.ts +5 -1
- package/esm/PieChart/PieArcLabelPlot.js +5 -5
- package/esm/PieChart/PieArcPlot.d.ts +5 -1
- package/esm/PieChart/PieArcPlot.js +6 -6
- package/esm/PieChart/PieChart.d.ts +3 -3
- package/esm/PieChart/PieChart.js +9 -8
- package/esm/PieChart/PiePlot.js +2 -2
- package/esm/PieChart/index.d.ts +1 -0
- package/esm/PieChart/index.js +1 -0
- package/esm/PieChart/pieClasses.d.ts +1 -1
- package/esm/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.js +3 -1
- package/esm/PieChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/esm/PieChart/seriesConfig/legend.d.ts +1 -1
- package/esm/PieChart/seriesConfig/legend.js +0 -1
- package/esm/PieChart/seriesConfig/seriesLayout.d.ts +1 -1
- package/esm/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/PieChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/RadarChart/RadarAxisHighlight/index.d.ts +2 -1
- package/esm/RadarChart/RadarAxisHighlight/index.js +2 -1
- package/esm/RadarChart/RadarChart.d.ts +1 -1
- package/esm/RadarChart/RadarChart.js +8 -8
- package/esm/RadarChart/RadarGrid/index.d.ts +2 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +2 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +2 -2
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
- package/esm/RadarChart/index.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.js +3 -1
- package/esm/RadarChart/seriesConfig/keyboardFocusHandler.js +2 -15
- package/esm/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/legend.js +0 -1
- package/esm/RadarChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/ScatterChart/BatchScatter.d.ts +1 -1
- package/esm/ScatterChart/BatchScatter.js +1 -1
- package/esm/ScatterChart/Scatter.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +30 -8
- package/esm/ScatterChart/scatterClasses.js +2 -2
- package/esm/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.js +3 -16
- package/esm/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/legend.js +0 -1
- package/esm/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +47 -31
- package/esm/context/ChartProvider/ChartProvider.d.ts +3 -4
- package/esm/context/ChartProvider/ChartProvider.js +2 -14
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +3 -18
- package/esm/context/index.d.ts +2 -1
- package/esm/hooks/getValueToPositionMapper.d.ts +12 -0
- package/esm/hooks/getValueToPositionMapper.js +21 -0
- package/esm/hooks/index.d.ts +5 -1
- package/esm/hooks/index.js +4 -1
- package/esm/hooks/useAxisCoordinates.d.ts +30 -0
- package/esm/hooks/useAxisCoordinates.js +105 -0
- package/esm/hooks/useAxisTicks.d.ts +14 -0
- package/esm/hooks/useAxisTicks.js +68 -0
- package/esm/hooks/useChartRootRef.d.ts +1 -1
- package/esm/hooks/useChartRootRef.js +4 -2
- package/esm/hooks/useInteractionItemProps.d.ts +3 -3
- package/esm/hooks/useLegend.d.ts +2 -2
- package/esm/hooks/useLegend.js +1 -1
- package/esm/hooks/useScale.d.ts +1 -12
- package/esm/hooks/useScale.js +0 -20
- package/esm/hooks/useSvgRef.js +4 -5
- package/esm/hooks/useTicks.d.ts +19 -4
- package/esm/index.d.ts +3 -1
- package/esm/index.js +2 -1
- package/esm/internals/commonNextFocusItem.d.ts +2 -0
- package/esm/internals/commonNextFocusItem.js +3 -2
- package/esm/internals/components/WebGLContext.d.ts +3 -0
- package/esm/internals/components/WebGLContext.js +108 -0
- package/esm/internals/consumeSlots.js +1 -1
- package/esm/internals/consumeThemeProps.js +1 -1
- package/esm/internals/createCommonKeyboardFocusHandler.d.ts +25 -0
- package/esm/internals/createCommonKeyboardFocusHandler.js +22 -0
- package/esm/internals/{getBarDimensions.d.ts → createGetBarDimensions.d.ts} +2 -4
- package/esm/internals/createGetBarDimensions.js +55 -0
- package/esm/internals/getChartPoint.d.ts +7 -0
- package/esm/internals/getChartPoint.js +13 -0
- package/esm/internals/getGraphemeCount.js +3 -1
- package/esm/internals/getSeriesColorFn.d.ts +3 -2
- package/esm/internals/identifierCleaner.d.ts +11 -0
- package/esm/internals/identifierCleaner.js +12 -0
- package/esm/internals/index.d.ts +8 -2
- package/esm/internals/index.js +8 -3
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +5 -3
- package/esm/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/esm/internals/plugins/corePlugins/index.d.ts +2 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +4 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +5 -5
- package/esm/internals/plugins/corePlugins/useChartElementRef/index.d.ts +2 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/index.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.js +14 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.types.d.ts +15 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +5 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +9 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +12 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +41 -19
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +4 -7
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +19 -14
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/index.d.ts +4 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/index.js +3 -0
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/cartesianExtremumGetter.types.d.ts +3 -3
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/colorProcessor.types.d.ts +4 -4
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +8 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +3 -0
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.d.ts +3 -1
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.js +3 -1
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +4 -0
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/polarExtremumGetter.types.d.ts +3 -3
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesConfig.types.d.ts +13 -5
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/seriesLayout.types.d.ts +3 -3
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesProcessor.types.d.ts +4 -4
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/tooltipGetter.types.d.ts +7 -7
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.js +1 -0
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/tooltipItemPositionGetter.types.d.ts +7 -7
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.js +35 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.d.ts +6 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.js +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +48 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +15 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.js +18 -0
- package/esm/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -3
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +6 -4
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +14 -14
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +4 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +22 -9
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +38 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +24 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +50 -51
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +6 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +2 -53
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.ts +25 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +149 -0
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -3
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +11 -7
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +3 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +17 -19
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +5 -4
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -3
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +7 -7
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +8 -7
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js +14 -7
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +9 -8
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -6
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +6 -3
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +3 -3
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/esm/internals/plugins/models/index.d.ts +1 -2
- package/esm/internals/plugins/models/index.js +1 -2
- package/esm/internals/plugins/models/plugin.d.ts +1 -16
- package/esm/internals/plugins/utils/defaultSeriesConfig.d.ts +2 -0
- package/esm/internals/plugins/utils/defaultSeriesConfig.js +10 -0
- package/esm/internals/seriesSelectorOfType.d.ts +8 -8
- package/esm/internals/seriesSelectorOfType.js +1 -1
- package/esm/internals/sliceUntil.js +3 -1
- package/esm/internals/stacking/stackSeries.d.ts +3 -2
- package/esm/internals/stacking/stackSeries.js +0 -1
- package/esm/internals/store/useCharts.d.ts +2 -7
- package/esm/internals/store/useCharts.js +4 -12
- package/esm/internals/store/useCharts.types.d.ts +6 -0
- package/esm/models/axis.d.ts +16 -3
- package/esm/models/index.d.ts +1 -0
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/common.d.ts +5 -5
- package/esm/models/seriesType/config.d.ts +8 -1
- package/esm/models/seriesType/index.d.ts +8 -30
- package/esm/models/seriesType/index.js +1 -32
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/seriesType/radar.d.ts +1 -1
- package/esm/models/seriesType/scatter.d.ts +1 -1
- package/hooks/getValueToPositionMapper.d.ts +12 -0
- package/hooks/getValueToPositionMapper.js +26 -0
- package/hooks/index.d.ts +5 -1
- package/hooks/index.js +40 -1
- package/hooks/useAxisCoordinates.d.ts +30 -0
- package/hooks/useAxisCoordinates.js +115 -0
- package/hooks/useAxisTicks.d.ts +14 -0
- package/hooks/useAxisTicks.js +75 -0
- package/hooks/useChartRootRef.d.ts +1 -1
- package/hooks/useChartRootRef.js +4 -2
- package/hooks/useInteractionItemProps.d.ts +3 -3
- package/hooks/useLegend.d.ts +2 -2
- package/hooks/useLegend.js +2 -2
- package/hooks/useScale.d.ts +1 -12
- package/hooks/useScale.js +0 -21
- package/hooks/useSvgRef.js +4 -5
- package/hooks/useTicks.d.ts +19 -4
- package/index.d.ts +3 -1
- package/index.js +9 -1
- package/internals/commonNextFocusItem.d.ts +2 -0
- package/internals/commonNextFocusItem.js +4 -2
- package/internals/components/WebGLContext.d.ts +3 -0
- package/internals/components/WebGLContext.js +116 -0
- package/internals/consumeSlots.js +1 -1
- package/internals/consumeThemeProps.js +1 -1
- package/internals/createCommonKeyboardFocusHandler.d.ts +25 -0
- package/internals/createCommonKeyboardFocusHandler.js +27 -0
- package/internals/{getBarDimensions.d.ts → createGetBarDimensions.d.ts} +2 -4
- package/internals/createGetBarDimensions.js +61 -0
- package/internals/getChartPoint.d.ts +7 -0
- package/internals/getChartPoint.js +19 -0
- package/internals/getGraphemeCount.js +3 -1
- package/internals/getSeriesColorFn.d.ts +3 -2
- package/internals/identifierCleaner.d.ts +11 -0
- package/internals/identifierCleaner.js +19 -0
- package/internals/index.d.ts +8 -2
- package/internals/index.js +72 -4
- package/internals/plugins/corePlugins/corePlugins.d.ts +5 -3
- package/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/internals/plugins/corePlugins/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +4 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +5 -5
- package/internals/plugins/corePlugins/useChartElementRef/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartElementRef/index.js +12 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.js +21 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.types.d.ts +15 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +5 -2
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -3
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +9 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +12 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +42 -19
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +4 -7
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +5 -5
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +19 -14
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/index.d.ts +4 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/index.js +39 -0
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/colorProcessor.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +3 -0
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.d.ts +3 -1
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.js +22 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +4 -0
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/polarExtremumGetter.types.d.ts +3 -3
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesConfig.types.d.ts +13 -5
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/seriesLayout.types.d.ts +3 -3
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesProcessor.types.d.ts +4 -4
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/tooltipGetter.types.d.ts +7 -7
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.js +5 -0
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/tooltipItemPositionGetter.types.d.ts +7 -7
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.js +42 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.d.ts +6 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.js +10 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +48 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +15 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.js +25 -0
- package/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.d.ts +2 -2
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -3
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +2 -2
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +6 -4
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +14 -14
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +21 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +38 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +24 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +50 -51
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +7 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +6 -24
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +2 -53
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.ts +25 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +155 -0
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -3
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +11 -7
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +5 -5
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +17 -19
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -3
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +4 -4
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +5 -4
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +7 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +8 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.js +14 -7
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -1
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +9 -8
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -6
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +6 -3
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/internals/plugins/models/index.d.ts +1 -2
- package/internals/plugins/models/index.js +0 -11
- package/internals/plugins/models/plugin.d.ts +1 -16
- package/internals/plugins/utils/defaultSeriesConfig.d.ts +2 -0
- package/internals/plugins/utils/defaultSeriesConfig.js +16 -0
- package/internals/seriesSelectorOfType.d.ts +8 -8
- package/internals/seriesSelectorOfType.js +1 -1
- package/internals/sliceUntil.js +3 -1
- package/internals/stacking/stackSeries.d.ts +3 -2
- package/internals/stacking/stackSeries.js +0 -1
- package/internals/store/useCharts.d.ts +2 -7
- package/internals/store/useCharts.js +4 -12
- package/internals/store/useCharts.types.d.ts +6 -0
- package/models/axis.d.ts +16 -3
- package/models/index.d.ts +1 -0
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/common.d.ts +5 -5
- package/models/seriesType/config.d.ts +8 -1
- package/models/seriesType/index.d.ts +8 -30
- package/models/seriesType/index.js +1 -48
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/radar.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +1 -1
- package/package.json +20 -8
- package/ChartsTooltip/useAxisTooltip.d.ts +0 -42
- package/ChartsTooltip/useAxisTooltip.js +0 -181
- package/esm/ChartsTooltip/useAxisTooltip.d.ts +0 -42
- package/esm/ChartsTooltip/useAxisTooltip.js +0 -176
- package/esm/internals/getBarDimensions.js +0 -55
- package/esm/internals/getSVGPoint.d.ts +0 -6
- package/esm/internals/getSVGPoint.js +0 -11
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +0 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +0 -5
- package/esm/internals/plugins/models/seriesConfig/getItemAtPosition.types.d.ts +0 -8
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +0 -3
- package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +0 -2
- package/esm/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +0 -4
- package/internals/getBarDimensions.js +0 -61
- package/internals/getSVGPoint.d.ts +0 -6
- package/internals/getSVGPoint.js +0 -17
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +0 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +0 -12
- package/internals/plugins/models/seriesConfig/getItemAtPosition.types.d.ts +0 -8
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +0 -3
- package/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +0 -2
- package/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +0 -4
- /package/esm/internals/plugins/{models/seriesConfig/cartesianExtremumGetter.types.js → corePlugins/useChartElementRef/useChartElementRef.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/colorProcessor.types.js → corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/getItemAtPosition.types.js → corePlugins/useChartSeriesConfig/types/colorProcessor.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/getSeriesWithDefaultValues.types.js → corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/identifierSerializer.types.js → corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/legendGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierCleaner.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/polarExtremumGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierSerializer.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesConfig.types.js → corePlugins/useChartSeriesConfig/types/legendGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesLayout.types.js → corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesProcessor.types.js → corePlugins/useChartSeriesConfig/types/seriesConfig.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/tooltipGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesLayout.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/tooltipItemPositionGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesProcessor.types.js} +0 -0
- /package/esm/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.js +0 -0
- /package/internals/plugins/{models/seriesConfig/cartesianExtremumGetter.types.js → corePlugins/useChartElementRef/useChartElementRef.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/colorProcessor.types.js → corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/getItemAtPosition.types.js → corePlugins/useChartSeriesConfig/types/colorProcessor.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/getSeriesWithDefaultValues.types.js → corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/identifierSerializer.types.js → corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/legendGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierCleaner.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/polarExtremumGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierSerializer.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesConfig.types.js → corePlugins/useChartSeriesConfig/types/legendGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesLayout.types.js → corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesProcessor.types.js → corePlugins/useChartSeriesConfig/types/seriesConfig.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/tooltipGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesLayout.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/tooltipItemPositionGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesProcessor.types.js} +0 -0
- /package/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.js +0 -0
|
@@ -263,24 +263,24 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
263
263
|
*/
|
|
264
264
|
hiddenItems: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
265
265
|
dataIndex: PropTypes.number,
|
|
266
|
-
seriesId: PropTypes.
|
|
267
|
-
type: PropTypes.oneOf(['bar'])
|
|
266
|
+
seriesId: PropTypes.string.isRequired,
|
|
267
|
+
type: PropTypes.oneOf(['bar'])
|
|
268
268
|
}), PropTypes.shape({
|
|
269
269
|
dataIndex: PropTypes.number,
|
|
270
|
-
seriesId: PropTypes.
|
|
271
|
-
type: PropTypes.oneOf(['line'])
|
|
270
|
+
seriesId: PropTypes.string.isRequired,
|
|
271
|
+
type: PropTypes.oneOf(['line'])
|
|
272
272
|
}), PropTypes.shape({
|
|
273
273
|
dataIndex: PropTypes.number,
|
|
274
|
-
seriesId: PropTypes.
|
|
275
|
-
type: PropTypes.oneOf(['scatter'])
|
|
274
|
+
seriesId: PropTypes.string.isRequired,
|
|
275
|
+
type: PropTypes.oneOf(['scatter'])
|
|
276
276
|
}), PropTypes.shape({
|
|
277
277
|
dataIndex: PropTypes.number,
|
|
278
|
-
seriesId: PropTypes.
|
|
279
|
-
type: PropTypes.oneOf(['pie'])
|
|
278
|
+
seriesId: PropTypes.string.isRequired,
|
|
279
|
+
type: PropTypes.oneOf(['pie'])
|
|
280
280
|
}), PropTypes.shape({
|
|
281
281
|
dataIndex: PropTypes.number,
|
|
282
|
-
seriesId: PropTypes.
|
|
283
|
-
type: PropTypes.oneOf(['radar'])
|
|
282
|
+
seriesId: PropTypes.string.isRequired,
|
|
283
|
+
type: PropTypes.oneOf(['radar'])
|
|
284
284
|
})]).isRequired),
|
|
285
285
|
/**
|
|
286
286
|
* The controlled axis highlight.
|
|
@@ -296,7 +296,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
296
296
|
*/
|
|
297
297
|
highlightedItem: PropTypes.shape({
|
|
298
298
|
dataIndex: PropTypes.number,
|
|
299
|
-
seriesId: PropTypes.
|
|
299
|
+
seriesId: PropTypes.string.isRequired
|
|
300
300
|
}),
|
|
301
301
|
/**
|
|
302
302
|
* This prop is used to help implement the accessibility logic.
|
|
@@ -326,24 +326,24 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
326
326
|
*/
|
|
327
327
|
initialHiddenItems: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
328
328
|
dataIndex: PropTypes.number,
|
|
329
|
-
seriesId: PropTypes.
|
|
330
|
-
type: PropTypes.oneOf(['bar'])
|
|
329
|
+
seriesId: PropTypes.string.isRequired,
|
|
330
|
+
type: PropTypes.oneOf(['bar'])
|
|
331
331
|
}), PropTypes.shape({
|
|
332
332
|
dataIndex: PropTypes.number,
|
|
333
|
-
seriesId: PropTypes.
|
|
334
|
-
type: PropTypes.oneOf(['line'])
|
|
333
|
+
seriesId: PropTypes.string.isRequired,
|
|
334
|
+
type: PropTypes.oneOf(['line'])
|
|
335
335
|
}), PropTypes.shape({
|
|
336
336
|
dataIndex: PropTypes.number,
|
|
337
|
-
seriesId: PropTypes.
|
|
338
|
-
type: PropTypes.oneOf(['scatter'])
|
|
337
|
+
seriesId: PropTypes.string.isRequired,
|
|
338
|
+
type: PropTypes.oneOf(['scatter'])
|
|
339
339
|
}), PropTypes.shape({
|
|
340
340
|
dataIndex: PropTypes.number,
|
|
341
|
-
seriesId: PropTypes.
|
|
342
|
-
type: PropTypes.oneOf(['pie'])
|
|
341
|
+
seriesId: PropTypes.string.isRequired,
|
|
342
|
+
type: PropTypes.oneOf(['pie'])
|
|
343
343
|
}), PropTypes.shape({
|
|
344
344
|
dataIndex: PropTypes.number,
|
|
345
|
-
seriesId: PropTypes.
|
|
346
|
-
type: PropTypes.oneOf(['radar'])
|
|
345
|
+
seriesId: PropTypes.string.isRequired,
|
|
346
|
+
type: PropTypes.oneOf(['radar'])
|
|
347
347
|
})]).isRequired),
|
|
348
348
|
/**
|
|
349
349
|
* Localized text for chart components.
|
|
@@ -395,6 +395,14 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
395
395
|
* @param {ScatterItemIdentifier} scatterItemIdentifier Identify which item got clicked
|
|
396
396
|
*/
|
|
397
397
|
onItemClick: PropTypes.func,
|
|
398
|
+
/**
|
|
399
|
+
* The function called when the pointer position corresponds to a new axis data item.
|
|
400
|
+
* This update can either be caused by a pointer movement, or an axis update.
|
|
401
|
+
* In case of multiple axes, the function is called if at least one axis is updated.
|
|
402
|
+
* The argument contains the identifier for all axes with a `data` property.
|
|
403
|
+
* @param {AxisItemIdentifier[]} axisItems The array of axes item identifiers.
|
|
404
|
+
*/
|
|
405
|
+
onTooltipAxisChange: PropTypes.func,
|
|
398
406
|
/**
|
|
399
407
|
* The callback fired when the tooltip item changes.
|
|
400
408
|
*
|
|
@@ -436,30 +444,38 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
|
|
|
436
444
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
437
445
|
theme: PropTypes.oneOf(['dark', 'light']),
|
|
438
446
|
title: PropTypes.string,
|
|
447
|
+
/**
|
|
448
|
+
* The controlled axis tooltip.
|
|
449
|
+
* Identified by the axis id, and data index.
|
|
450
|
+
*/
|
|
451
|
+
tooltipAxis: PropTypes.arrayOf(PropTypes.shape({
|
|
452
|
+
axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
453
|
+
dataIndex: PropTypes.number.isRequired
|
|
454
|
+
})),
|
|
439
455
|
/**
|
|
440
456
|
* The tooltip item.
|
|
441
457
|
* Used when the tooltip is controlled.
|
|
442
458
|
*/
|
|
443
459
|
tooltipItem: PropTypes.oneOfType([PropTypes.shape({
|
|
444
460
|
dataIndex: PropTypes.number.isRequired,
|
|
445
|
-
seriesId: PropTypes.
|
|
446
|
-
type: PropTypes.oneOf(['bar'])
|
|
461
|
+
seriesId: PropTypes.string.isRequired,
|
|
462
|
+
type: PropTypes.oneOf(['bar'])
|
|
447
463
|
}), PropTypes.shape({
|
|
448
464
|
dataIndex: PropTypes.number,
|
|
449
|
-
seriesId: PropTypes.
|
|
450
|
-
type: PropTypes.oneOf(['line'])
|
|
465
|
+
seriesId: PropTypes.string.isRequired,
|
|
466
|
+
type: PropTypes.oneOf(['line'])
|
|
451
467
|
}), PropTypes.shape({
|
|
452
468
|
dataIndex: PropTypes.number.isRequired,
|
|
453
|
-
seriesId: PropTypes.
|
|
454
|
-
type: PropTypes.oneOf(['scatter'])
|
|
469
|
+
seriesId: PropTypes.string.isRequired,
|
|
470
|
+
type: PropTypes.oneOf(['scatter'])
|
|
455
471
|
}), PropTypes.shape({
|
|
456
472
|
dataIndex: PropTypes.number.isRequired,
|
|
457
|
-
seriesId: PropTypes.
|
|
458
|
-
type: PropTypes.oneOf(['pie'])
|
|
473
|
+
seriesId: PropTypes.string.isRequired,
|
|
474
|
+
type: PropTypes.oneOf(['pie'])
|
|
459
475
|
}), PropTypes.shape({
|
|
460
476
|
dataIndex: PropTypes.number,
|
|
461
|
-
seriesId: PropTypes.
|
|
462
|
-
type: PropTypes.oneOf(['radar'])
|
|
477
|
+
seriesId: PropTypes.string.isRequired,
|
|
478
|
+
type: PropTypes.oneOf(['radar'])
|
|
463
479
|
})]),
|
|
464
480
|
/**
|
|
465
481
|
* Formatter used by the tooltip.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ChartProviderProps } from "./ChartProvider.types.js";
|
|
3
3
|
import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
declare function ChartProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]>(props: React.PropsWithChildren<ChartProviderProps<TSeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
import type { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
5
|
+
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
6
|
+
declare function ChartProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<TSeriesType>>(props: React.PropsWithChildren<ChartProviderProps<TSeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
|
|
8
7
|
export { ChartProvider };
|
|
@@ -8,18 +8,7 @@ import { useChartTooltip } from "../../internals/plugins/featurePlugins/useChart
|
|
|
8
8
|
import { useChartInteraction } from "../../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
9
9
|
import { useChartZAxis } from "../../internals/plugins/featurePlugins/useChartZAxis/index.js";
|
|
10
10
|
import { useChartHighlight } from "../../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js";
|
|
11
|
-
import { barSeriesConfig } from "../../BarChart/seriesConfig/index.js";
|
|
12
|
-
import { scatterSeriesConfig } from "../../ScatterChart/seriesConfig/index.js";
|
|
13
|
-
import { lineSeriesConfig } from "../../LineChart/seriesConfig/index.js";
|
|
14
|
-
import { pieSeriesConfig } from "../../PieChart/seriesConfig/index.js";
|
|
15
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
export const defaultSeriesConfig = {
|
|
17
|
-
bar: barSeriesConfig,
|
|
18
|
-
scatter: scatterSeriesConfig,
|
|
19
|
-
line: lineSeriesConfig,
|
|
20
|
-
pie: pieSeriesConfig
|
|
21
|
-
};
|
|
22
|
-
|
|
23
12
|
// For consistency with the v7, the cartesian axes are set by default.
|
|
24
13
|
// To remove them, you can provide a `plugins` props.
|
|
25
14
|
const defaultPlugins = [useChartZAxis, useChartTooltip, useChartInteraction, useChartCartesianAxis, useChartHighlight];
|
|
@@ -27,12 +16,11 @@ function ChartProvider(props) {
|
|
|
27
16
|
const {
|
|
28
17
|
children,
|
|
29
18
|
plugins = defaultPlugins,
|
|
30
|
-
pluginParams = {}
|
|
31
|
-
seriesConfig = defaultSeriesConfig
|
|
19
|
+
pluginParams = {}
|
|
32
20
|
} = props;
|
|
33
21
|
const {
|
|
34
22
|
contextValue
|
|
35
|
-
} = useCharts(plugins, pluginParams
|
|
23
|
+
} = useCharts(plugins, pluginParams);
|
|
36
24
|
return /*#__PURE__*/_jsx(ChartContext.Provider, {
|
|
37
25
|
value: contextValue,
|
|
38
26
|
children: children
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type * as React from 'react';
|
|
2
1
|
import { type Store } from '@mui/x-internals/store';
|
|
3
2
|
import type { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ChartState, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from "../../internals/plugins/models/index.js";
|
|
4
3
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
5
|
-
import type { ChartSeriesConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
6
4
|
import type { UseChartBaseProps } from "../../internals/store/useCharts.types.js";
|
|
7
5
|
import type { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
8
6
|
export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignature[], TOptionalSignatures extends readonly ChartAnyPluginSignature[] = []> = {
|
|
@@ -18,25 +16,12 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
|
|
|
18
16
|
* The internal state of the chart.
|
|
19
17
|
*/
|
|
20
18
|
store: Store<ChartState<TSignatures, TOptionalSignatures>>;
|
|
21
|
-
/**
|
|
22
|
-
* The ref to the <svg />.
|
|
23
|
-
*/
|
|
24
|
-
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
25
|
-
/**
|
|
26
|
-
* The ref to the chart root element.
|
|
27
|
-
*/
|
|
28
|
-
chartRootRef: React.RefObject<HTMLDivElement | null>;
|
|
29
19
|
};
|
|
30
|
-
export type ChartPluginParams<TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures
|
|
31
|
-
export interface ChartProviderProps<
|
|
20
|
+
export type ChartPluginParams<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<TSeriesType>, ...TSignatures], 'params'>;
|
|
21
|
+
export interface ChartProviderProps<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
|
|
32
22
|
/**
|
|
33
23
|
* Array of plugins used to add features to the chart.
|
|
34
24
|
*/
|
|
35
25
|
plugins?: ConvertSignaturesIntoPlugins<TSignatures>;
|
|
36
|
-
pluginParams?: ChartPluginParams<TSignatures>;
|
|
37
|
-
/**
|
|
38
|
-
* The configuration helpers used to compute attributes according to the series type.
|
|
39
|
-
* @ignore Unstable props for internal usage.
|
|
40
|
-
*/
|
|
41
|
-
seriesConfig?: ChartSeriesConfig<TSeries>;
|
|
26
|
+
pluginParams?: ChartPluginParams<TSeriesType, TSignatures>;
|
|
42
27
|
}
|
package/esm/context/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { FadeOptions, HighlightItemData, HighlightOptions } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
2
|
+
export type { HighlightScope } from "../models/seriesType/config.js";
|
|
2
3
|
export * from "./useChartApiContext.js";
|
|
3
4
|
export type { ChartApi } from "./ChartApi.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { D3Scale } from "../models/axis.js";
|
|
2
|
+
/**
|
|
3
|
+
* For a given scale return a function that map value to their position.
|
|
4
|
+
* Useful when dealing with specific scale such as band.
|
|
5
|
+
* @param {D3Scale} scale The scale to use
|
|
6
|
+
* @returns {(value: any) => number} A function that map value to their position
|
|
7
|
+
*/
|
|
8
|
+
export declare function getValueToPositionMapper<Domain extends {
|
|
9
|
+
toString(): string;
|
|
10
|
+
} = {
|
|
11
|
+
toString(): string;
|
|
12
|
+
}, Range = number>(scale: D3Scale<Domain, Range>): (value: any) => number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { isOrdinalScale } from "../internals/scaleGuards.js";
|
|
4
|
+
/**
|
|
5
|
+
* For a given scale return a function that map value to their position.
|
|
6
|
+
* Useful when dealing with specific scale such as band.
|
|
7
|
+
* @param {D3Scale} scale The scale to use
|
|
8
|
+
* @returns {(value: any) => number} A function that map value to their position
|
|
9
|
+
*/
|
|
10
|
+
export function getValueToPositionMapper(scale) {
|
|
11
|
+
if (isOrdinalScale(scale)) {
|
|
12
|
+
return value => (scale(value) ?? 0) + scale.bandwidth() / 2;
|
|
13
|
+
}
|
|
14
|
+
const domain = scale.domain();
|
|
15
|
+
|
|
16
|
+
// Fixes https://github.com/mui/mui-x/issues/18999#issuecomment-3173787401
|
|
17
|
+
if (domain[0] === domain[1]) {
|
|
18
|
+
return value => value === domain[0] ? scale(value) : NaN;
|
|
19
|
+
}
|
|
20
|
+
return value => scale(value);
|
|
21
|
+
}
|
package/esm/hooks/index.d.ts
CHANGED
|
@@ -20,4 +20,8 @@ export * from "./animation/index.js";
|
|
|
20
20
|
export * from "./useChartRootRef.js";
|
|
21
21
|
export * from "./useChartsLocalization.js";
|
|
22
22
|
export * from "./useBrush.js";
|
|
23
|
-
export * from "./useFocusedItem.js";
|
|
23
|
+
export * from "./useFocusedItem.js";
|
|
24
|
+
export { useXAxisCoordinates, useYAxisCoordinates, type AxisCoordinates } from "./useAxisCoordinates.js";
|
|
25
|
+
export * from "./useAxisTicks.js";
|
|
26
|
+
export { type TickItem } from "./useTicks.js";
|
|
27
|
+
export * from "./getValueToPositionMapper.js";
|
package/esm/hooks/index.js
CHANGED
|
@@ -20,4 +20,7 @@ export * from "./animation/index.js";
|
|
|
20
20
|
export * from "./useChartRootRef.js";
|
|
21
21
|
export * from "./useChartsLocalization.js";
|
|
22
22
|
export * from "./useBrush.js";
|
|
23
|
-
export * from "./useFocusedItem.js";
|
|
23
|
+
export * from "./useFocusedItem.js";
|
|
24
|
+
export { useXAxisCoordinates, useYAxisCoordinates } from "./useAxisCoordinates.js";
|
|
25
|
+
export * from "./useAxisTicks.js";
|
|
26
|
+
export * from "./getValueToPositionMapper.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ChartDrawingArea } from "./useDrawingArea.js";
|
|
2
|
+
import { type AxisId, type ComputedXAxis, type ComputedYAxis } from "../models/axis.js";
|
|
3
|
+
export interface AxisCoordinates {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
right: number;
|
|
7
|
+
bottom: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function getXAxisCoordinates(drawingArea: ChartDrawingArea, computedAxis: {
|
|
10
|
+
position?: ComputedXAxis['position'];
|
|
11
|
+
offset: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}): AxisCoordinates | null;
|
|
14
|
+
/**
|
|
15
|
+
* Get the coordinates of the given X axis. The coordinates are relative to the SVG's origin.
|
|
16
|
+
* @param axisId The id of the X axis.
|
|
17
|
+
* @returns {AxisCoordinates | null} The coordinates of the X axis or null if the axis does not exist or has position: 'none'.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useXAxisCoordinates(axisId: AxisId): AxisCoordinates | null;
|
|
20
|
+
export declare function getYAxisCoordinates(drawingArea: ChartDrawingArea, computedAxis: {
|
|
21
|
+
position?: ComputedYAxis['position'];
|
|
22
|
+
offset: number;
|
|
23
|
+
width: number;
|
|
24
|
+
}): AxisCoordinates | null;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the coordinates of the given Y axis. The coordinates are relative to the SVG's origin.
|
|
27
|
+
* @param axisId The id of the Y axis.
|
|
28
|
+
* @returns {AxisCoordinates | null} The coordinates of the Y axis or null if the axis does not exist or has position: 'none'.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useYAxisCoordinates(axisId: AxisId): AxisCoordinates | null;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
3
|
+
import { useDrawingArea } from "./useDrawingArea.js";
|
|
4
|
+
import { useXAxes, useYAxes } from "./useAxis.js";
|
|
5
|
+
import { defaultProps } from "../ChartsXAxis/utilities.js";
|
|
6
|
+
export function getXAxisCoordinates(drawingArea, computedAxis) {
|
|
7
|
+
const {
|
|
8
|
+
position,
|
|
9
|
+
offset,
|
|
10
|
+
height: axisHeight
|
|
11
|
+
} = computedAxis;
|
|
12
|
+
if (position === 'none') {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
let top;
|
|
16
|
+
if (position === 'top') {
|
|
17
|
+
top = drawingArea.top - axisHeight - offset;
|
|
18
|
+
} else {
|
|
19
|
+
top = drawingArea.top + drawingArea.height + offset;
|
|
20
|
+
}
|
|
21
|
+
const left = drawingArea.left;
|
|
22
|
+
const bottom = top + axisHeight;
|
|
23
|
+
const right = drawingArea.left + drawingArea.width;
|
|
24
|
+
return {
|
|
25
|
+
left,
|
|
26
|
+
top,
|
|
27
|
+
right,
|
|
28
|
+
bottom
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get the coordinates of the given X axis. The coordinates are relative to the SVG's origin.
|
|
34
|
+
* @param axisId The id of the X axis.
|
|
35
|
+
* @returns {AxisCoordinates | null} The coordinates of the X axis or null if the axis does not exist or has position: 'none'.
|
|
36
|
+
*/
|
|
37
|
+
export function useXAxisCoordinates(axisId) {
|
|
38
|
+
const {
|
|
39
|
+
xAxis: xAxes
|
|
40
|
+
} = useXAxes();
|
|
41
|
+
const drawingArea = useDrawingArea();
|
|
42
|
+
const axis = xAxes[axisId];
|
|
43
|
+
|
|
44
|
+
// FIXME(v9): Remove
|
|
45
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
46
|
+
const themedProps = useThemeProps({
|
|
47
|
+
props: axis,
|
|
48
|
+
name: 'MuiChartsXAxis'
|
|
49
|
+
});
|
|
50
|
+
if (!axis) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const defaultizedProps = _extends({}, defaultProps, themedProps);
|
|
54
|
+
return getXAxisCoordinates(drawingArea, defaultizedProps);
|
|
55
|
+
}
|
|
56
|
+
export function getYAxisCoordinates(drawingArea, computedAxis) {
|
|
57
|
+
const {
|
|
58
|
+
position,
|
|
59
|
+
offset,
|
|
60
|
+
width: axisWidth
|
|
61
|
+
} = computedAxis;
|
|
62
|
+
if (position === 'none') {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
let left;
|
|
66
|
+
if (position === 'right') {
|
|
67
|
+
left = drawingArea.left + drawingArea.width + offset;
|
|
68
|
+
} else {
|
|
69
|
+
left = drawingArea.left - axisWidth - offset;
|
|
70
|
+
}
|
|
71
|
+
const top = drawingArea.top;
|
|
72
|
+
const bottom = drawingArea.top + drawingArea.height;
|
|
73
|
+
const right = left + axisWidth;
|
|
74
|
+
return {
|
|
75
|
+
left,
|
|
76
|
+
top,
|
|
77
|
+
right,
|
|
78
|
+
bottom
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Returns the coordinates of the given Y axis. The coordinates are relative to the SVG's origin.
|
|
84
|
+
* @param axisId The id of the Y axis.
|
|
85
|
+
* @returns {AxisCoordinates | null} The coordinates of the Y axis or null if the axis does not exist or has position: 'none'.
|
|
86
|
+
*/
|
|
87
|
+
export function useYAxisCoordinates(axisId) {
|
|
88
|
+
const {
|
|
89
|
+
yAxis: yAxes
|
|
90
|
+
} = useYAxes();
|
|
91
|
+
const drawingArea = useDrawingArea();
|
|
92
|
+
const axis = yAxes[axisId];
|
|
93
|
+
|
|
94
|
+
// FIXME(v9): Remove
|
|
95
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
96
|
+
const themedProps = useThemeProps({
|
|
97
|
+
props: axis,
|
|
98
|
+
name: 'MuiChartsYAxis'
|
|
99
|
+
});
|
|
100
|
+
if (!axis) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
const defaultizedProps = _extends({}, defaultProps, themedProps);
|
|
104
|
+
return getYAxisCoordinates(drawingArea, defaultizedProps);
|
|
105
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TickItem } from "./useTicks.js";
|
|
2
|
+
import { type AxisId } from "../models/axis.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the ticks for the given X axis. Ticks outside the drawing area are not included.
|
|
5
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
6
|
+
* @param axisId The id of the X axis.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useXAxisTicks(axisId: AxisId): TickItem[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns the ticks for the given Y axis. Ticks outside the drawing area are not included.
|
|
11
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
12
|
+
* @param axisId The id of the Y axis.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useYAxisTicks(axisId: AxisId): TickItem[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { useThemeProps } from '@mui/material/styles';
|
|
3
|
+
import { useXAxes, useYAxes } from "./useAxis.js";
|
|
4
|
+
import { useTicks } from "./useTicks.js";
|
|
5
|
+
import { defaultProps } from "../ChartsXAxis/utilities.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Returns the ticks for the given X axis. Ticks outside the drawing area are not included.
|
|
9
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
10
|
+
* @param axisId The id of the X axis.
|
|
11
|
+
*/
|
|
12
|
+
export function useXAxisTicks(axisId) {
|
|
13
|
+
const {
|
|
14
|
+
xAxis: xAxes
|
|
15
|
+
} = useXAxes();
|
|
16
|
+
const axis = xAxes[axisId];
|
|
17
|
+
|
|
18
|
+
// FIXME: `useAxisTicksProps` does this, but should we do it here?
|
|
19
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
20
|
+
const themedProps = useThemeProps({
|
|
21
|
+
props: axis,
|
|
22
|
+
name: 'MuiChartsXAxis'
|
|
23
|
+
});
|
|
24
|
+
const defaultizedProps = _extends({}, defaultProps, themedProps);
|
|
25
|
+
return useTicks({
|
|
26
|
+
scale: axis.scale,
|
|
27
|
+
tickNumber: axis.tickNumber,
|
|
28
|
+
valueFormatter: defaultizedProps.valueFormatter,
|
|
29
|
+
tickInterval: defaultizedProps.tickInterval,
|
|
30
|
+
tickPlacement: defaultizedProps.tickPlacement,
|
|
31
|
+
tickLabelPlacement: defaultizedProps.tickLabelPlacement,
|
|
32
|
+
tickSpacing: defaultizedProps.tickSpacing,
|
|
33
|
+
direction: 'x',
|
|
34
|
+
ordinalTimeTicks: 'ordinalTimeTicks' in defaultizedProps ? defaultizedProps.ordinalTimeTicks : undefined
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns the ticks for the given Y axis. Ticks outside the drawing area are not included.
|
|
40
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
41
|
+
* @param axisId The id of the Y axis.
|
|
42
|
+
*/
|
|
43
|
+
export function useYAxisTicks(axisId) {
|
|
44
|
+
const {
|
|
45
|
+
yAxis: yAxes
|
|
46
|
+
} = useYAxes();
|
|
47
|
+
const axis = yAxes[axisId];
|
|
48
|
+
|
|
49
|
+
// FIXME: `useAxisTicksProps` does this, but should we do it here?
|
|
50
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
51
|
+
const themedProps = useThemeProps({
|
|
52
|
+
props: axis,
|
|
53
|
+
name: 'MuiChartsYAxis'
|
|
54
|
+
});
|
|
55
|
+
const defaultizedProps = _extends({}, defaultProps, themedProps);
|
|
56
|
+
return useTicks({
|
|
57
|
+
scale: axis.scale,
|
|
58
|
+
tickNumber: axis.tickNumber,
|
|
59
|
+
valueFormatter: defaultizedProps.valueFormatter,
|
|
60
|
+
tickInterval: defaultizedProps.tickInterval,
|
|
61
|
+
tickPlacement: defaultizedProps.tickPlacement,
|
|
62
|
+
tickLabelPlacement: defaultizedProps.tickLabelPlacement,
|
|
63
|
+
tickSpacing: defaultizedProps.tickSpacing,
|
|
64
|
+
direction: 'y',
|
|
65
|
+
// @ts-expect-error
|
|
66
|
+
ordinalTimeTicks: defaultizedProps.ordinalTimeTicks
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -3,4 +3,4 @@ import type * as React from 'react';
|
|
|
3
3
|
* Get the ref for the root chart element.
|
|
4
4
|
* @returns The root chart element ref.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useChartRootRef(): React.RefObject<
|
|
6
|
+
export declare function useChartRootRef<T extends Element = HTMLDivElement>(): React.RefObject<T | null>;
|
|
@@ -7,6 +7,8 @@ import { useChartContext } from "../context/ChartProvider/index.js";
|
|
|
7
7
|
* @returns The root chart element ref.
|
|
8
8
|
*/
|
|
9
9
|
export function useChartRootRef() {
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const {
|
|
11
|
+
instance
|
|
12
|
+
} = useChartContext();
|
|
13
|
+
return instance.chartRootRef;
|
|
12
14
|
}
|
|
@@ -3,15 +3,15 @@ import { type SeriesItemIdentifierWithData } from "../models/index.js";
|
|
|
3
3
|
import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
4
4
|
import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
5
5
|
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.js";
|
|
7
7
|
import type { ChartInstance } from "../internals/plugins/models/index.js";
|
|
8
8
|
import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
|
|
9
|
-
export declare const useInteractionItemProps: (data: SeriesItemIdentifierWithData
|
|
9
|
+
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithData<SeriesType>, skip?: boolean) => {
|
|
10
10
|
onPointerEnter?: () => void;
|
|
11
11
|
onPointerLeave?: () => void;
|
|
12
12
|
onPointerDown?: (event: React.PointerEvent) => void;
|
|
13
13
|
};
|
|
14
|
-
export declare function getInteractionItemProps(instance: ChartInstance<[UseChartInteractionSignature, UseChartHighlightSignature, UseChartTooltipSignature]>, item:
|
|
14
|
+
export declare function getInteractionItemProps(instance: ChartInstance<[UseChartInteractionSignature, UseChartHighlightSignature, UseChartTooltipSignature]>, item: SeriesItemIdentifierWithType<ChartSeriesType>): {
|
|
15
15
|
onPointerEnter?: () => void;
|
|
16
16
|
onPointerLeave?: () => void;
|
|
17
17
|
onPointerDown?: (event: React.PointerEvent) => void;
|
package/esm/hooks/useLegend.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SeriesLegendItemParams } from "../ChartsLegend/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Get the legend items to display.
|
|
4
4
|
*
|
|
@@ -9,5 +9,5 @@ import type { LegendItemParams } from "../ChartsLegend/index.js";
|
|
|
9
9
|
* @returns legend data
|
|
10
10
|
*/
|
|
11
11
|
export declare function useLegend(): {
|
|
12
|
-
items:
|
|
12
|
+
items: SeriesLegendItemParams[];
|
|
13
13
|
};
|
package/esm/hooks/useLegend.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { selectorChartSeriesConfig } from "../internals/plugins/corePlugins/
|
|
3
|
+
import { selectorChartSeriesConfig } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
|
|
4
4
|
import { useSeries } from "./useSeries.js";
|
|
5
5
|
import { useStore } from "../internals/store/useStore.js";
|
|
6
6
|
function getSeriesToDisplay(series, seriesConfig) {
|
package/esm/hooks/useScale.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
* For a given scale return a function that map value to their position.
|
|
4
|
-
* Useful when dealing with specific scale such as band.
|
|
5
|
-
* @param {D3Scale} scale The scale to use
|
|
6
|
-
* @returns {(value: any) => number} A function that map value to their position
|
|
7
|
-
*/
|
|
8
|
-
export declare function getValueToPositionMapper<Domain extends {
|
|
9
|
-
toString(): string;
|
|
10
|
-
} = {
|
|
11
|
-
toString(): string;
|
|
12
|
-
}, Range = number>(scale: D3Scale<Domain, Range>): (value: any) => number;
|
|
1
|
+
import type { AxisId, AxisScaleConfig, ScaleName } from "../models/axis.js";
|
|
13
2
|
/**
|
|
14
3
|
* Get the X scale.
|
|
15
4
|
*
|
package/esm/hooks/useScale.js
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { isOrdinalScale } from "../internals/scaleGuards.js";
|
|
4
3
|
import { useRadiusAxis, useRotationAxis, useXAxis, useYAxis } from "./useAxis.js";
|
|
5
4
|
|
|
6
|
-
/**
|
|
7
|
-
* For a given scale return a function that map value to their position.
|
|
8
|
-
* Useful when dealing with specific scale such as band.
|
|
9
|
-
* @param {D3Scale} scale The scale to use
|
|
10
|
-
* @returns {(value: any) => number} A function that map value to their position
|
|
11
|
-
*/
|
|
12
|
-
export function getValueToPositionMapper(scale) {
|
|
13
|
-
if (isOrdinalScale(scale)) {
|
|
14
|
-
return value => (scale(value) ?? 0) + scale.bandwidth() / 2;
|
|
15
|
-
}
|
|
16
|
-
const domain = scale.domain();
|
|
17
|
-
|
|
18
|
-
// Fixes https://github.com/mui/mui-x/issues/18999#issuecomment-3173787401
|
|
19
|
-
if (domain[0] === domain[1]) {
|
|
20
|
-
return value => value === domain[0] ? scale(value) : NaN;
|
|
21
|
-
}
|
|
22
|
-
return value => scale(value);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
5
|
/**
|
|
26
6
|
* Get the X scale.
|
|
27
7
|
*
|
package/esm/hooks/useSvgRef.js
CHANGED
|
@@ -7,9 +7,8 @@ import { useChartContext } from "../context/ChartProvider/index.js";
|
|
|
7
7
|
* @returns The SVG ref.
|
|
8
8
|
*/
|
|
9
9
|
export function useSvgRef() {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return context.svgRef;
|
|
10
|
+
const {
|
|
11
|
+
instance
|
|
12
|
+
} = useChartContext();
|
|
13
|
+
return instance.svgRef;
|
|
15
14
|
}
|