@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
|
@@ -2,7 +2,7 @@ import { type AxisConfig, type ScaleName } from "../../../../models/index.js";
|
|
|
2
2
|
import { type ChartsAxisProps, type ChartsRotationAxisProps, type ChartsRadiusAxisProps, type PolarAxisDefaultized, type AxisId } from "../../../../models/axis.js";
|
|
3
3
|
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
4
4
|
import type { ChartDrawingArea } from "../../../../hooks/index.js";
|
|
5
|
-
import { type ChartSeriesConfig } from "../../
|
|
5
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
6
6
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
7
7
|
export type DefaultizedAxisConfig<AxisProps extends ChartsRotationAxisProps | ChartsRadiusAxisProps> = {
|
|
8
8
|
[axisId: AxisId]: PolarAxisDefaultized<ScaleName, any, AxisProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxisConfig } from "../../../../models/axis.js";
|
|
2
2
|
import { type PolarChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
-
import { type ChartSeriesConfig } from "../../
|
|
3
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
4
4
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
5
5
|
export declare const getAxisExtremum: <TSeriesType extends PolarChartSeriesType>(axis: AxisConfig, axisDirection: "rotation" | "radius", seriesConfig: ChartSeriesConfig<TSeriesType>, axisIndex: number, formattedSeries: ProcessedSeries<TSeriesType>) => number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PolarChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
|
-
import { type ChartSeriesConfig } from "../../
|
|
2
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
3
3
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
4
4
|
import { type AxisId } from "../../../../models/axis.js";
|
|
5
5
|
export declare const getAxisTriggerTooltip: <TSeriesType extends PolarChartSeriesType>(axisDirection: "radius" | "rotation", seriesConfig: ChartSeriesConfig<TSeriesType>, formattedSeries: ProcessedSeries<TSeriesType>, defaultAxisId: AxisId) => Set<AxisId>;
|
|
@@ -7,7 +7,7 @@ import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/u
|
|
|
7
7
|
import { defaultizeAxis } from "./defaultizeAxis.js";
|
|
8
8
|
import { selectorChartsInteractionIsInitialized } from "../useChartInteraction/index.js";
|
|
9
9
|
import { selectorChartPolarCenter, selectorChartRadiusAxis, selectorChartRotationAxis } from "./useChartPolarAxis.selectors.js";
|
|
10
|
-
import {
|
|
10
|
+
import { getChartPoint } from "../../../getChartPoint.js";
|
|
11
11
|
import { generatePolar2svg, generateSvg2polar, generateSvg2rotation } from "./coordinateTransformation.js";
|
|
12
12
|
import { getAxisIndex } from "./getAxisIndex.js";
|
|
13
13
|
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
|
|
@@ -15,10 +15,11 @@ import { checkHasInteractionPlugin } from "../useChartInteraction/checkHasIntera
|
|
|
15
15
|
export const useChartPolarAxis = ({
|
|
16
16
|
params,
|
|
17
17
|
store,
|
|
18
|
-
seriesConfig,
|
|
19
|
-
svgRef,
|
|
20
18
|
instance
|
|
21
19
|
}) => {
|
|
20
|
+
const {
|
|
21
|
+
svgRef
|
|
22
|
+
} = instance;
|
|
22
23
|
const {
|
|
23
24
|
rotationAxis,
|
|
24
25
|
radiusAxis,
|
|
@@ -56,7 +57,7 @@ export const useChartPolarAxis = ({
|
|
|
56
57
|
rotation: defaultizeAxis(rotationAxis, dataset, 'rotation'),
|
|
57
58
|
radius: defaultizeAxis(radiusAxis, dataset, 'radius')
|
|
58
59
|
}));
|
|
59
|
-
}, [
|
|
60
|
+
}, [drawingArea, rotationAxis, radiusAxis, dataset, store]);
|
|
60
61
|
const svg2rotation = React.useMemo(() => generateSvg2rotation({
|
|
61
62
|
cx: center.cx,
|
|
62
63
|
cy: center.cy
|
|
@@ -114,7 +115,7 @@ export const useChartPolarAxis = ({
|
|
|
114
115
|
instance.cleanInteraction?.();
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
|
-
const svgPoint =
|
|
118
|
+
const svgPoint = getChartPoint(element, srcEvent);
|
|
118
119
|
mousePosition.current.isInChart = true;
|
|
119
120
|
instance.setPointerCoordinate?.(svgPoint);
|
|
120
121
|
return;
|
|
@@ -122,7 +123,7 @@ export const useChartPolarAxis = ({
|
|
|
122
123
|
|
|
123
124
|
// On mouse, we want to restrict the interaction to the drawing area and radar circle.
|
|
124
125
|
|
|
125
|
-
const svgPoint =
|
|
126
|
+
const svgPoint = getChartPoint(element, srcEvent);
|
|
126
127
|
|
|
127
128
|
// Test if it's in the drawing area
|
|
128
129
|
if (!instance.isPointInside(svgPoint.x, svgPoint.y, event.detail.target)) {
|
|
@@ -167,7 +168,7 @@ export const useChartPolarAxis = ({
|
|
|
167
168
|
const axisClickHandler = instance.addInteractionListener('tap', event => {
|
|
168
169
|
let dataIndex = null;
|
|
169
170
|
let isRotationAxis = false;
|
|
170
|
-
const svgPoint =
|
|
171
|
+
const svgPoint = getChartPoint(element, event.detail.srcEvent);
|
|
171
172
|
const rotation = generateSvg2rotation(center)(svgPoint.x, svgPoint.y);
|
|
172
173
|
const rotationIndex = getAxisIndex(rotationAxisWithScale[usedRotationAxisId], rotation);
|
|
173
174
|
isRotationAxis = rotationIndex !== -1;
|
package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts
CHANGED
|
@@ -5,26 +5,26 @@ export declare const selectorChartPolarAxisState: (state: ChartState<[], [UseCha
|
|
|
5
5
|
rotation: import("../../../index.js").AxisConfig<import("../../../index.js").ScaleName, any, import("../../../index.js").ChartsRotationAxisProps>[];
|
|
6
6
|
radius: import("../../../index.js").AxisConfig<"linear", any, import("../../../index.js").ChartsRadiusAxisProps>[];
|
|
7
7
|
} | undefined;
|
|
8
|
-
export declare const selectorChartRawRotationAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
8
|
+
export declare const selectorChartRawRotationAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
9
9
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
10
|
}) => import("../../../index.js").AxisConfig<keyof import("../../../index.js").AxisScaleConfig, any, import("../../../index.js").ChartsRotationAxisProps>[] | undefined;
|
|
11
|
-
export declare const selectorChartRawRadiusAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
11
|
+
export declare const selectorChartRawRadiusAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
12
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
13
|
}) => import("../../../index.js").AxisConfig<"linear", any, import("../../../index.js").ChartsRadiusAxisProps>[] | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* The only interesting selectors that merge axis data and zoom if provided.
|
|
16
16
|
*/
|
|
17
|
-
export declare const selectorChartRotationAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
17
|
+
export declare const selectorChartRotationAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
18
18
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
19
19
|
}) => import("./computeAxisValue.js").ComputeResult<import("../../../index.js").ChartsRotationAxisProps>;
|
|
20
|
-
export declare const selectorChartRadiusAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
20
|
+
export declare const selectorChartRadiusAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
21
21
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
22
22
|
}) => import("./computeAxisValue.js").ComputeResult<import("../../../index.js").ChartsRadiusAxisProps>;
|
|
23
23
|
export declare function getDrawingAreaCenter(drawingArea: ChartDrawingArea): {
|
|
24
24
|
cx: number;
|
|
25
25
|
cy: number;
|
|
26
26
|
};
|
|
27
|
-
export declare const selectorChartPolarCenter: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
27
|
+
export declare const selectorChartPolarCenter: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
28
28
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
29
29
|
}) => {
|
|
30
30
|
cx: number;
|
package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
2
|
import { selectorChartDrawingArea } from "../../corePlugins/useChartDimensions/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/index.js";
|
|
4
4
|
import { computeAxisValue } from "./computeAxisValue.js";
|
|
5
|
+
import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
5
6
|
export const selectorChartPolarAxisState = state => state.polarAxis;
|
|
6
7
|
export const selectorChartRawRotationAxis = createSelector(selectorChartPolarAxisState, axis => axis?.rotation);
|
|
7
8
|
export const selectorChartRawRadiusAxis = createSelector(selectorChartPolarAxisState, axis => axis?.radius);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { type AxisItemIdentifier } from "../../../../models/axis.js";
|
|
2
|
-
export declare const selectorChartsInteractionRotationAxisIndex: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
2
|
+
export declare const selectorChartsInteractionRotationAxisIndex: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
3
3
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
4
4
|
}) => number | null;
|
|
5
|
-
export declare const selectorChartsInteractionRotationAxisIndexes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
5
|
+
export declare const selectorChartsInteractionRotationAxisIndexes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
6
6
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
7
7
|
}) => number[] | null;
|
|
8
|
-
export declare const selectorChartsInteractionRotationAxisValue: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
8
|
+
export declare const selectorChartsInteractionRotationAxisValue: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
9
9
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
10
|
}) => any;
|
|
11
|
-
export declare const selectorChartsInteractionRotationAxisValues: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
11
|
+
export declare const selectorChartsInteractionRotationAxisValues: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartPolarAxis.types.js").UseChartPolarAxisState> & {
|
|
12
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
13
|
}) => any[] | null;
|
|
14
14
|
/**
|
|
15
15
|
* Get rotation-axis ids and corresponding data index that should be display in the tooltip.
|
|
16
16
|
*/
|
|
17
|
-
export declare const selectorChartsInteractionTooltipRotationAxes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
17
|
+
export declare const selectorChartsInteractionTooltipRotationAxes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
18
18
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
19
19
|
}) => AxisItemIdentifier[];
|
|
20
20
|
/**
|
|
@@ -24,6 +24,6 @@ export declare const selectorChartsInteractionTooltipRadiusAxes: () => never[];
|
|
|
24
24
|
/**
|
|
25
25
|
* Return `true` if the axis tooltip has something to display.
|
|
26
26
|
*/
|
|
27
|
-
export declare const selectorChartsInteractionPolarAxisTooltip: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
27
|
+
export declare const selectorChartsInteractionPolarAxisTooltip: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
28
28
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
29
29
|
}) => boolean;
|
|
@@ -3,9 +3,11 @@ import { useAssertModelConsistency } from '@mui/x-internals/useAssertModelConsis
|
|
|
3
3
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
4
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';
|
|
6
|
+
import { createIdentifierWithType } from "../../corePlugins/useChartSeries/useChartSeries.js";
|
|
6
7
|
export const useChartTooltip = ({
|
|
7
8
|
store,
|
|
8
|
-
params
|
|
9
|
+
params,
|
|
10
|
+
instance
|
|
9
11
|
}) => {
|
|
10
12
|
useAssertModelConsistency({
|
|
11
13
|
warningPrefix: 'MUI X Charts',
|
|
@@ -16,11 +18,14 @@ export const useChartTooltip = ({
|
|
|
16
18
|
});
|
|
17
19
|
useEnhancedEffect(() => {
|
|
18
20
|
if (store.state.tooltip.item !== params.tooltipItem) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
const newItem = params.tooltipItem ? instance.identifierWithType(params.tooltipItem) : null;
|
|
22
|
+
if (store.state.tooltip.item === null || newItem === null ? newItem !== store.state.tooltip.item : instance.serializeIdentifier(store.state.tooltip.item) !== instance.serializeIdentifier(newItem)) {
|
|
23
|
+
store.set('tooltip', _extends({}, store.state.tooltip, {
|
|
24
|
+
item: newItem
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
22
27
|
}
|
|
23
|
-
}, [store, params.tooltipItem]);
|
|
28
|
+
}, [store, instance, params.tooltipItem]);
|
|
24
29
|
const removeTooltipItem = useEventCallback(function removeTooltipItem(itemToRemove) {
|
|
25
30
|
const prevItem = store.state.tooltip.item;
|
|
26
31
|
if (prevItem === null) {
|
|
@@ -57,10 +62,12 @@ export const useChartTooltip = ({
|
|
|
57
62
|
}
|
|
58
63
|
};
|
|
59
64
|
};
|
|
60
|
-
useChartTooltip.getInitialState = params => ({
|
|
65
|
+
useChartTooltip.getInitialState = (params, currentState) => ({
|
|
61
66
|
tooltip: {
|
|
62
67
|
itemIsControlled: params.tooltipItem !== undefined,
|
|
63
|
-
item: params.tooltipItem
|
|
68
|
+
item: params.tooltipItem == null ? null : createIdentifierWithType(currentState)(
|
|
69
|
+
// Need some as because the generic SeriesType can't be propagated to plugins methods.
|
|
70
|
+
params.tooltipItem)
|
|
64
71
|
}
|
|
65
72
|
});
|
|
66
73
|
useChartTooltip.params = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const selectorChartsTooltipPointerItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartTooltip.types.js").UseChartTooltipState<keyof import("../../../index.js").ChartsSeriesConfig>> & {
|
|
1
|
+
export declare const selectorChartsTooltipPointerItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartTooltip.types.js").UseChartTooltipState<keyof import("../../../index.js").ChartsSeriesConfig>> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
3
|
}) => import("../../../../index.js").LineItemIdentifier | import("../../../../index.js").BarItemIdentifier | import("../../../../index.js").ScatterItemIdentifier | import("../../../../index.js").PieItemIdentifier | import("../../../../index.js").RadarItemIdentifier | null;
|
|
4
|
-
export declare const selectorChartsTooltipPointerItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartTooltip.types.js").UseChartTooltipState<keyof import("../../../index.js").ChartsSeriesConfig>> & {
|
|
4
|
+
export declare const selectorChartsTooltipPointerItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartTooltip.types.js").UseChartTooltipState<keyof import("../../../index.js").ChartsSeriesConfig>> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
6
|
}) => boolean;
|
|
7
|
-
export declare const selectorChartsTooltipItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
7
|
+
export declare const selectorChartsTooltipItem: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
8
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
9
9
|
}) => import("../../../../index.js").LineItemIdentifier | import("../../../../index.js").BarItemIdentifier | import("../../../../index.js").ScatterItemIdentifier | import("../../../../index.js").PieItemIdentifier | import("../../../../index.js").RadarItemIdentifier | null;
|
|
10
|
-
export declare const selectorChartsTooltipItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
10
|
+
export declare const selectorChartsTooltipItemIsDefined: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
11
11
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
12
12
|
}) => boolean;
|
|
13
|
-
export declare const selectorChartsTooltipItemPosition: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
13
|
+
export declare const selectorChartsTooltipItemPosition: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartInteraction/useChartInteraction.types.js").UseChartInteractionState> & {
|
|
14
14
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
15
15
|
}, placement?: "bottom" | "left" | "right" | "top" | undefined) => {
|
|
16
16
|
x: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
-
import {
|
|
2
|
+
import { selectorChartSeriesProcessed, selectorChartSeriesLayout } from "../../corePlugins/useChartSeries/index.js";
|
|
3
|
+
import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
3
4
|
import { selectorChartXAxis, selectorChartYAxis } from "../useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js";
|
|
4
5
|
import { selectorChartsKeyboardItem, selectorChartsHasFocusedItem } from "../useChartKeyboardNavigation/index.js";
|
|
5
6
|
import { selectorChartsLastInteraction } from "../useChartInteraction/useChartInteraction.selectors.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import type { ChartPluginSignature } from "../../models/index.js";
|
|
3
|
-
import type { SeriesItemIdentifier } from "../../../../models/seriesType/index.js";
|
|
3
|
+
import type { SeriesItemIdentifier, SeriesItemIdentifierWithType } from "../../../../models/seriesType/index.js";
|
|
4
4
|
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
5
5
|
export interface UseChartTooltipInstance {
|
|
6
6
|
/**
|
|
@@ -28,7 +28,7 @@ export interface UseChartTooltipParameters<TSeries extends ChartSeriesType = Cha
|
|
|
28
28
|
*
|
|
29
29
|
* @param {SeriesItemIdentifier<TSeries> | null} tooltipItem The newly highlighted item.
|
|
30
30
|
*/
|
|
31
|
-
onTooltipItemChange?: (tooltipItem:
|
|
31
|
+
onTooltipItemChange?: (tooltipItem: SeriesItemIdentifierWithType<TSeries> | null) => void;
|
|
32
32
|
}
|
|
33
33
|
export type UseChartTooltipDefaultizedParameters<TSeries extends ChartSeriesType = ChartSeriesType> = DefaultizedProps<UseChartTooltipParameters<TSeries>, 'tooltipItem'>;
|
|
34
34
|
export interface UseChartTooltipState<TSeries extends ChartSeriesType = ChartSeriesType> {
|
|
@@ -40,7 +40,7 @@ export interface UseChartTooltipState<TSeries extends ChartSeriesType = ChartSer
|
|
|
40
40
|
/**
|
|
41
41
|
* The item currently under the pointer.
|
|
42
42
|
*/
|
|
43
|
-
item: null |
|
|
43
|
+
item: null | SeriesItemIdentifierWithType<TSeries>;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
export type UseChartTooltipSignature<TSeries extends ChartSeriesType = ChartSeriesType> = ChartPluginSignature<{
|
package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js
CHANGED
|
@@ -5,10 +5,10 @@ import useEventCallback from '@mui/utils/useEventCallback';
|
|
|
5
5
|
import { useEffectAfterFirstRender } from '@mui/x-internals/useEffectAfterFirstRender';
|
|
6
6
|
import { EMPTY_VISIBILITY_MAP } from "./useChartVisibilityManager.selectors.js";
|
|
7
7
|
import { visibilityParamToMap } from "./visibilityParamToMap.js";
|
|
8
|
+
import { createIdentifierWithType } from "../../corePlugins/useChartSeries/useChartSeries.js";
|
|
8
9
|
export const useChartVisibilityManager = ({
|
|
9
10
|
store,
|
|
10
11
|
params,
|
|
11
|
-
seriesConfig,
|
|
12
12
|
instance
|
|
13
13
|
}) => {
|
|
14
14
|
// Manage controlled state
|
|
@@ -20,12 +20,12 @@ export const useChartVisibilityManager = ({
|
|
|
20
20
|
console.error([`MUI X Charts: A chart component is changing the \`hiddenItems\` from uncontrolled to controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', 'Decide between using a controlled or uncontrolled for the lifetime of the component.', "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", 'More info: https://fb.me/react-controlled-components'].join('\n'));
|
|
21
21
|
}
|
|
22
22
|
store.set('visibilityManager', _extends({}, store.state.visibilityManager, {
|
|
23
|
-
visibilityMap: visibilityParamToMap(params.hiddenItems, seriesConfig)
|
|
23
|
+
visibilityMap: visibilityParamToMap(params.hiddenItems.map(item => instance.identifierWithType(item)), store.state.seriesConfig.config)
|
|
24
24
|
}));
|
|
25
|
-
}, [store, params.hiddenItems
|
|
25
|
+
}, [store, instance, params.hiddenItems]);
|
|
26
26
|
const hideItem = useEventCallback(identifier => {
|
|
27
27
|
const visibilityMap = store.state.visibilityManager.visibilityMap;
|
|
28
|
-
const id = instance.serializeIdentifier(identifier);
|
|
28
|
+
const id = instance.serializeIdentifier(instance.identifierWithType(identifier));
|
|
29
29
|
if (visibilityMap.has(id)) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -38,7 +38,7 @@ export const useChartVisibilityManager = ({
|
|
|
38
38
|
});
|
|
39
39
|
const showItem = useEventCallback(identifier => {
|
|
40
40
|
const visibilityMap = store.state.visibilityManager.visibilityMap;
|
|
41
|
-
const id = instance.serializeIdentifier(identifier);
|
|
41
|
+
const id = instance.serializeIdentifier(instance.identifierWithType(identifier));
|
|
42
42
|
if (!visibilityMap.has(id)) {
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
@@ -51,7 +51,7 @@ export const useChartVisibilityManager = ({
|
|
|
51
51
|
});
|
|
52
52
|
const toggleItem = useEventCallback(identifier => {
|
|
53
53
|
const visibilityMap = store.state.visibilityManager.visibilityMap;
|
|
54
|
-
const id = instance.serializeIdentifier(identifier);
|
|
54
|
+
const id = instance.serializeIdentifier(instance.identifierWithType(identifier));
|
|
55
55
|
if (visibilityMap.has(id)) {
|
|
56
56
|
showItem(identifier);
|
|
57
57
|
} else {
|
|
@@ -66,11 +66,12 @@ export const useChartVisibilityManager = ({
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
-
useChartVisibilityManager.getInitialState = (params,
|
|
69
|
+
useChartVisibilityManager.getInitialState = (params, currentState) => {
|
|
70
|
+
const seriesConfig = currentState.seriesConfig.config;
|
|
70
71
|
const initialItems = params.hiddenItems ?? params.initialHiddenItems;
|
|
71
72
|
return {
|
|
72
73
|
visibilityManager: {
|
|
73
|
-
visibilityMap: initialItems ? visibilityParamToMap(initialItems, seriesConfig) : EMPTY_VISIBILITY_MAP,
|
|
74
|
+
visibilityMap: initialItems ? visibilityParamToMap(initialItems.map(item => createIdentifierWithType(currentState)(item)), seriesConfig) : EMPTY_VISIBILITY_MAP,
|
|
74
75
|
isControlled: params.hiddenItems !== undefined
|
|
75
76
|
}
|
|
76
77
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
import type { VisibilityIdentifier } from "./useChartVisibilityManager.types.js";
|
|
2
|
-
import type { ChartSeriesConfig } from "../../models/index.js";
|
|
3
|
-
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
4
1
|
export declare const EMPTY_VISIBILITY_MAP: Map<any, any>;
|
|
5
2
|
/**
|
|
6
3
|
* Selector to get the hidden identifiers from the visibility manager.
|
|
7
4
|
*/
|
|
8
|
-
export declare const selectorVisibilityMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartVisibilityManager.types.js").UseChartVisibilityManagerState> & {
|
|
5
|
+
export declare const selectorVisibilityMap: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartVisibilityManager.types.js").UseChartVisibilityManagerState> & {
|
|
9
6
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
7
|
}) => Map<any, any>;
|
|
11
8
|
/**
|
|
12
9
|
* Selector that returns a function which returns whether an item is visible.
|
|
13
10
|
*/
|
|
14
|
-
export declare const selectorIsItemVisibleGetter: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartVisibilityManager.types.js").UseChartVisibilityManagerState> & {
|
|
11
|
+
export declare const selectorIsItemVisibleGetter: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartVisibilityManager.types.js").UseChartVisibilityManagerState> & {
|
|
15
12
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
|
-
}) =>
|
|
13
|
+
}) => any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
-
import {
|
|
2
|
+
import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
3
|
+
import { serializeIdentifier } from "../../corePlugins/useChartSeriesConfig/utils/serializeIdentifier.js";
|
|
3
4
|
/**
|
|
4
5
|
* Selector to get the visibility manager state.
|
|
5
6
|
*/
|
|
@@ -10,10 +11,14 @@ export const EMPTY_VISIBILITY_MAP = new Map();
|
|
|
10
11
|
* Selector to get the hidden identifiers from the visibility manager.
|
|
11
12
|
*/
|
|
12
13
|
export const selectorVisibilityMap = createSelector(selectVisibilityManager, visibilityManager => visibilityManager?.visibilityMap ?? EMPTY_VISIBILITY_MAP);
|
|
14
|
+
const selectorIsItemVisibleFn = (visibilityMap, seriesConfig) => {
|
|
15
|
+
return identifier => {
|
|
16
|
+
const uniqueId = serializeIdentifier(seriesConfig, identifier);
|
|
17
|
+
return !visibilityMap.has(uniqueId);
|
|
18
|
+
};
|
|
19
|
+
};
|
|
13
20
|
|
|
14
21
|
/**
|
|
15
22
|
* Selector that returns a function which returns whether an item is visible.
|
|
16
23
|
*/
|
|
17
|
-
export const selectorIsItemVisibleGetter = createSelectorMemoized(selectorVisibilityMap,
|
|
18
|
-
return (seriesConfig, identifier) => isIdentifierVisible(visibilityMap, identifier, seriesConfig);
|
|
19
|
-
});
|
|
24
|
+
export const selectorIsItemVisibleGetter = createSelectorMemoized(selectorVisibilityMap, selectorChartSeriesConfig, selectorIsItemVisibleFn);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { type ChartPluginSignature } from "../../models/index.js";
|
|
2
2
|
import { type UseChartSeriesSignature } from "../../corePlugins/useChartSeries/index.js";
|
|
3
|
-
import { type SeriesItemIdentifier } from "../../../../models/index.js";
|
|
3
|
+
import { type SeriesId, type SeriesItemIdentifier } from "../../../../models/index.js";
|
|
4
4
|
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
5
5
|
export type VisibilityIdentifier<T extends ChartSeriesType = ChartSeriesType> = Partial<SeriesItemIdentifier<T>> & (SeriesItemIdentifier<T> extends {
|
|
6
6
|
subType?: infer U;
|
|
7
7
|
} ? {
|
|
8
|
-
type: T;
|
|
9
8
|
subType: U;
|
|
9
|
+
seriesId: SeriesId;
|
|
10
10
|
} : {
|
|
11
|
-
|
|
11
|
+
seriesId: SeriesId;
|
|
12
12
|
});
|
|
13
|
+
export type VisibilityIdentifierWithType<T extends ChartSeriesType = ChartSeriesType> = T extends any ? VisibilityIdentifier<T> & {
|
|
14
|
+
type: T;
|
|
15
|
+
} : never;
|
|
13
16
|
export type VisibilityMap = Map<string, VisibilityIdentifier>;
|
|
14
17
|
export type IsItemVisibleFunction = {
|
|
15
18
|
/**
|
package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
|
-
import type { ChartSeriesConfig } from "../../
|
|
3
|
-
import type {
|
|
4
|
-
export declare const visibilityParamToMap: (hiddenItems:
|
|
2
|
+
import type { ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
3
|
+
import type { VisibilityIdentifierWithType, VisibilityMap } from "./useChartVisibilityManager.types.js";
|
|
4
|
+
export declare const visibilityParamToMap: (hiddenItems: VisibilityIdentifierWithType[] | undefined, seriesConfig: ChartSeriesConfig<ChartSeriesType>) => VisibilityMap;
|
package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { serializeIdentifier } from "../../corePlugins/
|
|
1
|
+
import { serializeIdentifier } from "../../corePlugins/useChartSeriesConfig/utils/serializeIdentifier.js";
|
|
2
2
|
export const visibilityParamToMap = (hiddenItems, seriesConfig) => {
|
|
3
3
|
const visibilityMap = new Map();
|
|
4
4
|
if (hiddenItems) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const selectorChartZAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartZAxis.types.js").UseChartZAxisState & Partial<{}> & {
|
|
1
|
+
export declare const selectorChartZAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartZAxis.types.js").UseChartZAxisState & Partial<{}> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
3
|
}) => {
|
|
4
4
|
axis: {
|
|
@@ -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 { MergeSignaturesProperty, OptionalIfEmpty } from "./helpers.js";
|
|
4
3
|
import type { ChartCorePluginSignatures } from "../corePlugins/index.js";
|
|
5
|
-
import { type ChartSeriesConfig } from "./seriesConfig/index.js";
|
|
6
4
|
import { type ChartState } from "./chart.js";
|
|
7
5
|
export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature> {
|
|
8
6
|
/**
|
|
@@ -17,22 +15,10 @@ export interface ChartPluginOptions<TSignature extends ChartAnyPluginSignature>
|
|
|
17
15
|
* The store that can be used to access the state of other plugins.
|
|
18
16
|
*/
|
|
19
17
|
store: ChartUsedStore<TSignature>;
|
|
20
|
-
/**
|
|
21
|
-
* Reference to the main svg element.
|
|
22
|
-
*/
|
|
23
|
-
svgRef: React.RefObject<SVGSVGElement | null>;
|
|
24
|
-
/**
|
|
25
|
-
* Reference to the chart root element.
|
|
26
|
-
*/
|
|
27
|
-
chartRootRef: React.RefObject<HTMLDivElement | null>;
|
|
28
18
|
/**
|
|
29
19
|
* All the plugins that are used in the chart.
|
|
30
20
|
*/
|
|
31
21
|
plugins: ChartPlugin<ChartAnyPluginSignature>[];
|
|
32
|
-
/**
|
|
33
|
-
* All the series configurations that are currently loaded.
|
|
34
|
-
*/
|
|
35
|
-
seriesConfig: ChartSeriesConfig<any>;
|
|
36
22
|
}
|
|
37
23
|
export type ChartResponse<TSignature extends ChartAnyPluginSignature> = OptionalIfEmpty<'publicAPI', TSignature['publicAPI']> & OptionalIfEmpty<'instance', TSignature['instance']>;
|
|
38
24
|
export type ChartPluginSignature<T extends {
|
|
@@ -123,11 +109,10 @@ export type ChartPlugin<TSignature extends ChartAnyPluginSignature> = {
|
|
|
123
109
|
*
|
|
124
110
|
* @param {ChartUsedDefaultizedParams<TSignature>} params The parameters after being processed with the default values.
|
|
125
111
|
* @param {MergeSignaturesProperty<ChartRequiredPlugins<TSignature>, 'state'>} currentState The current state of the chart.
|
|
126
|
-
* @param {ChartSeriesConfig<any>} seriesConfig The series configuration.
|
|
127
112
|
*
|
|
128
113
|
* @returns {TSignature['state']} The initial state of the plugin.
|
|
129
114
|
*/
|
|
130
|
-
getInitialState?: (params: ChartUsedDefaultizedParams<TSignature>, currentState: MergeSignaturesProperty<ChartRequiredPlugins<TSignature>, 'state'
|
|
115
|
+
getInitialState?: (params: ChartUsedDefaultizedParams<TSignature>, currentState: MergeSignaturesProperty<ChartRequiredPlugins<TSignature>, 'state'>) => TSignature['state'];
|
|
131
116
|
/**
|
|
132
117
|
* An object where each property used by the plugin is set to `true`.
|
|
133
118
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { barSeriesConfig } from "../../../BarChart/seriesConfig/index.js";
|
|
2
|
+
import { lineSeriesConfig } from "../../../LineChart/seriesConfig/index.js";
|
|
3
|
+
import { pieSeriesConfig } from "../../../PieChart/seriesConfig/index.js";
|
|
4
|
+
import { scatterSeriesConfig } from "../../../ScatterChart/seriesConfig/index.js";
|
|
5
|
+
export const defaultSeriesConfig = {
|
|
6
|
+
bar: barSeriesConfig,
|
|
7
|
+
scatter: scatterSeriesConfig,
|
|
8
|
+
line: lineSeriesConfig,
|
|
9
|
+
pie: pieSeriesConfig
|
|
10
|
+
};
|