@mui/x-charts 8.16.0 → 8.18.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 +6 -0
- package/BarChart/BarLabel/BarLabel.js +41 -4
- package/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
- package/BarChart/BarLabel/BarLabelItem.js +4 -2
- package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
- package/BarChart/BarLabel/BarLabelPlot.js +42 -38
- package/BarChart/BarPlot.d.ts +13 -3
- package/BarChart/BarPlot.js +8 -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 +2 -0
- package/BarChart/useBarPlotData.js +5 -3
- package/CHANGELOG.md +208 -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 +6 -0
- package/esm/BarChart/BarLabel/BarLabel.js +41 -4
- package/esm/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
- package/esm/BarChart/BarLabel/BarLabelItem.js +4 -2
- package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
- package/esm/BarChart/BarLabel/BarLabelPlot.js +42 -37
- package/esm/BarChart/BarPlot.d.ts +13 -3
- package/esm/BarChart/BarPlot.js +8 -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 +2 -0
- package/esm/BarChart/useBarPlotData.js +5 -3
- 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/animation/useAnimateBarLabel.d.ts +1 -1
- package/esm/hooks/animation/useAnimateBarLabel.js +61 -12
- package/esm/hooks/index.d.ts +1 -0
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/useAxis.d.ts +116 -16
- package/esm/hooks/useAxis.js +122 -18
- 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/hooks/useScale.d.ts +25 -6
- package/esm/hooks/useScale.js +29 -8
- 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 +16 -0
- package/esm/models/seriesType/common.d.ts +22 -6
- package/esm/models/seriesType/config.d.ts +7 -16
- package/hooks/animation/useAnimateBarLabel.d.ts +1 -1
- package/hooks/animation/useAnimateBarLabel.js +61 -12
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +12 -0
- package/hooks/useAxis.d.ts +116 -16
- package/hooks/useAxis.js +122 -18
- 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/hooks/useScale.d.ts +25 -6
- package/hooks/useScale.js +29 -8
- 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 +16 -0
- package/models/seriesType/common.d.ts +22 -6
- package/models/seriesType/config.d.ts +7 -16
- package/package.json +5 -5
- 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
package/hooks/useScale.js
CHANGED
|
@@ -33,8 +33,10 @@ function getValueToPositionMapper(scale) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Get the X scale.
|
|
35
35
|
*
|
|
36
|
-
* @param
|
|
37
|
-
*
|
|
36
|
+
* @param axisId - The axis identifier. Can be:
|
|
37
|
+
* - A string or number matching the axis ID defined in the chart's `xAxis` prop
|
|
38
|
+
* - Undefined to get the default (first) X axis
|
|
39
|
+
* @returns The X axis scale
|
|
38
40
|
*/
|
|
39
41
|
function useXScale(axisId) {
|
|
40
42
|
const axis = (0, _useAxis.useXAxis)(axisId);
|
|
@@ -44,18 +46,37 @@ function useXScale(axisId) {
|
|
|
44
46
|
/**
|
|
45
47
|
* Get the Y scale.
|
|
46
48
|
*
|
|
47
|
-
* @param
|
|
48
|
-
*
|
|
49
|
+
* @param axisId - The axis identifier. Can be:
|
|
50
|
+
* - A string or number matching the axis ID defined in the chart's `yAxis` prop
|
|
51
|
+
* - Undefined to get the default (first) Y axis
|
|
52
|
+
* @returns The Y axis scale
|
|
49
53
|
*/
|
|
50
54
|
function useYScale(axisId) {
|
|
51
55
|
const axis = (0, _useAxis.useYAxis)(axisId);
|
|
52
56
|
return axis.scale;
|
|
53
57
|
}
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get the rotation scale.
|
|
61
|
+
*
|
|
62
|
+
* @param axisId - The axis identifier. Can be:
|
|
63
|
+
* - A string or number matching the axis ID defined in the chart's `rotationAxis` prop
|
|
64
|
+
* - Undefined to get the default rotation axis
|
|
65
|
+
* @returns The rotation axis scale, or undefined if not found
|
|
66
|
+
*/
|
|
67
|
+
function useRotationScale(axisId) {
|
|
68
|
+
const axis = (0, _useAxis.useRotationAxis)(axisId);
|
|
56
69
|
return axis?.scale;
|
|
57
70
|
}
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Get the radius scale.
|
|
74
|
+
* @param axisId - The axis identifier. Can be:
|
|
75
|
+
* - A string or number matching the axis ID defined in the chart's `radiusAxis` prop
|
|
76
|
+
* - Undefined to get the default radius axis
|
|
77
|
+
* @returns The radius axis scale, or undefined if not found
|
|
78
|
+
*/
|
|
79
|
+
function useRadiusScale(axisId) {
|
|
80
|
+
const axis = (0, _useAxis.useRadiusAxis)(axisId);
|
|
60
81
|
return axis?.scale;
|
|
61
82
|
}
|
package/index.js
CHANGED
|
@@ -2,4 +2,4 @@ import { ScaleOrdinal } from '@mui/x-charts-vendor/d3-scale';
|
|
|
2
2
|
import { ContinuousColorConfig, PiecewiseColorConfig, OrdinalColorConfig } from "../models/colorMapping.js";
|
|
3
3
|
export declare function getSequentialColorScale<Value extends number | Date>(config: ContinuousColorConfig<Value> | PiecewiseColorConfig<Value>): import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<Value, string, never> | import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, never>;
|
|
4
4
|
export declare function getOrdinalColorScale<Value extends number | Date | string>(config: OrdinalColorConfig<Value>): ScaleOrdinal<Value, string, null | string> | ScaleOrdinal<number, string, null | string>;
|
|
5
|
-
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig):
|
|
5
|
+
export declare function getColorScale(config: ContinuousColorConfig | PiecewiseColorConfig | OrdinalColorConfig): import("@mui/x-charts-vendor/d3-scale").ScaleSequential<string, never> | ScaleOrdinal<number, string, string | null> | ScaleOrdinal<string | number | Date, string, string | null> | import("@mui/x-charts-vendor/d3-scale").ScaleThreshold<number | Date, string, never>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function ChartsAxesGradients(): React.JSX.Element | null;
|
|
1
|
+
export declare function ChartsAxesGradients(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ContinuousColorConfig } from "../../../models/colorMapping.js";
|
|
3
2
|
type ChartsContinuousGradientProps = {
|
|
4
3
|
isReversed?: boolean;
|
|
@@ -15,5 +14,5 @@ type ChartsContinuousGradientProps = {
|
|
|
15
14
|
*/
|
|
16
15
|
gradientUnits?: 'objectBoundingBox' | 'userSpaceOnUse';
|
|
17
16
|
};
|
|
18
|
-
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps):
|
|
17
|
+
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
18
|
export {};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = ChartsContinuousGradient;
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
7
|
var _d3Interpolate = require("@mui/x-charts-vendor/d3-interpolate");
|
|
10
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
9
|
const PX_PRECISION = 10;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { ContinuousColorConfig } from "../../../models/colorMapping.js";
|
|
3
2
|
type ChartsContinuousGradientObjectBoundProps = {
|
|
4
3
|
isReversed?: boolean;
|
|
@@ -9,5 +8,5 @@ type ChartsContinuousGradientObjectBoundProps = {
|
|
|
9
8
|
/**
|
|
10
9
|
* Generates gradients to be used in tooltips and legends.
|
|
11
10
|
*/
|
|
12
|
-
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps):
|
|
11
|
+
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = ChartsContinuousGradientObjectBound;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _d3Interpolate = require("@mui/x-charts-vendor/d3-interpolate");
|
|
12
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
11
|
const PX_PRECISION = 10;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { PiecewiseColorConfig } from "../../../models/colorMapping.js";
|
|
3
2
|
type ChartsPiecewiseGradientProps = {
|
|
4
3
|
isReversed?: boolean;
|
|
@@ -8,5 +7,5 @@ type ChartsPiecewiseGradientProps = {
|
|
|
8
7
|
scale: (value: any) => number | undefined;
|
|
9
8
|
colorMap: PiecewiseColorConfig;
|
|
10
9
|
};
|
|
11
|
-
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps):
|
|
10
|
+
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
11
|
export {};
|
|
@@ -5,14 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createAllSeriesSelectorOfType = createAllSeriesSelectorOfType;
|
|
7
7
|
exports.createSeriesSelectorsOfType = createSeriesSelectorsOfType;
|
|
8
|
-
var _fastArrayCompare = require("@mui/x-internals/fastArrayCompare");
|
|
9
8
|
var _warning = require("@mui/x-internals/warning");
|
|
10
9
|
var _selectors = require("./plugins/utils/selectors");
|
|
11
10
|
var _useChartSeries = require("./plugins/corePlugins/useChartSeries/useChartSeries.selectors");
|
|
12
11
|
var _useStore = require("./store/useStore");
|
|
13
12
|
var _useSelector = require("./store/useSelector");
|
|
13
|
+
// import { fastArrayCompare } from '@mui/x-internals/fastArrayCompare';
|
|
14
|
+
|
|
14
15
|
function createSeriesSelectorsOfType(seriesType) {
|
|
15
|
-
const selectorSeriesWithIds = (0, _selectors.createSelector)([_useChartSeries.selectorChartSeriesProcessed
|
|
16
|
+
const selectorSeriesWithIds = (0, _selectors.createSelector)([_useChartSeries.selectorChartSeriesProcessed], (processedSeries, ids) => {
|
|
16
17
|
if (!ids || Array.isArray(ids) && ids.length === 0) {
|
|
17
18
|
return processedSeries[seriesType]?.seriesOrder?.map(seriesId => processedSeries[seriesType]?.series[seriesId]) ?? [];
|
|
18
19
|
}
|
|
@@ -38,7 +39,9 @@ function createSeriesSelectorsOfType(seriesType) {
|
|
|
38
39
|
});
|
|
39
40
|
return ids => {
|
|
40
41
|
const store = (0, _useStore.useStore)();
|
|
41
|
-
return (0, _useSelector.useSelector)(store, selectorSeriesWithIds,
|
|
42
|
+
return (0, _useSelector.useSelector)(store, selectorSeriesWithIds, ids
|
|
43
|
+
// fastArrayCompare
|
|
44
|
+
);
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
function createAllSeriesSelectorOfType(seriesType) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CommonSeriesType, ColorCallbackValue } from "../models/seriesType/common.js";
|
|
2
|
+
export declare function getSeriesColorFn<TValue>(series: {
|
|
3
|
+
color: NonNullable<CommonSeriesType<TValue>['color']>;
|
|
4
|
+
colorGetter?: CommonSeriesType<TValue>['colorGetter'];
|
|
5
|
+
}): (data: ColorCallbackValue<TValue>) => string;
|
package/internals/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
|
6
6
|
export { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
7
7
|
export { useScatterChartProps } from "../ScatterChart/useScatterChartProps.js";
|
|
8
8
|
export { useScatterPlotData } from "../ScatterChart/useScatterPlotData.js";
|
|
9
|
-
export {
|
|
9
|
+
export { scatterSeriesConfig } from "../ScatterChart/seriesConfig/index.js";
|
|
10
10
|
export { useLineChartProps } from "../LineChart/useLineChartProps.js";
|
|
11
11
|
export { useAreaPlotData } from "../LineChart/useAreaPlotData.js";
|
|
12
12
|
export { useLinePlotData } from "../LineChart/useLinePlotData.js";
|
package/internals/index.js
CHANGED
|
@@ -41,7 +41,7 @@ Object.defineProperty(exports, "getCartesianAxisTriggerTooltip", {
|
|
|
41
41
|
Object.defineProperty(exports, "scatterSeriesConfig", {
|
|
42
42
|
enumerable: true,
|
|
43
43
|
get: function () {
|
|
44
|
-
return _seriesConfig.
|
|
44
|
+
return _seriesConfig.scatterSeriesConfig;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "useAreaPlotData", {
|
|
@@ -15,30 +15,22 @@ const useChartAnimation = ({
|
|
|
15
15
|
store
|
|
16
16
|
}) => {
|
|
17
17
|
React.useEffect(() => {
|
|
18
|
-
store.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
skip: params.skipAnimation
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
});
|
|
18
|
+
store.set('animation', (0, _extends2.default)({}, store.state.animation, {
|
|
19
|
+
skip: params.skipAnimation
|
|
20
|
+
}));
|
|
25
21
|
}, [store, params.skipAnimation]);
|
|
26
22
|
const disableAnimation = React.useCallback(() => {
|
|
27
23
|
let disableCalled = false;
|
|
28
|
-
store.
|
|
29
|
-
|
|
30
|
-
skipAnimationRequests: prevState.animation.skipAnimationRequests + 1
|
|
31
|
-
})
|
|
24
|
+
store.set('animation', (0, _extends2.default)({}, store.state.animation, {
|
|
25
|
+
skipAnimationRequests: store.state.animation.skipAnimationRequests + 1
|
|
32
26
|
}));
|
|
33
27
|
return () => {
|
|
34
28
|
if (disableCalled) {
|
|
35
29
|
return;
|
|
36
30
|
}
|
|
37
31
|
disableCalled = true;
|
|
38
|
-
store.
|
|
39
|
-
|
|
40
|
-
skipAnimationRequests: prevState.animation.skipAnimationRequests - 1
|
|
41
|
-
})
|
|
32
|
+
store.set('animation', (0, _extends2.default)({}, store.state.animation, {
|
|
33
|
+
skipAnimationRequests: store.state.animation.skipAnimationRequests - 1
|
|
42
34
|
}));
|
|
43
35
|
};
|
|
44
36
|
}, [store]);
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const selectorChartSkipAnimation:
|
|
1
|
+
export declare const selectorChartSkipAnimation: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("./useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
|
-
}
|
|
4
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
5
|
-
}, boolean, any[]>;
|
|
3
|
+
}) => boolean;
|
|
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.useChartDimensions = void 0;
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _useEffectAfterFirstRender = require("@mui/x-internals/useEffectAfterFirstRender");
|
|
12
13
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
13
14
|
var _ownerWindow = _interopRequireDefault(require("@mui/utils/ownerWindow"));
|
|
14
15
|
var _useSelector = require("../../../store/useSelector");
|
|
@@ -39,25 +40,20 @@ const useChartDimensions = ({
|
|
|
39
40
|
const computedStyle = win.getComputedStyle(mainEl);
|
|
40
41
|
const newHeight = Math.floor(parseFloat(computedStyle.height)) || 0;
|
|
41
42
|
const newWidth = Math.floor(parseFloat(computedStyle.width)) || 0;
|
|
42
|
-
store.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
width: params.width ?? newWidth,
|
|
55
|
-
height: params.height ?? newHeight,
|
|
56
|
-
propsWidth: params.width,
|
|
57
|
-
propsHeight: params.height
|
|
58
|
-
}
|
|
43
|
+
if (store.state.dimensions.width !== newWidth || store.state.dimensions.height !== newHeight) {
|
|
44
|
+
store.set('dimensions', {
|
|
45
|
+
margin: {
|
|
46
|
+
top: params.margin.top,
|
|
47
|
+
right: params.margin.right,
|
|
48
|
+
bottom: params.margin.bottom,
|
|
49
|
+
left: params.margin.left
|
|
50
|
+
},
|
|
51
|
+
width: params.width ?? newWidth,
|
|
52
|
+
height: params.height ?? newHeight,
|
|
53
|
+
propsWidth: params.width,
|
|
54
|
+
propsHeight: params.height
|
|
59
55
|
});
|
|
60
|
-
}
|
|
56
|
+
}
|
|
61
57
|
return {
|
|
62
58
|
height: newHeight,
|
|
63
59
|
width: newWidth
|
|
@@ -65,24 +61,20 @@ const useChartDimensions = ({
|
|
|
65
61
|
}, [store, svgRef, params.height, params.width,
|
|
66
62
|
// Margin is an object, so we need to include all the properties to prevent infinite loops.
|
|
67
63
|
params.margin.left, params.margin.right, params.margin.top, params.margin.bottom]);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
propsHeight: params.height,
|
|
83
|
-
propsWidth: params.width
|
|
84
|
-
}
|
|
85
|
-
});
|
|
64
|
+
(0, _useEffectAfterFirstRender.useEffectAfterFirstRender)(() => {
|
|
65
|
+
const width = params.width ?? store.state.dimensions.width;
|
|
66
|
+
const height = params.height ?? store.state.dimensions.height;
|
|
67
|
+
store.set('dimensions', {
|
|
68
|
+
margin: {
|
|
69
|
+
top: params.margin.top,
|
|
70
|
+
right: params.margin.right,
|
|
71
|
+
bottom: params.margin.bottom,
|
|
72
|
+
left: params.margin.left
|
|
73
|
+
},
|
|
74
|
+
width,
|
|
75
|
+
height,
|
|
76
|
+
propsHeight: params.height,
|
|
77
|
+
propsWidth: params.width
|
|
86
78
|
});
|
|
87
79
|
}, [store, params.height, params.width,
|
|
88
80
|
// Margin is an object, so we need to include all the properties to prevent infinite loops.
|
|
@@ -3,31 +3,25 @@ import type { UseChartDimensionsSignature } from "./useChartDimensions.types.js"
|
|
|
3
3
|
import { ChartState } from "../../models/chart.js";
|
|
4
4
|
export declare const selectorChartDimensionsState: ChartRootSelector<UseChartDimensionsSignature>;
|
|
5
5
|
export declare const selectorChartMargin: (state: ChartState<[UseChartDimensionsSignature]>) => import("./useChartDimensions.types.js").ChartMargin;
|
|
6
|
-
export declare const selectorChartDrawingArea:
|
|
6
|
+
export declare const selectorChartDrawingArea: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
7
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
|
-
}, {
|
|
8
|
+
}) => {
|
|
11
9
|
width: number;
|
|
12
10
|
left: number;
|
|
13
11
|
right: number;
|
|
14
12
|
height: number;
|
|
15
13
|
top: number;
|
|
16
14
|
bottom: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const
|
|
15
|
+
};
|
|
16
|
+
export declare const selectorChartSvgWidth: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
19
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
20
|
-
}
|
|
18
|
+
}) => number;
|
|
19
|
+
export declare const selectorChartSvgHeight: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
21
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
height: number | undefined;
|
|
25
|
-
}, any[]>;
|
|
26
|
-
export declare const selectorChartContainerSize: import("reselect").Selector<import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
21
|
+
}) => number;
|
|
22
|
+
export declare const selectorChartPropsWidth: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
27
23
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
28
|
-
}
|
|
24
|
+
}) => number | undefined;
|
|
25
|
+
export declare const selectorChartPropsHeight: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("./useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
29
26
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
30
|
-
}
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
}, []>;
|
|
27
|
+
}) => number | undefined;
|
|
@@ -3,32 +3,38 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.selectorChartSvgWidth = exports.selectorChartSvgHeight = exports.selectorChartPropsWidth = exports.selectorChartPropsHeight = exports.selectorChartMargin = exports.selectorChartDrawingArea = exports.selectorChartDimensionsState = void 0;
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
7
8
|
var _selectors = require("../../utils/selectors");
|
|
8
9
|
var _useChartAxisSize = require("../../featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors");
|
|
9
10
|
const selectorChartDimensionsState = state => state.dimensions;
|
|
10
11
|
exports.selectorChartDimensionsState = selectorChartDimensionsState;
|
|
11
12
|
const selectorChartMargin = state => state.dimensions.margin;
|
|
12
13
|
exports.selectorChartMargin = selectorChartMargin;
|
|
13
|
-
const
|
|
14
|
-
const selectorChartHeight = state => state.dimensions.height;
|
|
15
|
-
const selectorChartTopMargin = state => state.dimensions.margin.top;
|
|
16
|
-
const selectorChartRightMargin = state => state.dimensions.margin.right;
|
|
17
|
-
const selectorChartBottomMargin = state => state.dimensions.margin.bottom;
|
|
18
|
-
const selectorChartLeftMargin = state => state.dimensions.margin.left;
|
|
19
|
-
const selectorChartDrawingArea = exports.selectorChartDrawingArea = (0, _selectors.createSelector)([selectorChartWidth, selectorChartHeight, selectorChartTopMargin, selectorChartRightMargin, selectorChartBottomMargin, selectorChartLeftMargin, _useChartAxisSize.selectorChartTopAxisSize, _useChartAxisSize.selectorChartRightAxisSize, _useChartAxisSize.selectorChartBottomAxisSize, _useChartAxisSize.selectorChartLeftAxisSize], (width, height, marginTop, marginRight, marginBottom, marginLeft, axisSizeTop, axisSizeRight, axisSizeBottom, axisSizeLeft) => ({
|
|
20
|
-
width: width - marginLeft - marginRight - axisSizeLeft - axisSizeRight,
|
|
21
|
-
left: marginLeft + axisSizeLeft,
|
|
22
|
-
right: marginRight + axisSizeRight,
|
|
23
|
-
height: height - marginTop - marginBottom - axisSizeTop - axisSizeBottom,
|
|
24
|
-
top: marginTop + axisSizeTop,
|
|
25
|
-
bottom: marginBottom + axisSizeBottom
|
|
26
|
-
}));
|
|
27
|
-
const selectorChartPropsSize = exports.selectorChartPropsSize = (0, _selectors.createSelector)([selectorChartDimensionsState], dimensionsState => ({
|
|
28
|
-
width: dimensionsState.propsWidth,
|
|
29
|
-
height: dimensionsState.propsHeight
|
|
30
|
-
}));
|
|
31
|
-
const selectorChartContainerSize = exports.selectorChartContainerSize = (0, _selectors.createSelector)([selectorChartWidth, selectorChartHeight], (width, height) => ({
|
|
14
|
+
const selectorChartDrawingArea = exports.selectorChartDrawingArea = (0, _store.createSelectorMemoized)(selectorChartDimensionsState, selectorChartMargin, _useChartAxisSize.selectorChartAxisSizes, function selectorChartDrawingArea({
|
|
32
15
|
width,
|
|
33
16
|
height
|
|
34
|
-
}
|
|
17
|
+
}, {
|
|
18
|
+
top: marginTop,
|
|
19
|
+
right: marginRight,
|
|
20
|
+
bottom: marginBottom,
|
|
21
|
+
left: marginLeft
|
|
22
|
+
}, {
|
|
23
|
+
left: axisSizeLeft,
|
|
24
|
+
right: axisSizeRight,
|
|
25
|
+
top: axisSizeTop,
|
|
26
|
+
bottom: axisSizeBottom
|
|
27
|
+
}) {
|
|
28
|
+
return {
|
|
29
|
+
width: width - marginLeft - marginRight - axisSizeLeft - axisSizeRight,
|
|
30
|
+
left: marginLeft + axisSizeLeft,
|
|
31
|
+
right: marginRight + axisSizeRight,
|
|
32
|
+
height: height - marginTop - marginBottom - axisSizeTop - axisSizeBottom,
|
|
33
|
+
top: marginTop + axisSizeTop,
|
|
34
|
+
bottom: marginBottom + axisSizeBottom
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const selectorChartSvgWidth = exports.selectorChartSvgWidth = (0, _selectors.createSelector)([selectorChartDimensionsState], dimensionsState => dimensionsState.width);
|
|
38
|
+
const selectorChartSvgHeight = exports.selectorChartSvgHeight = (0, _selectors.createSelector)([selectorChartDimensionsState], dimensionsState => dimensionsState.height);
|
|
39
|
+
const selectorChartPropsWidth = exports.selectorChartPropsWidth = (0, _selectors.createSelector)([selectorChartDimensionsState], dimensionsState => dimensionsState.propsWidth);
|
|
40
|
+
const selectorChartPropsHeight = exports.selectorChartPropsHeight = (0, _selectors.createSelector)([selectorChartDimensionsState], dimensionsState => dimensionsState.propsHeight);
|
package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js
CHANGED
|
@@ -6,18 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.useChartExperimentalFeatures = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
9
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
11
10
|
const useChartExperimentalFeatures = ({
|
|
12
11
|
params,
|
|
13
12
|
store
|
|
14
13
|
}) => {
|
|
15
14
|
(0, _useEnhancedEffect.default)(() => {
|
|
16
|
-
store.
|
|
17
|
-
return (0, _extends2.default)({}, prevState, {
|
|
18
|
-
experimentalFeatures: params.experimentalFeatures
|
|
19
|
-
});
|
|
20
|
-
});
|
|
15
|
+
store.set('experimentalFeatures', params.experimentalFeatures);
|
|
21
16
|
}, [store, params.experimentalFeatures]);
|
|
22
17
|
return {};
|
|
23
18
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ChartRootSelector } from "../../utils/selectors.js";
|
|
2
2
|
import type { UseChartExperimentalFeaturesSignature } from "./useChartExperimentalFeature.types.js";
|
|
3
3
|
export declare const selectorChartExperimentalFeaturesState: ChartRootSelector<UseChartExperimentalFeaturesSignature>;
|
|
4
|
-
export declare const selectorPreferStrictDomainInLineCharts:
|
|
4
|
+
export declare const selectorPreferStrictDomainInLineCharts: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("./useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
|
-
}
|
|
7
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}, boolean, any[]>;
|
|
6
|
+
}) => boolean;
|
|
@@ -15,16 +15,12 @@ const useChartId = ({
|
|
|
15
15
|
store
|
|
16
16
|
}) => {
|
|
17
17
|
React.useEffect(() => {
|
|
18
|
-
store.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
chartId: params.id ?? (0, _useChartId.createChartDefaultId)()
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
});
|
|
18
|
+
if (params.id === undefined || params.id === store.state.id.providedChartId && store.state.id.chartId !== undefined) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
store.set('id', (0, _extends2.default)({}, store.state.id, {
|
|
22
|
+
chartId: params.id ?? (0, _useChartId.createChartDefaultId)()
|
|
23
|
+
}));
|
|
28
24
|
}, [store, params.id]);
|
|
29
25
|
return {};
|
|
30
26
|
};
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* @param {ChartState<[UseChartIdSignature]>} state The state of the chart.
|
|
4
4
|
* @returns {string} The id attribute of the chart.
|
|
5
5
|
*/
|
|
6
|
-
export declare const selectorChartId:
|
|
6
|
+
export declare const selectorChartId: (args_0: import("./useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
7
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
10
|
-
}, string | undefined, any[]>;
|
|
8
|
+
}) => string | undefined;
|
package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js
CHANGED
|
@@ -42,12 +42,10 @@ const useChartInteractionListener = ({
|
|
|
42
42
|
new _core.PanGesture({
|
|
43
43
|
name: 'zoomPan',
|
|
44
44
|
threshold: 0,
|
|
45
|
-
maxPointers: 1,
|
|
46
45
|
preventIf: ['zoomTapAndDrag', 'zoomPressAndDrag']
|
|
47
46
|
}), new _core.PinchGesture({
|
|
48
47
|
name: 'zoomPinch',
|
|
49
|
-
threshold: 5
|
|
50
|
-
preventIf: ['pan', 'zoomPan']
|
|
48
|
+
threshold: 5
|
|
51
49
|
}), new _core.TurnWheelGesture({
|
|
52
50
|
name: 'zoomTurnWheel',
|
|
53
51
|
sensitivity: 0.01,
|
|
@@ -31,15 +31,14 @@ const useChartSeries = ({
|
|
|
31
31
|
isFirstRender.current = false;
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
store.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
34
|
+
store.set('series', (0, _extends2.default)({}, store.state.series, {
|
|
35
|
+
processedSeries: (0, _processSeries.preprocessSeries)({
|
|
36
|
+
series,
|
|
37
|
+
colors: typeof colors === 'function' ? colors(theme) : colors,
|
|
38
|
+
seriesConfig,
|
|
39
|
+
dataset
|
|
40
|
+
}),
|
|
41
|
+
dataset
|
|
43
42
|
}));
|
|
44
43
|
}, [colors, dataset, series, theme, seriesConfig, store]);
|
|
45
44
|
return {};
|
|
@@ -73,7 +72,8 @@ useChartSeries.getInitialState = ({
|
|
|
73
72
|
colors: typeof colors === 'function' ? colors(theme) : colors,
|
|
74
73
|
seriesConfig,
|
|
75
74
|
dataset
|
|
76
|
-
})
|
|
75
|
+
}),
|
|
76
|
+
dataset
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { ChartRootSelector } from "../../utils/selectors.js";
|
|
2
2
|
import { UseChartSeriesSignature } from "./useChartSeries.types.js";
|
|
3
3
|
export declare const selectorChartSeriesState: ChartRootSelector<UseChartSeriesSignature>;
|
|
4
|
-
export declare const selectorChartSeriesProcessed:
|
|
4
|
+
export declare const selectorChartSeriesProcessed: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
|
-
}
|
|
6
|
+
}) => import("./useChartSeries.types.js").ProcessedSeries<keyof import("../../../index.js").ChartsSeriesConfig>;
|
|
7
|
+
export declare const selectorChartSeriesConfig: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
7
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
8
|
-
}
|
|
9
|
-
|
|
9
|
+
}) => import("../../models/index.js").ChartSeriesConfig<keyof import("../../../index.js").ChartsSeriesConfig>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the dataset from the series state.
|
|
12
|
+
* @param {ChartState<[UseChartSeriesSignature]>} state The state of the chart.
|
|
13
|
+
* @returns {DatasetType | undefined} The dataset.
|
|
14
|
+
*/
|
|
15
|
+
export declare const selectorChartDataset: (args_0: import("../useChartId/useChartId.types.js").UseChartIdState & import("../useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("./useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../useChartInteractionListener/index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
10
16
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
11
|
-
}
|
|
12
|
-
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
13
|
-
}, import("../../models/index.js").ChartSeriesConfig<keyof import("../../../index.js").ChartsSeriesConfig>, any[]>;
|
|
17
|
+
}) => readonly import("../../../index.js").DatasetElementType<string | number | Date | null | undefined>[] | undefined;
|