@mui/x-charts 8.16.0 → 8.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/AnimatedBarElement.d.ts +1 -1
- package/BarChart/BarChart.js +1 -0
- package/BarChart/BarClipPath.d.ts +1 -1
- package/BarChart/BarElement.d.ts +1 -1
- package/BarChart/BarElement.js +6 -8
- package/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
- package/BarChart/BarLabel/BarLabelPlot.js +41 -36
- package/BarChart/BarPlot.d.ts +13 -3
- package/BarChart/BarPlot.js +3 -3
- package/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
- package/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
- package/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
- package/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
- package/BarChart/seriesConfig/bar/legend.d.ts +3 -0
- package/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
- package/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
- package/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
- package/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
- package/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
- package/BarChart/seriesConfig/index.d.ts +1 -1
- package/BarChart/seriesConfig/index.js +9 -9
- package/BarChart/types.d.ts +1 -0
- package/BarChart/useBarPlotData.js +2 -1
- package/CHANGELOG.md +108 -1
- package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
- package/ChartsAxis/ChartsAxis.d.ts +1 -2
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
- package/ChartsClipPath/ChartsClipPath.d.ts +1 -2
- package/ChartsClipPath/ChartsClipPath.js +0 -2
- package/ChartsGrid/ChartsGrid.d.ts +1 -2
- package/ChartsGrid/ChartsGrid.js +0 -2
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
- package/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
- package/ChartsOverlay/ChartsLoadingOverlay.js +0 -2
- package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
- package/ChartsOverlay/ChartsNoDataOverlay.js +0 -2
- package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
- package/ChartsReferenceLine/ChartsReferenceLine.js +0 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
- package/ChartsReferenceLine/ChartsXReferenceLine.js +0 -2
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
- package/ChartsReferenceLine/ChartsYReferenceLine.js +0 -2
- package/ChartsSurface/ChartsSurface.js +8 -9
- package/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
- package/ChartsSurface/chartsSurfaceClasses.js +21 -0
- package/ChartsSurface/index.d.ts +2 -1
- package/ChartsSurface/index.js +12 -1
- package/ChartsText/ChartsText.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
- package/ChartsTooltip/ChartsAxisTooltipContent.js +0 -2
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
- package/ChartsTooltip/ChartsItemTooltipContent.js +0 -2
- package/ChartsTooltip/ChartsTooltip.d.ts +1 -2
- package/ChartsTooltip/ChartsTooltip.js +0 -2
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +13 -14
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsWrapper/ChartsWrapper.d.ts +1 -1
- package/ChartsWrapper/ChartsWrapper.js +3 -5
- package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
- package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
- package/ChartsXAxis/ChartsXAxis.d.ts +1 -2
- package/ChartsXAxis/ChartsXAxis.js +0 -2
- package/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
- package/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
- package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
- package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
- package/ChartsYAxis/ChartsYAxis.d.ts +1 -2
- package/ChartsYAxis/ChartsYAxis.js +0 -2
- package/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
- package/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
- package/Gauge/GaugeProvider.d.ts +1 -1
- package/Gauge/GaugeReferenceArc.d.ts +1 -1
- package/Gauge/GaugeValueArc.d.ts +1 -1
- package/Gauge/GaugeValueText.d.ts +1 -2
- package/Gauge/GaugeValueText.js +0 -2
- package/LineChart/AnimatedArea.d.ts +1 -1
- package/LineChart/AppearingMask.d.ts +1 -1
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaPlot.d.ts +1 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/FocusedMark.d.ts +1 -2
- package/LineChart/FocusedMark.js +0 -2
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineHighlightElement.d.ts +1 -1
- package/LineChart/LineHighlightPlot.d.ts +1 -1
- package/LineChart/LinePlot.d.ts +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkPlot.d.ts +1 -1
- package/LineChart/seriesConfig/getColor.js +28 -5
- package/LineChart/seriesConfig/index.d.ts +1 -1
- package/LineChart/seriesConfig/index.js +2 -2
- package/PieChart/PieArcLabelPlot.d.ts +1 -1
- package/PieChart/PieArcPlot.d.ts +1 -1
- package/PieChart/PiePlot.d.ts +1 -2
- package/PieChart/PiePlot.js +0 -2
- package/PieChart/seriesConfig/index.d.ts +1 -1
- package/PieChart/seriesConfig/index.js +2 -2
- package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
- package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -3
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
- package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
- package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
- package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
- package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
- package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
- package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -3
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
- package/RadarChart/seriesConfig/getColor.js +12 -1
- package/ScatterChart/BatchScatter.d.ts +1 -2
- package/ScatterChart/BatchScatter.js +4 -4
- package/ScatterChart/Scatter.d.ts +7 -2
- package/ScatterChart/Scatter.js +7 -3
- package/ScatterChart/ScatterMarker.d.ts +1 -1
- package/ScatterChart/ScatterPlot.d.ts +1 -1
- package/ScatterChart/ScatterPlot.js +1 -1
- package/ScatterChart/seriesConfig/getColor.js +36 -7
- package/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.js +2 -2
- package/context/ChartProvider/ChartProvider.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.js +4 -4
- package/context/ChartProvider/ChartProvider.types.d.ts +3 -3
- package/context/ChartsSlotsContext.d.ts +1 -1
- package/esm/BarChart/AnimatedBarElement.d.ts +1 -1
- package/esm/BarChart/BarChart.js +1 -0
- package/esm/BarChart/BarClipPath.d.ts +1 -1
- package/esm/BarChart/BarElement.d.ts +1 -1
- package/esm/BarChart/BarElement.js +6 -8
- package/esm/BarChart/BarLabel/BarLabel.d.ts +1 -1
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
- package/esm/BarChart/BarLabel/BarLabelPlot.js +41 -36
- package/esm/BarChart/BarPlot.d.ts +13 -3
- package/esm/BarChart/BarPlot.js +3 -3
- package/esm/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
- package/esm/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
- package/esm/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
- package/esm/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
- package/esm/BarChart/seriesConfig/bar/legend.d.ts +3 -0
- package/esm/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
- package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
- package/esm/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
- package/esm/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
- package/esm/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
- package/esm/BarChart/seriesConfig/index.d.ts +1 -1
- package/esm/BarChart/seriesConfig/index.js +8 -8
- package/esm/BarChart/types.d.ts +1 -0
- package/esm/BarChart/useBarPlotData.js +2 -1
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +1 -1
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -2
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
- package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
- package/esm/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
- package/esm/ChartsClipPath/ChartsClipPath.d.ts +1 -2
- package/esm/ChartsClipPath/ChartsClipPath.js +0 -1
- package/esm/ChartsGrid/ChartsGrid.d.ts +1 -2
- package/esm/ChartsGrid/ChartsGrid.js +0 -1
- package/esm/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
- package/esm/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +0 -1
- package/esm/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +0 -1
- package/esm/ChartsOverlay/ChartsOverlay.d.ts +1 -1
- package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
- package/esm/ChartsReferenceLine/ChartsReferenceLine.js +0 -1
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
- package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +0 -1
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
- package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +0 -1
- package/esm/ChartsSurface/ChartsSurface.js +9 -10
- package/esm/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
- package/esm/ChartsSurface/chartsSurfaceClasses.js +13 -0
- package/esm/ChartsSurface/index.d.ts +2 -1
- package/esm/ChartsSurface/index.js +2 -1
- package/esm/ChartsText/ChartsText.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
- package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
- package/esm/ChartsTooltip/ChartsTooltip.d.ts +1 -2
- package/esm/ChartsTooltip/ChartsTooltip.js +0 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +13 -14
- package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/esm/ChartsWrapper/ChartsWrapper.d.ts +1 -1
- package/esm/ChartsWrapper/ChartsWrapper.js +4 -6
- package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
- package/esm/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
- package/esm/ChartsXAxis/ChartsXAxis.d.ts +1 -2
- package/esm/ChartsXAxis/ChartsXAxis.js +0 -1
- package/esm/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
- package/esm/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
- package/esm/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
- package/esm/ChartsYAxis/ChartsYAxis.d.ts +1 -2
- package/esm/ChartsYAxis/ChartsYAxis.js +0 -1
- package/esm/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
- package/esm/Gauge/GaugeProvider.d.ts +1 -1
- package/esm/Gauge/GaugeReferenceArc.d.ts +1 -1
- package/esm/Gauge/GaugeValueArc.d.ts +1 -1
- package/esm/Gauge/GaugeValueText.d.ts +1 -2
- package/esm/Gauge/GaugeValueText.js +0 -1
- package/esm/LineChart/AnimatedArea.d.ts +1 -1
- package/esm/LineChart/AppearingMask.d.ts +1 -1
- package/esm/LineChart/AreaElement.d.ts +1 -1
- package/esm/LineChart/AreaPlot.d.ts +1 -1
- package/esm/LineChart/CircleMarkElement.d.ts +1 -1
- package/esm/LineChart/FocusedMark.d.ts +1 -2
- package/esm/LineChart/FocusedMark.js +0 -1
- package/esm/LineChart/LineElement.d.ts +1 -1
- package/esm/LineChart/LineHighlightElement.d.ts +1 -1
- package/esm/LineChart/LineHighlightPlot.d.ts +1 -1
- package/esm/LineChart/LinePlot.d.ts +1 -1
- package/esm/LineChart/MarkElement.d.ts +1 -1
- package/esm/LineChart/MarkPlot.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getColor.js +28 -5
- package/esm/LineChart/seriesConfig/index.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.js +1 -1
- package/esm/PieChart/PieArcLabelPlot.d.ts +1 -1
- package/esm/PieChart/PieArcPlot.d.ts +1 -1
- package/esm/PieChart/PiePlot.d.ts +1 -2
- package/esm/PieChart/PiePlot.js +0 -1
- package/esm/PieChart/seriesConfig/index.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.js +1 -1
- package/esm/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
- package/esm/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
- package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
- package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -2
- package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
- package/esm/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
- package/esm/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
- package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
- package/esm/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
- package/esm/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
- package/esm/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -2
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
- package/esm/RadarChart/seriesConfig/getColor.js +12 -1
- package/esm/ScatterChart/BatchScatter.d.ts +1 -2
- package/esm/ScatterChart/BatchScatter.js +4 -4
- package/esm/ScatterChart/Scatter.d.ts +7 -2
- package/esm/ScatterChart/Scatter.js +7 -3
- package/esm/ScatterChart/ScatterMarker.d.ts +1 -1
- package/esm/ScatterChart/ScatterPlot.d.ts +1 -1
- package/esm/ScatterChart/ScatterPlot.js +1 -1
- package/esm/ScatterChart/seriesConfig/getColor.js +36 -7
- package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.js +1 -1
- package/esm/context/ChartProvider/ChartProvider.d.ts +1 -1
- package/esm/context/ChartProvider/ChartProvider.js +4 -4
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +3 -3
- package/esm/context/ChartsSlotsContext.d.ts +1 -1
- package/esm/hooks/index.d.ts +1 -0
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/useDataset.d.ts +6 -0
- package/esm/hooks/useDataset.js +13 -0
- package/esm/hooks/useInteractionItemProps.js +2 -5
- package/esm/hooks/useIsItemFocused.js +5 -3
- package/esm/hooks/useItemHighlighted.js +2 -2
- package/esm/hooks/useItemHighlightedGetter.js +0 -1
- package/esm/index.js +1 -1
- package/esm/internals/colorScale.d.ts +1 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
- package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -1
- package/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
- package/esm/internals/createSeriesSelectorOfType.js +5 -3
- package/esm/internals/getSeriesColorFn.d.ts +5 -0
- package/esm/internals/getSeriesColorFn.js +3 -0
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +8 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +21 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +15 -9
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +69 -45
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -22
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +3 -0
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +11 -10
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
- package/esm/internals/plugins/models/plugin.d.ts +3 -2
- package/esm/internals/plugins/utils/selectors.d.ts +13 -17
- package/esm/internals/plugins/utils/selectors.js +3 -35
- package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
- package/esm/internals/plugins/utils/useLazySelectorEffect.js +2 -2
- package/esm/internals/store/useCharts.d.ts +3 -4
- package/esm/internals/store/useCharts.js +2 -2
- package/esm/internals/store/useSelector.d.ts +2 -4
- package/esm/internals/store/useSelector.js +2 -8
- package/esm/internals/store/useStore.d.ts +3 -5
- package/esm/locales/index.d.ts +2 -1
- package/esm/locales/index.js +1 -0
- package/esm/locales/nbNO.d.ts +115 -0
- package/esm/locales/nbNO.js +113 -0
- package/esm/models/seriesType/bar.d.ts +9 -0
- package/esm/models/seriesType/common.d.ts +22 -6
- package/esm/models/seriesType/config.d.ts +7 -16
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +12 -0
- package/hooks/useDataset.d.ts +6 -0
- package/hooks/useDataset.js +18 -0
- package/hooks/useInteractionItemProps.js +2 -5
- package/hooks/useIsItemFocused.js +5 -3
- package/hooks/useItemHighlighted.js +2 -2
- package/index.js +1 -1
- package/internals/colorScale.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -2
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -2
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
- package/internals/createSeriesSelectorOfType.js +6 -3
- package/internals/getSeriesColorFn.d.ts +5 -0
- package/internals/getSeriesColorFn.js +9 -0
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
- package/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +9 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +22 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +14 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +70 -46
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -23
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
- package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +4 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +12 -10
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
- package/internals/plugins/models/plugin.d.ts +3 -2
- package/internals/plugins/utils/selectors.d.ts +13 -17
- package/internals/plugins/utils/selectors.js +3 -35
- package/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
- package/internals/plugins/utils/useLazySelectorEffect.js +2 -2
- package/internals/store/useCharts.d.ts +3 -4
- package/internals/store/useCharts.js +2 -2
- package/internals/store/useSelector.d.ts +2 -4
- package/internals/store/useSelector.js +2 -10
- package/internals/store/useStore.d.ts +3 -5
- package/locales/index.d.ts +2 -1
- package/locales/index.js +11 -0
- package/locales/nbNO.d.ts +115 -0
- package/locales/nbNO.js +119 -0
- package/models/seriesType/bar.d.ts +9 -0
- package/models/seriesType/common.d.ts +22 -6
- package/models/seriesType/config.d.ts +7 -16
- package/package.json +4 -4
- package/BarChart/seriesConfig/getColor.d.ts +0 -3
- package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/BarChart/seriesConfig/legend.d.ts +0 -3
- package/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
- package/BarChart/seriesConfig/tooltip.d.ts +0 -4
- package/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
- package/esm/BarChart/seriesConfig/getColor.d.ts +0 -3
- package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/esm/BarChart/seriesConfig/legend.d.ts +0 -3
- package/esm/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
- package/esm/BarChart/seriesConfig/tooltip.d.ts +0 -4
- package/esm/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
- package/esm/internals/plugins/utils/ChartStore.d.ts +0 -13
- package/esm/internals/plugins/utils/ChartStore.js +0 -22
- package/internals/plugins/utils/ChartStore.d.ts +0 -13
- package/internals/plugins/utils/ChartStore.js +0 -29
- /package/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
- /package/esm/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
3
|
import { createSelector } from "../../utils/selectors.js";
|
|
3
4
|
import { selectorChartXAxis, selectorChartYAxis } from "./useChartCartesianAxisRendering.selectors.js";
|
|
4
5
|
import { selectorChartsInteractionXAxisIndex, selectorChartsInteractionXAxisValue, selectorChartsInteractionYAxisIndex, selectorChartsInteractionYAxisValue } from "./useChartCartesianInteraction.selectors.js";
|
|
@@ -18,8 +19,8 @@ const selectAxisHighlight = (computedIndex, axis, axisItems, isBrushSelectionAct
|
|
|
18
19
|
dataIndex: computedIndex
|
|
19
20
|
}];
|
|
20
21
|
};
|
|
21
|
-
export const selectorChartsHighlightXAxisIndex =
|
|
22
|
-
export const selectorChartsHighlightYAxisIndex =
|
|
22
|
+
export const selectorChartsHighlightXAxisIndex = createSelectorMemoized(selectorChartsInteractionXAxisIndex, selectorChartXAxis, selectorChartControlledCartesianAxisHighlight, selectorBrushShouldPreventAxisHighlight, selectAxisHighlight);
|
|
23
|
+
export const selectorChartsHighlightYAxisIndex = createSelectorMemoized(selectorChartsInteractionYAxisIndex, selectorChartYAxis, selectorChartControlledCartesianAxisHighlight, selectorBrushShouldPreventAxisHighlight, selectAxisHighlight);
|
|
23
24
|
const selectAxisHighlightWithValue = (computedIndex, computedValue, axis, controlledAxisItems, keyboardAxisItem, lastInteractionUpdate, isBrushSelectionActive) => {
|
|
24
25
|
if (isBrushSelectionActive) {
|
|
25
26
|
return [];
|
|
@@ -1,60 +1,44 @@
|
|
|
1
1
|
import { AxisId, AxisItemIdentifier, ChartsAxisProps } from "../../../../models/axis.js";
|
|
2
2
|
import { ComputeResult } from "./computeAxisValue.js";
|
|
3
3
|
export declare const selectChartsInteractionAxisIndex: (value: number | null, axes: ComputeResult<ChartsAxisProps>, id?: AxisId) => number | null;
|
|
4
|
-
export declare const selectorChartsInteractionXAxisIndex:
|
|
4
|
+
export declare const selectorChartsInteractionXAxisIndex: (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
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
|
-
}
|
|
6
|
+
}, id?: AxisId | undefined) => number | null;
|
|
7
|
+
export declare const selectorChartsInteractionYAxisIndex: (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
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
export declare const
|
|
9
|
+
}, id?: AxisId | undefined) => number | null;
|
|
10
|
+
export declare const selectorChartAxisInteraction: (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
11
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
|
-
}
|
|
12
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
|
-
} & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & Partial<{}>, number | null, [id?: AxisId | undefined]>;
|
|
14
|
-
export declare const selectorChartAxisInteraction: import("reselect").Selector<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> & {
|
|
15
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
|
-
} & {
|
|
17
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
|
-
} & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & Partial<{}>, {
|
|
12
|
+
}) => {
|
|
19
13
|
axisId: AxisId;
|
|
20
14
|
dataIndex: number;
|
|
21
|
-
}[]
|
|
15
|
+
}[];
|
|
22
16
|
/**
|
|
23
17
|
* Get interaction values
|
|
24
18
|
*/
|
|
25
19
|
type Value = number | Date | null;
|
|
26
|
-
export declare const selectorChartsInteractionXAxisValue:
|
|
27
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
-
} & {
|
|
20
|
+
export declare const selectorChartsInteractionXAxisValue: (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> & {
|
|
29
21
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
30
|
-
}
|
|
31
|
-
export declare const selectorChartsInteractionYAxisValue:
|
|
22
|
+
}, id?: AxisId | undefined) => Value;
|
|
23
|
+
export declare const selectorChartsInteractionYAxisValue: (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> & {
|
|
32
24
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
33
|
-
}
|
|
34
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
35
|
-
} & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & Partial<{}>, Value, [id?: AxisId | undefined]>;
|
|
25
|
+
}, id?: AxisId | undefined) => Value;
|
|
36
26
|
/**
|
|
37
27
|
* Get x-axis ids and corresponding data index that should be display in the tooltip.
|
|
38
28
|
*/
|
|
39
|
-
export declare const selectorChartsInteractionTooltipXAxes:
|
|
40
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
41
|
-
} & {
|
|
29
|
+
export declare const selectorChartsInteractionTooltipXAxes: (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> & {
|
|
42
30
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
43
|
-
}
|
|
31
|
+
}) => AxisItemIdentifier[];
|
|
44
32
|
/**
|
|
45
33
|
* Get y-axis ids and corresponding data index that should be display in the tooltip.
|
|
46
34
|
*/
|
|
47
|
-
export declare const selectorChartsInteractionTooltipYAxes:
|
|
35
|
+
export declare const selectorChartsInteractionTooltipYAxes: (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> & {
|
|
48
36
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
49
|
-
}
|
|
50
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
51
|
-
} & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & Partial<{}>, AxisItemIdentifier[], any[]>;
|
|
37
|
+
}) => AxisItemIdentifier[];
|
|
52
38
|
/**
|
|
53
39
|
* Return `true` if the axis tooltip has something to display.
|
|
54
40
|
*/
|
|
55
|
-
export declare const selectorChartsInteractionAxisTooltip:
|
|
56
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
57
|
-
} & {
|
|
41
|
+
export declare const selectorChartsInteractionAxisTooltip: (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> & {
|
|
58
42
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
59
|
-
}
|
|
43
|
+
}) => boolean;
|
|
60
44
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
2
|
+
import { createSelectorMemoizedWithOptions } from '@mui/x-internals/store';
|
|
2
3
|
import { createSelector } from "../../utils/selectors.js";
|
|
3
4
|
import { selectorChartsInteractionPointerX, selectorChartsInteractionPointerY } from "../useChartInteraction/useChartInteraction.selectors.js";
|
|
4
5
|
import { getAxisIndex, getAxisValue } from "./getAxisValue.js";
|
|
5
6
|
import { selectorChartXAxis, selectorChartYAxis } from "./useChartCartesianAxisRendering.selectors.js";
|
|
6
|
-
const optionalGetAxisId = (_, id) => id;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Get interaction indexes
|
|
@@ -19,8 +19,8 @@ export const selectChartsInteractionAxisIndex = (value, axes, id) => {
|
|
|
19
19
|
const index = indexGetter(value, axes, id);
|
|
20
20
|
return index === -1 ? null : index;
|
|
21
21
|
};
|
|
22
|
-
export const selectorChartsInteractionXAxisIndex = createSelector([selectorChartsInteractionPointerX, selectorChartXAxis
|
|
23
|
-
export const selectorChartsInteractionYAxisIndex = createSelector([selectorChartsInteractionPointerY, selectorChartYAxis
|
|
22
|
+
export const selectorChartsInteractionXAxisIndex = createSelector([selectorChartsInteractionPointerX, selectorChartXAxis], selectChartsInteractionAxisIndex);
|
|
23
|
+
export const selectorChartsInteractionYAxisIndex = createSelector([selectorChartsInteractionPointerY, selectorChartYAxis], selectChartsInteractionAxisIndex);
|
|
24
24
|
export const selectorChartAxisInteraction = createSelector([selectorChartsInteractionPointerX, selectorChartsInteractionPointerY, selectorChartXAxis, selectorChartYAxis], (x, y, xAxis, yAxis) => [...(x === null ? [] : xAxis.axisIds.map(axisId => ({
|
|
25
25
|
axisId,
|
|
26
26
|
dataIndex: indexGetter(x, xAxis, axisId)
|
|
@@ -39,25 +39,33 @@ function valueGetter(value, axes, indexes, ids = axes.axisIds[0]) {
|
|
|
39
39
|
return getAxisValue(axis.scale, axis.data, value, indexes[axisIndex]);
|
|
40
40
|
}) : getAxisValue(axes.axis[ids].scale, axes.axis[ids].data, value, indexes);
|
|
41
41
|
}
|
|
42
|
-
export const selectorChartsInteractionXAxisValue = createSelector([selectorChartsInteractionPointerX, selectorChartXAxis, selectorChartsInteractionXAxisIndex
|
|
42
|
+
export const selectorChartsInteractionXAxisValue = createSelector([selectorChartsInteractionPointerX, selectorChartXAxis, selectorChartsInteractionXAxisIndex], (x, xAxes, xIndex, id) => {
|
|
43
43
|
if (x === null || xAxes.axisIds.length === 0) {
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
return valueGetter(x, xAxes, xIndex, id);
|
|
47
47
|
});
|
|
48
|
-
export const selectorChartsInteractionYAxisValue = createSelector([selectorChartsInteractionPointerY, selectorChartYAxis, selectorChartsInteractionYAxisIndex
|
|
48
|
+
export const selectorChartsInteractionYAxisValue = createSelector([selectorChartsInteractionPointerY, selectorChartYAxis, selectorChartsInteractionYAxisIndex], (y, yAxes, yIndex, id) => {
|
|
49
49
|
if (y === null || yAxes.axisIds.length === 0) {
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
return valueGetter(y, yAxes, yIndex, id);
|
|
53
53
|
});
|
|
54
|
+
const EMPTY_ARRAY = [];
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Get x-axis ids and corresponding data index that should be display in the tooltip.
|
|
57
58
|
*/
|
|
58
|
-
export const selectorChartsInteractionTooltipXAxes =
|
|
59
|
+
export const selectorChartsInteractionTooltipXAxes = createSelectorMemoizedWithOptions({
|
|
60
|
+
memoizeOptions: {
|
|
61
|
+
// Keep the same reference if array content is the same.
|
|
62
|
+
// If possible, avoid this pattern by creating selectors that
|
|
63
|
+
// uses string/number as arguments.
|
|
64
|
+
resultEqualityCheck: isDeepEqual
|
|
65
|
+
}
|
|
66
|
+
})(selectorChartsInteractionPointerX, selectorChartXAxis, (value, axes) => {
|
|
59
67
|
if (value === null) {
|
|
60
|
-
return
|
|
68
|
+
return EMPTY_ARRAY;
|
|
61
69
|
}
|
|
62
70
|
return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({
|
|
63
71
|
axisId,
|
|
@@ -65,21 +73,21 @@ export const selectorChartsInteractionTooltipXAxes = createSelector([selectorCha
|
|
|
65
73
|
})).filter(({
|
|
66
74
|
dataIndex
|
|
67
75
|
}) => dataIndex >= 0);
|
|
68
|
-
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Get y-axis ids and corresponding data index that should be display in the tooltip.
|
|
80
|
+
*/
|
|
81
|
+
export const selectorChartsInteractionTooltipYAxes = createSelectorMemoizedWithOptions({
|
|
69
82
|
memoizeOptions: {
|
|
70
83
|
// Keep the same reference if array content is the same.
|
|
71
84
|
// If possible, avoid this pattern by creating selectors that
|
|
72
85
|
// uses string/number as arguments.
|
|
73
86
|
resultEqualityCheck: isDeepEqual
|
|
74
87
|
}
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Get y-axis ids and corresponding data index that should be display in the tooltip.
|
|
79
|
-
*/
|
|
80
|
-
export const selectorChartsInteractionTooltipYAxes = createSelector([selectorChartsInteractionPointerY, selectorChartYAxis], (value, axes) => {
|
|
88
|
+
})(selectorChartsInteractionPointerY, selectorChartYAxis, (value, axes) => {
|
|
81
89
|
if (value === null) {
|
|
82
|
-
return
|
|
90
|
+
return EMPTY_ARRAY;
|
|
83
91
|
}
|
|
84
92
|
return axes.axisIds.filter(id => axes.axis[id].triggerTooltip).map(axisId => ({
|
|
85
93
|
axisId,
|
|
@@ -87,13 +95,6 @@ export const selectorChartsInteractionTooltipYAxes = createSelector([selectorCha
|
|
|
87
95
|
})).filter(({
|
|
88
96
|
dataIndex
|
|
89
97
|
}) => dataIndex >= 0);
|
|
90
|
-
}, {
|
|
91
|
-
memoizeOptions: {
|
|
92
|
-
// Keep the same reference if array content is the same.
|
|
93
|
-
// If possible, avoid this pattern by creating selectors that
|
|
94
|
-
// uses string/number as arguments.
|
|
95
|
-
resultEqualityCheck: isDeepEqual
|
|
96
|
-
}
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
/**
|
|
@@ -39,11 +39,9 @@ export const useChartClosestPoint = ({
|
|
|
39
39
|
const defaultXAxisId = xAxisIds[0];
|
|
40
40
|
const defaultYAxisId = yAxisIds[0];
|
|
41
41
|
useEnhancedEffect(() => {
|
|
42
|
-
store.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
42
|
+
store.set('voronoi', {
|
|
43
|
+
isVoronoiEnabled: !disableVoronoi
|
|
44
|
+
});
|
|
47
45
|
}, [store, disableVoronoi]);
|
|
48
46
|
React.useEffect(() => {
|
|
49
47
|
if (svgRef.current === null || disableVoronoi) {
|
|
@@ -176,18 +174,14 @@ export const useChartClosestPoint = ({
|
|
|
176
174
|
|
|
177
175
|
// Instance implementation
|
|
178
176
|
const enableVoronoiCallback = useEventCallback(() => {
|
|
179
|
-
store.
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
})
|
|
183
|
-
}));
|
|
177
|
+
store.set('voronoi', {
|
|
178
|
+
isVoronoiEnabled: true
|
|
179
|
+
});
|
|
184
180
|
});
|
|
185
181
|
const disableVoronoiCallback = useEventCallback(() => {
|
|
186
|
-
store.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
})
|
|
190
|
-
}));
|
|
182
|
+
store.set('voronoi', {
|
|
183
|
+
isVoronoiEnabled: false
|
|
184
|
+
});
|
|
191
185
|
});
|
|
192
186
|
return {
|
|
193
187
|
instance: {
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const selectorChartsIsVoronoiEnabled:
|
|
1
|
+
export declare const selectorChartsIsVoronoiEnabled: (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("./useChartClosestPoint.types.js").UseChartVoronoiState & Partial<{}> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
|
-
}
|
|
4
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
5
|
-
}, boolean | undefined, any[]>;
|
|
3
|
+
}) => boolean | undefined;
|
|
@@ -15,11 +15,11 @@ export const useChartHighlight = ({
|
|
|
15
15
|
defaultValue: null
|
|
16
16
|
});
|
|
17
17
|
useEnhancedEffect(() => {
|
|
18
|
-
store.
|
|
19
|
-
highlight
|
|
18
|
+
if (store.state.highlight.item !== params.highlightedItem) {
|
|
19
|
+
store.set('highlight', _extends({}, store.state.highlight, {
|
|
20
20
|
item: params.highlightedItem
|
|
21
|
-
})
|
|
22
|
-
}
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
23
|
}, [store, params.highlightedItem]);
|
|
24
24
|
const clearHighlight = useEventCallback(() => {
|
|
25
25
|
params.onHighlightChange?.(null);
|
|
@@ -27,12 +27,10 @@ export const useChartHighlight = ({
|
|
|
27
27
|
if (prevItem === null) {
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
store.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
30
|
+
store.set('highlight', {
|
|
31
|
+
item: null,
|
|
32
|
+
lastUpdate: 'pointer'
|
|
33
|
+
});
|
|
36
34
|
});
|
|
37
35
|
const setHighlight = useEventCallback(newItem => {
|
|
38
36
|
const prevItem = store.getSnapshot().highlight.item;
|
|
@@ -40,12 +38,10 @@ export const useChartHighlight = ({
|
|
|
40
38
|
return;
|
|
41
39
|
}
|
|
42
40
|
params.onHighlightChange?.(newItem);
|
|
43
|
-
store.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
}));
|
|
41
|
+
store.set('highlight', {
|
|
42
|
+
item: newItem,
|
|
43
|
+
lastUpdate: 'pointer'
|
|
44
|
+
});
|
|
49
45
|
});
|
|
50
46
|
return {
|
|
51
47
|
instance: {
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import { SeriesId } from "../../../../models/seriesType/common.js";
|
|
2
2
|
import { HighlightItemData } from "./useChartHighlight.types.js";
|
|
3
3
|
import { HighlightScope } from "./highlightConfig.types.js";
|
|
4
|
-
export declare const selectorChartsHighlightScopePerSeriesId:
|
|
4
|
+
export declare const selectorChartsHighlightScopePerSeriesId: (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<{}> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
|
-
}
|
|
6
|
+
}) => Map<SeriesId, Partial<HighlightScope> | undefined>;
|
|
7
|
+
export declare const selectorChartsHighlightedItem: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
7
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
export declare const
|
|
9
|
+
}) => HighlightItemData | null;
|
|
10
|
+
export declare const selectorChartsHighlightScope: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
10
11
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
|
-
}
|
|
12
|
+
}) => Partial<HighlightScope> | null;
|
|
13
|
+
export declare const selectorChartsIsHighlightedCallback: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
12
14
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
|
-
}
|
|
14
|
-
export declare const
|
|
15
|
+
}) => (item: HighlightItemData | null) => boolean;
|
|
16
|
+
export declare const selectorChartsIsFadedCallback: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
15
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
16
|
-
}
|
|
18
|
+
}) => (item: HighlightItemData | null) => boolean;
|
|
19
|
+
export declare const selectorChartsIsHighlighted: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
17
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
|
-
}
|
|
19
|
-
export declare const
|
|
21
|
+
}, item: HighlightItemData | null) => boolean;
|
|
22
|
+
export declare const selectorChartIsSeriesHighlighted: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
20
23
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
21
|
-
}
|
|
24
|
+
}, seriesId: SeriesId) => boolean;
|
|
25
|
+
export declare const selectorChartIsSeriesFaded: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
22
26
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
23
|
-
}
|
|
24
|
-
export declare const
|
|
27
|
+
}, seriesId: SeriesId) => boolean;
|
|
28
|
+
export declare const selectorChartSeriesUnfadedItem: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
25
29
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
26
|
-
}
|
|
30
|
+
}, seriesId: SeriesId) => number | null | undefined;
|
|
31
|
+
export declare const selectorChartSeriesHighlightedItem: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
27
32
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
-
}
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export declare const selectorChartSeriesUnfadedItem: import("reselect").Selector<any, number | null | undefined, [seriesId: SeriesId]>;
|
|
33
|
-
export declare const selectorChartSeriesHighlightedItem: import("reselect").Selector<any, number | null | undefined, [seriesId: SeriesId]>;
|
|
34
|
-
export declare const selectorChartsIsFaded: import("reselect").Selector<any, boolean, [item: HighlightItemData | null]>;
|
|
33
|
+
}, seriesId: SeriesId) => number | null | undefined;
|
|
34
|
+
export declare const selectorChartsIsFaded: (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("./useChartHighlight.types.js").UseChartHighlightState & Partial<{}> & {
|
|
35
|
+
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
36
|
+
}, item: HighlightItemData | null) => boolean;
|
package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
1
2
|
import { createSelector } from "../../utils/selectors.js";
|
|
2
3
|
import { createIsHighlighted } from "./createIsHighlighted.js";
|
|
3
4
|
import { createIsFaded } from "./createIsFaded.js";
|
|
@@ -16,7 +17,7 @@ export const selectorChartsHighlightScopePerSeriesId = createSelector([selectSer
|
|
|
16
17
|
});
|
|
17
18
|
return map;
|
|
18
19
|
});
|
|
19
|
-
export const selectorChartsHighlightedItem =
|
|
20
|
+
export const selectorChartsHighlightedItem = createSelectorMemoized(selectHighlight, selectorChartsKeyboardItem, function selectorChartsHighlightedItem(highlight, keyboardItem) {
|
|
20
21
|
return highlight.lastUpdate === 'pointer' ? highlight.item : keyboardItem;
|
|
21
22
|
});
|
|
22
23
|
export const selectorChartsHighlightScope = createSelector([selectorChartsHighlightScopePerSeriesId, selectorChartsHighlightedItem], function selectorChartsHighlightScope(seriesIdToHighlightScope, highlightedItem) {
|
|
@@ -31,13 +32,13 @@ export const selectorChartsHighlightScope = createSelector([selectorChartsHighli
|
|
|
31
32
|
});
|
|
32
33
|
export const selectorChartsIsHighlightedCallback = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], createIsHighlighted);
|
|
33
34
|
export const selectorChartsIsFadedCallback = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], createIsFaded);
|
|
34
|
-
export const selectorChartsIsHighlighted = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
35
|
+
export const selectorChartsIsHighlighted = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], function selectorChartsIsHighlighted(highlightScope, highlightedItem, item) {
|
|
35
36
|
return createIsHighlighted(highlightScope, highlightedItem)(item);
|
|
36
37
|
});
|
|
37
|
-
export const selectorChartIsSeriesHighlighted = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
38
|
-
export const selectorChartIsSeriesFaded = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
39
|
-
export const selectorChartSeriesUnfadedItem = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
40
|
-
export const selectorChartSeriesHighlightedItem = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
41
|
-
export const selectorChartsIsFaded = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem
|
|
38
|
+
export const selectorChartIsSeriesHighlighted = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], isSeriesHighlighted);
|
|
39
|
+
export const selectorChartIsSeriesFaded = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], isSeriesFaded);
|
|
40
|
+
export const selectorChartSeriesUnfadedItem = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], getSeriesUnfadedItem);
|
|
41
|
+
export const selectorChartSeriesHighlightedItem = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], getSeriesHighlightedItem);
|
|
42
|
+
export const selectorChartsIsFaded = createSelector([selectorChartsHighlightScope, selectorChartsHighlightedItem], function selectorChartsIsFaded(highlightScope, highlightedItem, item) {
|
|
42
43
|
return createIsFaded(highlightScope, highlightedItem)(item);
|
|
43
44
|
});
|
|
@@ -5,56 +5,42 @@ export const useChartInteraction = ({
|
|
|
5
5
|
store
|
|
6
6
|
}) => {
|
|
7
7
|
const cleanInteraction = useEventCallback(function cleanInteraction() {
|
|
8
|
-
store.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
item: null
|
|
13
|
-
})
|
|
14
|
-
});
|
|
15
|
-
});
|
|
8
|
+
store.set('interaction', _extends({}, store.state.interaction, {
|
|
9
|
+
pointer: null,
|
|
10
|
+
item: null
|
|
11
|
+
}));
|
|
16
12
|
});
|
|
17
13
|
const removeItemInteraction = useEventCallback(function removeItemInteraction(itemToRemove) {
|
|
18
|
-
store.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
interaction: _extends({}, prev.interaction, {
|
|
24
|
-
item: null
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
if (prevItem === null || Object.keys(itemToRemove).some(key => itemToRemove[key] !== prevItem[key])) {
|
|
29
|
-
// The current item is already different from the one to remove. No need to clean it.
|
|
30
|
-
return prev;
|
|
31
|
-
}
|
|
32
|
-
return _extends({}, prev, {
|
|
33
|
-
interaction: _extends({}, prev.interaction, {
|
|
14
|
+
const prevItem = store.state.interaction.item;
|
|
15
|
+
if (!itemToRemove) {
|
|
16
|
+
// Remove without taking care of the current item
|
|
17
|
+
if (prevItem !== null) {
|
|
18
|
+
store.set('interaction', _extends({}, store.state.interaction, {
|
|
34
19
|
item: null
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
|
-
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (prevItem === null || Object.keys(itemToRemove).some(key => itemToRemove[key] !== prevItem[key])) {
|
|
25
|
+
// The current item is already different from the one to remove. No need to clean it.
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
store.set('interaction', _extends({}, store.state.interaction, {
|
|
29
|
+
item: null
|
|
30
|
+
}));
|
|
38
31
|
});
|
|
39
32
|
const setItemInteraction = useEventCallback(function setItemInteraction(newItem, context) {
|
|
40
|
-
store.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
lastUpdate: context.interaction,
|
|
47
|
-
item: newItem
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
});
|
|
33
|
+
if (!fastObjectShallowCompare(store.state.interaction.item, newItem)) {
|
|
34
|
+
store.set('interaction', _extends({}, store.state.interaction, {
|
|
35
|
+
lastUpdate: context.interaction,
|
|
36
|
+
item: newItem
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
51
39
|
});
|
|
52
40
|
const setPointerCoordinate = useEventCallback(function setPointerCoordinate(coordinate) {
|
|
53
|
-
store.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
lastUpdate: coordinate !== null ? 'pointer' : prev.interaction.lastUpdate
|
|
57
|
-
})
|
|
41
|
+
store.set('interaction', _extends({}, store.state.interaction, {
|
|
42
|
+
pointer: coordinate,
|
|
43
|
+
lastUpdate: coordinate !== null ? 'pointer' : store.state.interaction.lastUpdate
|
|
58
44
|
}));
|
|
59
45
|
});
|
|
60
46
|
return {
|