@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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarAxisHighlightClasses } from "./radarAxisHighlightClasses.js";
|
|
3
2
|
export interface RadarAxisHighlightProps {
|
|
4
3
|
/**
|
|
@@ -6,7 +5,7 @@ export interface RadarAxisHighlightProps {
|
|
|
6
5
|
*/
|
|
7
6
|
classes?: Partial<RadarAxisHighlightClasses>;
|
|
8
7
|
}
|
|
9
|
-
declare function RadarAxisHighlight(props: RadarAxisHighlightProps):
|
|
8
|
+
declare function RadarAxisHighlight(props: RadarAxisHighlightProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
9
|
declare namespace RadarAxisHighlight {
|
|
11
10
|
var propTypes: any;
|
|
12
11
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
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.RadarAxisHighlight = RadarAxisHighlight;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
10
|
var _styles = require("@mui/material/styles");
|
|
13
11
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
12
|
var _useRadarAxisHighlight = require("./useRadarAxisHighlight");
|
|
15
13
|
var _radarAxisHighlightClasses = require("./radarAxisHighlightClasses");
|
|
14
|
+
var _getSeriesColorFn = require("../../internals/getSeriesColorFn");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
16
|
const useUtilityClasses = classes => {
|
|
18
17
|
const slots = {
|
|
@@ -50,6 +49,7 @@ function RadarAxisHighlight(props) {
|
|
|
50
49
|
points,
|
|
51
50
|
radius,
|
|
52
51
|
highlightedAngle,
|
|
52
|
+
highlightedIndex,
|
|
53
53
|
instance
|
|
54
54
|
} = data;
|
|
55
55
|
const [x, y] = instance.polar2svg(radius, highlightedAngle);
|
|
@@ -63,8 +63,12 @@ function RadarAxisHighlight(props) {
|
|
|
63
63
|
pointerEvents: "none",
|
|
64
64
|
strokeDasharray: "4 4"
|
|
65
65
|
}), points.map((point, seriesIndex) => {
|
|
66
|
+
const colorGetter = (0, _getSeriesColorFn.getSeriesColorFn)(series[seriesIndex]);
|
|
66
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", (0, _extends2.default)({
|
|
67
|
-
fill:
|
|
68
|
+
fill: colorGetter({
|
|
69
|
+
value: point.value,
|
|
70
|
+
dataIndex: highlightedIndex
|
|
71
|
+
}),
|
|
68
72
|
cx: point.x,
|
|
69
73
|
cy: point.y,
|
|
70
74
|
className: classes.dot,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { MakeOptional } from '@mui/x-internals/types';
|
|
3
2
|
import { RadarChartPluginSignatures } from "../RadarChart.plugins.js";
|
|
4
3
|
import { RadarSeriesType } from "../../models/seriesType/radar.js";
|
|
@@ -22,5 +21,5 @@ export type RadarDataProviderProps<TSignatures extends readonly ChartAnyPluginSi
|
|
|
22
21
|
*/
|
|
23
22
|
highlight?: 'axis' | 'series' | 'none';
|
|
24
23
|
};
|
|
25
|
-
declare function RadarDataProvider<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginSignatures>(props: RadarDataProviderProps<TSignatures>):
|
|
24
|
+
declare function RadarDataProvider<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginSignatures>(props: RadarDataProviderProps<TSignatures>): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
export { RadarDataProvider };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarGridRenderProps } from "./RadarGrid.types.js";
|
|
3
2
|
/**
|
|
4
3
|
* @ignore - internal component.
|
|
5
4
|
*/
|
|
6
|
-
export declare function CircularRadarGrid(props: RadarGridRenderProps):
|
|
5
|
+
export declare function CircularRadarGrid(props: RadarGridRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarGridStripeRenderProps } from "./RadarGrid.types.js";
|
|
3
2
|
/**
|
|
4
3
|
* @ignore - internal component.
|
|
5
4
|
*/
|
|
6
|
-
export declare function CircularRadarStripes(props: RadarGridStripeRenderProps):
|
|
5
|
+
export declare function CircularRadarStripes(props: RadarGridStripeRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarGridProps } from "./RadarGrid.types.js";
|
|
3
|
-
declare function RadarGrid(props: RadarGridProps):
|
|
2
|
+
declare function RadarGrid(props: RadarGridProps): import("react/jsx-runtime").JSX.Element | null;
|
|
4
3
|
declare namespace RadarGrid {
|
|
5
4
|
var propTypes: any;
|
|
6
5
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarGridRenderProps } from "./RadarGrid.types.js";
|
|
3
2
|
/**
|
|
4
3
|
* @ignore - internal component.
|
|
5
4
|
*/
|
|
6
|
-
export declare function SharpRadarGrid(props: RadarGridRenderProps):
|
|
5
|
+
export declare function SharpRadarGrid(props: RadarGridRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarGridStripeRenderProps } from "./RadarGrid.types.js";
|
|
3
2
|
/**
|
|
4
3
|
* @ignore - internal component.
|
|
5
4
|
*/
|
|
6
|
-
export declare function SharpRadarStripes(props: RadarGridStripeRenderProps):
|
|
5
|
+
export declare function SharpRadarStripes(props: RadarGridStripeRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ interface GetPathPropsParams {
|
|
|
16
16
|
color: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function getPathProps(params: GetPathPropsParams): React.SVGProps<SVGPathElement>;
|
|
19
|
-
declare function RadarSeriesArea(props: RadarSeriesAreaProps):
|
|
19
|
+
declare function RadarSeriesArea(props: RadarSeriesAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
declare namespace RadarSeriesArea {
|
|
21
21
|
var propTypes: any;
|
|
22
22
|
}
|
|
@@ -16,7 +16,7 @@ interface GetCirclePropsParams {
|
|
|
16
16
|
color: string;
|
|
17
17
|
}
|
|
18
18
|
export declare function getCircleProps(params: GetCirclePropsParams): React.SVGProps<SVGCircleElement>;
|
|
19
|
-
declare function RadarSeriesMarks(props: RadarSeriesMarksProps):
|
|
19
|
+
declare function RadarSeriesMarks(props: RadarSeriesMarksProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
declare namespace RadarSeriesMarks {
|
|
21
21
|
var propTypes: any;
|
|
22
22
|
}
|
|
@@ -58,7 +58,6 @@ function RadarSeriesMarks(props) {
|
|
|
58
58
|
children: seriesCoordinates?.map(({
|
|
59
59
|
seriesId: id,
|
|
60
60
|
points,
|
|
61
|
-
color,
|
|
62
61
|
hideMark,
|
|
63
62
|
fillArea
|
|
64
63
|
}) => {
|
|
@@ -69,7 +68,7 @@ function RadarSeriesMarks(props) {
|
|
|
69
68
|
children: points.map((point, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", (0, _extends2.default)({}, getCircleProps({
|
|
70
69
|
seriesId: id,
|
|
71
70
|
point,
|
|
72
|
-
color,
|
|
71
|
+
color: point.color,
|
|
73
72
|
fillArea,
|
|
74
73
|
isFaded,
|
|
75
74
|
isHighlighted,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { RadarSeriesPlotProps } from "./RadarSeriesPlot.types.js";
|
|
3
|
-
declare function RadarSeriesPlot(props: RadarSeriesPlotProps):
|
|
2
|
+
declare function RadarSeriesPlot(props: RadarSeriesPlotProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
declare namespace RadarSeriesPlot {
|
|
5
4
|
var propTypes: any;
|
|
6
5
|
}
|
|
@@ -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.RadarSeriesPlot = RadarSeriesPlot;
|
|
9
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
10
|
var _useRadarSeriesData = require("./useRadarSeriesData");
|
|
13
11
|
var _useInteractionItemProps = require("../../hooks/useInteractionItemProps");
|
|
@@ -60,7 +58,7 @@ function RadarSeriesPlot(props) {
|
|
|
60
58
|
}, interactionProps[seriesIndex]), seriesId), !hideMark && points.map((point, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", (0, _extends2.default)({}, (0, _RadarSeriesMarks.getCircleProps)({
|
|
61
59
|
seriesId,
|
|
62
60
|
point,
|
|
63
|
-
color,
|
|
61
|
+
color: point.color,
|
|
64
62
|
fillArea,
|
|
65
63
|
isFaded,
|
|
66
64
|
isHighlighted,
|
|
@@ -14,11 +14,14 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
|
|
|
14
14
|
isItemHighlighted: boolean;
|
|
15
15
|
isItemFaded: boolean;
|
|
16
16
|
dataIndex: number;
|
|
17
|
+
value: number;
|
|
18
|
+
color: string;
|
|
17
19
|
}[];
|
|
18
20
|
type: "radar";
|
|
19
21
|
label?: string | ((location: "tooltip" | "legend") => string) | undefined;
|
|
20
22
|
labelMarkType?: import("../../internals/index.js").ChartsLabelMarkType | undefined;
|
|
21
23
|
highlightScope?: import("../../index.js").HighlightScope | undefined;
|
|
24
|
+
colorGetter?: ((data: import("../../internals/index.js").ColorCallbackValue<number>) => string) | undefined;
|
|
22
25
|
hideMark?: boolean | undefined;
|
|
23
26
|
fillArea?: boolean | undefined;
|
|
24
27
|
data: number[];
|
|
@@ -11,6 +11,7 @@ var _useRadarSeries = require("../../hooks/useRadarSeries");
|
|
|
11
11
|
var _useAxis = require("../../hooks/useAxis");
|
|
12
12
|
var _useItemHighlightedGetter = require("../../hooks/useItemHighlightedGetter");
|
|
13
13
|
var _useChartContext = require("../../context/ChartProvider/useChartContext");
|
|
14
|
+
var _getSeriesColorFn = require("../../internals/getSeriesColorFn");
|
|
14
15
|
/**
|
|
15
16
|
* This hook provides all the data needed to display radar series.
|
|
16
17
|
* @param querySeriesId The id of the series to display
|
|
@@ -39,6 +40,7 @@ function useRadarSeriesData(querySeriesId) {
|
|
|
39
40
|
const isSeriesFaded = !isSeriesHighlighted && isItemFaded({
|
|
40
41
|
seriesId
|
|
41
42
|
});
|
|
43
|
+
const getColor = (0, _getSeriesColorFn.getSeriesColorFn)(series);
|
|
42
44
|
return (0, _extends2.default)({}, series, {
|
|
43
45
|
seriesId: series.id,
|
|
44
46
|
isSeriesHighlighted,
|
|
@@ -60,7 +62,12 @@ function useRadarSeriesData(querySeriesId) {
|
|
|
60
62
|
y,
|
|
61
63
|
isItemHighlighted: highlighted,
|
|
62
64
|
isItemFaded: faded,
|
|
63
|
-
dataIndex
|
|
65
|
+
dataIndex,
|
|
66
|
+
value,
|
|
67
|
+
color: getColor({
|
|
68
|
+
value,
|
|
69
|
+
dataIndex
|
|
70
|
+
})
|
|
64
71
|
};
|
|
65
72
|
})
|
|
66
73
|
});
|
|
@@ -4,7 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _getSeriesColorFn = require("../../internals/getSeriesColorFn");
|
|
7
8
|
const getColor = series => {
|
|
8
|
-
|
|
9
|
+
const getSeriesColor = (0, _getSeriesColorFn.getSeriesColorFn)(series);
|
|
10
|
+
return dataIndex => {
|
|
11
|
+
if (dataIndex === undefined) {
|
|
12
|
+
return series.color;
|
|
13
|
+
}
|
|
14
|
+
const value = series.data[dataIndex];
|
|
15
|
+
return getSeriesColor({
|
|
16
|
+
value,
|
|
17
|
+
dataIndex
|
|
18
|
+
});
|
|
19
|
+
};
|
|
9
20
|
};
|
|
10
21
|
var _default = exports.default = getColor;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { DefaultizedScatterSeriesType } from "../models/seriesType/scatter.js";
|
|
3
2
|
import { D3Scale } from "../models/axis.js";
|
|
4
3
|
import { ScatterClasses } from "./scatterClasses.js";
|
|
@@ -29,4 +28,4 @@ export interface BatchScatterPathsProps {
|
|
|
29
28
|
*
|
|
30
29
|
* You can read about all the limitations [here](https://mui.com/x/react-charts/scatter/#performance).
|
|
31
30
|
*/
|
|
32
|
-
export declare function BatchScatter(props: BatchScatterProps):
|
|
31
|
+
export declare function BatchScatter(props: BatchScatterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -125,10 +125,10 @@ function BatchScatter(props) {
|
|
|
125
125
|
const {
|
|
126
126
|
store
|
|
127
127
|
} = (0, _ChartProvider.useChartContext)();
|
|
128
|
-
const isSeriesHighlighted = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartIsSeriesHighlighted,
|
|
129
|
-
const isSeriesFaded = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartIsSeriesFaded,
|
|
130
|
-
const seriesHighlightedItem = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartSeriesHighlightedItem,
|
|
131
|
-
const seriesUnfadedItem = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartSeriesUnfadedItem,
|
|
128
|
+
const isSeriesHighlighted = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartIsSeriesHighlighted, series.id);
|
|
129
|
+
const isSeriesFaded = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartIsSeriesFaded, series.id);
|
|
130
|
+
const seriesHighlightedItem = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartSeriesHighlightedItem, series.id);
|
|
131
|
+
const seriesUnfadedItem = (0, _useSelector.useSelector)(store, _useChartHighlight.selectorChartSeriesUnfadedItem, series.id);
|
|
132
132
|
const highlightedModifier = 1.2;
|
|
133
133
|
const markerSize = series.markerSize * (isSeriesHighlighted ? highlightedModifier : 1);
|
|
134
134
|
const classes = (0, _scatterClasses.useUtilityClasses)(inClasses);
|
|
@@ -9,7 +9,12 @@ export interface ScatterProps {
|
|
|
9
9
|
xScale: D3Scale;
|
|
10
10
|
yScale: D3Scale;
|
|
11
11
|
color: string;
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Function to get the color of a scatter item given its data index.
|
|
14
|
+
* The data index argument is optional. If not provided, the color for the entire series is returned.
|
|
15
|
+
* If provided, the color for the specific scatter item is returned.
|
|
16
|
+
*/
|
|
17
|
+
colorGetter: ColorGetter<'scatter'>;
|
|
13
18
|
/**
|
|
14
19
|
* Callback fired when clicking on a scatter item.
|
|
15
20
|
* @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
|
|
@@ -32,7 +37,7 @@ export interface ScatterSlotProps extends ScatterMarkerSlotProps {}
|
|
|
32
37
|
*
|
|
33
38
|
* - [Scatter API](https://mui.com/x/api/charts/scatter/)
|
|
34
39
|
*/
|
|
35
|
-
declare function Scatter(props: ScatterProps):
|
|
40
|
+
declare function Scatter(props: ScatterProps): import("react/jsx-runtime").JSX.Element;
|
|
36
41
|
declare namespace Scatter {
|
|
37
42
|
var propTypes: any;
|
|
38
43
|
}
|
package/ScatterChart/Scatter.js
CHANGED
|
@@ -39,7 +39,6 @@ function Scatter(props) {
|
|
|
39
39
|
series,
|
|
40
40
|
xScale,
|
|
41
41
|
yScale,
|
|
42
|
-
color,
|
|
43
42
|
colorGetter,
|
|
44
43
|
onItemClick,
|
|
45
44
|
classes: inClasses,
|
|
@@ -83,7 +82,7 @@ function Scatter(props) {
|
|
|
83
82
|
});
|
|
84
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Marker, (0, _extends2.default)({
|
|
85
84
|
dataIndex: dataPoint.dataIndex,
|
|
86
|
-
color: colorGetter
|
|
85
|
+
color: colorGetter(dataPoint.dataIndex),
|
|
87
86
|
isHighlighted: isItemHighlighted,
|
|
88
87
|
isFaded: isItemFaded,
|
|
89
88
|
x: dataPoint.x,
|
|
@@ -107,7 +106,12 @@ process.env.NODE_ENV !== "production" ? Scatter.propTypes = {
|
|
|
107
106
|
// ----------------------------------------------------------------------
|
|
108
107
|
classes: _propTypes.default.object,
|
|
109
108
|
color: _propTypes.default.string.isRequired,
|
|
110
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Function to get the color of a scatter item given its data index.
|
|
111
|
+
* The data index argument is optional. If not provided, the color for the entire series is returned.
|
|
112
|
+
* If provided, the color for the specific scatter item is returned.
|
|
113
|
+
*/
|
|
114
|
+
colorGetter: _propTypes.default.func.isRequired,
|
|
111
115
|
/**
|
|
112
116
|
* Callback fired when clicking on a scatter item.
|
|
113
117
|
* @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
|
|
@@ -39,7 +39,7 @@ export interface ScatterMarkerProps {
|
|
|
39
39
|
*/
|
|
40
40
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
41
41
|
}
|
|
42
|
-
declare function ScatterMarker(props: ScatterMarkerProps):
|
|
42
|
+
declare function ScatterMarker(props: ScatterMarkerProps): import("react/jsx-runtime").JSX.Element;
|
|
43
43
|
declare namespace ScatterMarker {
|
|
44
44
|
var propTypes: any;
|
|
45
45
|
}
|
|
@@ -38,7 +38,7 @@ export interface ScatterPlotProps extends Pick<ScatterProps, 'onItemClick'> {
|
|
|
38
38
|
*
|
|
39
39
|
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
40
40
|
*/
|
|
41
|
-
declare function ScatterPlot(props: ScatterPlotProps):
|
|
41
|
+
declare function ScatterPlot(props: ScatterPlotProps): import("react/jsx-runtime").JSX.Element | null;
|
|
42
42
|
declare namespace ScatterPlot {
|
|
43
43
|
var propTypes: any;
|
|
44
44
|
}
|
|
@@ -68,7 +68,7 @@ function ScatterPlot(props) {
|
|
|
68
68
|
zAxisId,
|
|
69
69
|
color
|
|
70
70
|
} = series[seriesId];
|
|
71
|
-
const colorGetter = _seriesConfig.
|
|
71
|
+
const colorGetter = _seriesConfig.scatterSeriesConfig.colorProcessor(series[seriesId], xAxis[xAxisId ?? defaultXAxisId], yAxis[yAxisId ?? defaultYAxisId], zAxis[zAxisId ?? defaultZAxisId]);
|
|
72
72
|
const xScale = xAxis[xAxisId ?? defaultXAxisId].scale;
|
|
73
73
|
const yScale = yAxis[yAxisId ?? defaultYAxisId].scale;
|
|
74
74
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScatterItems, (0, _extends2.default)({
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _getSeriesColorFn = require("../../internals/getSeriesColorFn");
|
|
7
8
|
const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
8
9
|
const zColorScale = zAxis?.colorScale;
|
|
9
10
|
const yColorScale = yAxis?.colorScale;
|
|
10
11
|
const xColorScale = xAxis?.colorScale;
|
|
12
|
+
const getSeriesColor = (0, _getSeriesColorFn.getSeriesColorFn)(series);
|
|
11
13
|
if (zColorScale) {
|
|
12
14
|
return dataIndex => {
|
|
13
15
|
if (dataIndex === undefined) {
|
|
@@ -20,9 +22,15 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
20
22
|
}
|
|
21
23
|
}
|
|
22
24
|
const value = series.data[dataIndex];
|
|
23
|
-
const color = value === null ?
|
|
25
|
+
const color = value === null ? getSeriesColor({
|
|
26
|
+
value,
|
|
27
|
+
dataIndex
|
|
28
|
+
}) : zColorScale(value.z);
|
|
24
29
|
if (color === null) {
|
|
25
|
-
return
|
|
30
|
+
return getSeriesColor({
|
|
31
|
+
value,
|
|
32
|
+
dataIndex
|
|
33
|
+
});
|
|
26
34
|
}
|
|
27
35
|
return color;
|
|
28
36
|
};
|
|
@@ -33,9 +41,15 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
33
41
|
return series.color;
|
|
34
42
|
}
|
|
35
43
|
const value = series.data[dataIndex];
|
|
36
|
-
const color = value === null ?
|
|
44
|
+
const color = value === null ? getSeriesColor({
|
|
45
|
+
value,
|
|
46
|
+
dataIndex
|
|
47
|
+
}) : yColorScale(value.y);
|
|
37
48
|
if (color === null) {
|
|
38
|
-
return
|
|
49
|
+
return getSeriesColor({
|
|
50
|
+
value,
|
|
51
|
+
dataIndex
|
|
52
|
+
});
|
|
39
53
|
}
|
|
40
54
|
return color;
|
|
41
55
|
};
|
|
@@ -46,13 +60,28 @@ const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
|
46
60
|
return series.color;
|
|
47
61
|
}
|
|
48
62
|
const value = series.data[dataIndex];
|
|
49
|
-
const color = value === null ?
|
|
63
|
+
const color = value === null ? getSeriesColor({
|
|
64
|
+
value,
|
|
65
|
+
dataIndex
|
|
66
|
+
}) : xColorScale(value.x);
|
|
50
67
|
if (color === null) {
|
|
51
|
-
return
|
|
68
|
+
return getSeriesColor({
|
|
69
|
+
value,
|
|
70
|
+
dataIndex
|
|
71
|
+
});
|
|
52
72
|
}
|
|
53
73
|
return color;
|
|
54
74
|
};
|
|
55
75
|
}
|
|
56
|
-
return
|
|
76
|
+
return dataIndex => {
|
|
77
|
+
if (dataIndex === undefined) {
|
|
78
|
+
return series.color;
|
|
79
|
+
}
|
|
80
|
+
const value = series.data[dataIndex];
|
|
81
|
+
return getSeriesColor({
|
|
82
|
+
value,
|
|
83
|
+
dataIndex
|
|
84
|
+
});
|
|
85
|
+
};
|
|
57
86
|
};
|
|
58
87
|
var _default = exports.default = getColor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChartSeriesTypeConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const scatterSeriesConfig: ChartSeriesTypeConfig<'scatter'>;
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.scatterSeriesConfig = void 0;
|
|
8
8
|
var _extremums = require("./extremums");
|
|
9
9
|
var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
|
|
10
10
|
var _getColor = _interopRequireDefault(require("./getColor"));
|
|
@@ -12,7 +12,7 @@ var _legend = _interopRequireDefault(require("./legend"));
|
|
|
12
12
|
var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
13
13
|
var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
|
|
14
14
|
var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
|
|
15
|
-
const
|
|
15
|
+
const scatterSeriesConfig = exports.scatterSeriesConfig = {
|
|
16
16
|
seriesProcessor: _seriesProcessor.default,
|
|
17
17
|
colorProcessor: _getColor.default,
|
|
18
18
|
legendGetter: _legend.default,
|
|
@@ -4,5 +4,5 @@ import { ChartAnyPluginSignature } from "../../internals/plugins/models/index.js
|
|
|
4
4
|
import { ChartSeriesConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
5
5
|
import { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
6
6
|
export declare const defaultSeriesConfig: ChartSeriesConfig<'bar' | 'scatter' | 'line' | 'pie'>;
|
|
7
|
-
declare function ChartProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]>(props: React.PropsWithChildren<ChartProviderProps<TSeriesType, TSignatures>>):
|
|
7
|
+
declare function ChartProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]>(props: React.PropsWithChildren<ChartProviderProps<TSeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export { ChartProvider };
|
|
@@ -20,10 +20,10 @@ var _seriesConfig3 = require("../../LineChart/seriesConfig");
|
|
|
20
20
|
var _seriesConfig4 = require("../../PieChart/seriesConfig");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const defaultSeriesConfig = exports.defaultSeriesConfig = {
|
|
23
|
-
bar: _seriesConfig.
|
|
24
|
-
scatter: _seriesConfig2.
|
|
25
|
-
line: _seriesConfig3.
|
|
26
|
-
pie: _seriesConfig4.
|
|
23
|
+
bar: _seriesConfig.barSeriesConfig,
|
|
24
|
+
scatter: _seriesConfig2.scatterSeriesConfig,
|
|
25
|
+
line: _seriesConfig3.lineSeriesConfig,
|
|
26
|
+
pie: _seriesConfig4.pieSeriesConfig
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
// For consistency with the v7, the cartesian axes are set by default.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
2
|
+
import { Store } from '@mui/x-internals/store';
|
|
3
|
+
import type { ChartAnyPluginSignature, ChartInstance, ChartPublicAPI, ChartState, ConvertSignaturesIntoPlugins, MergeSignaturesProperty } from "../../internals/plugins/models/index.js";
|
|
4
4
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
5
5
|
import type { ChartSeriesConfig } from "../../internals/plugins/models/seriesConfig/index.js";
|
|
6
6
|
import type { UseChartBaseProps } from "../../internals/store/useCharts.types.js";
|
|
@@ -17,7 +17,7 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
|
|
|
17
17
|
/**
|
|
18
18
|
* The internal state of the chart.
|
|
19
19
|
*/
|
|
20
|
-
store:
|
|
20
|
+
store: Store<ChartState<TSignatures, TOptionalSignatures>>;
|
|
21
21
|
/**
|
|
22
22
|
* The ref to the <svg />.
|
|
23
23
|
*/
|
|
@@ -16,5 +16,5 @@ interface ChartsSlotsProviderProps {
|
|
|
16
16
|
slotProps?: Partial<ChartsSlotProps>;
|
|
17
17
|
defaultSlots: ChartsSlots;
|
|
18
18
|
}
|
|
19
|
-
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>):
|
|
19
|
+
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -39,4 +39,4 @@ export interface BarProps extends Omit<React.SVGProps<SVGRectElement>, 'id' | 'c
|
|
|
39
39
|
*/
|
|
40
40
|
skipAnimation: boolean;
|
|
41
41
|
}
|
|
42
|
-
export declare function AnimatedBarElement(props: BarProps):
|
|
42
|
+
export declare function AnimatedBarElement(props: BarProps): import("react/jsx-runtime").JSX.Element;
|
package/esm/BarChart/BarChart.js
CHANGED
|
@@ -83,6 +83,7 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
|
|
|
83
83
|
y: PropTypes.oneOf(['band', 'line', 'none'])
|
|
84
84
|
}),
|
|
85
85
|
/**
|
|
86
|
+
* @deprecated Use `barLabel` in the chart series instead.
|
|
86
87
|
* If provided, the function will be used to format the label of the bar.
|
|
87
88
|
* It can be set to 'value' to display the current value.
|
|
88
89
|
* @param {BarItem} item The item to format.
|
|
@@ -33,5 +33,5 @@ export interface BarClipPathProps {
|
|
|
33
33
|
/**
|
|
34
34
|
* @ignore - internal component.
|
|
35
35
|
*/
|
|
36
|
-
declare function BarClipPath(props: BarClipPathProps):
|
|
36
|
+
declare function BarClipPath(props: BarClipPathProps): import("react/jsx-runtime").JSX.Element | null;
|
|
37
37
|
export { BarClipPath };
|
|
@@ -32,7 +32,7 @@ export type BarElementProps = Omit<BarElementOwnerState, 'isFaded' | 'isHighligh
|
|
|
32
32
|
layout: 'horizontal' | 'vertical';
|
|
33
33
|
skipAnimation: boolean;
|
|
34
34
|
};
|
|
35
|
-
declare function BarElement(props: BarElementProps):
|
|
35
|
+
declare function BarElement(props: BarElementProps): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
declare namespace BarElement {
|
|
37
37
|
var propTypes: any;
|
|
38
38
|
}
|
|
@@ -32,23 +32,21 @@ function BarElement(props) {
|
|
|
32
32
|
height
|
|
33
33
|
} = props,
|
|
34
34
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
35
|
-
const
|
|
35
|
+
const itemIdentifier = React.useMemo(() => ({
|
|
36
36
|
type: 'bar',
|
|
37
37
|
seriesId: id,
|
|
38
38
|
dataIndex
|
|
39
|
-
});
|
|
39
|
+
}), [id, dataIndex]);
|
|
40
|
+
const interactionProps = useInteractionItemProps(itemIdentifier);
|
|
40
41
|
const {
|
|
41
42
|
isFaded,
|
|
42
43
|
isHighlighted
|
|
43
|
-
} = useItemHighlighted(
|
|
44
|
-
|
|
45
|
-
dataIndex
|
|
46
|
-
});
|
|
47
|
-
const isFocused = useIsItemFocused({
|
|
44
|
+
} = useItemHighlighted(itemIdentifier);
|
|
45
|
+
const isFocused = useIsItemFocused(React.useMemo(() => ({
|
|
48
46
|
seriesType: 'bar',
|
|
49
47
|
seriesId: id,
|
|
50
48
|
dataIndex
|
|
51
|
-
});
|
|
49
|
+
}), [id, dataIndex]));
|
|
52
50
|
const ownerState = {
|
|
53
51
|
id,
|
|
54
52
|
dataIndex,
|
|
@@ -26,6 +26,12 @@ export type BarLabelProps = Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id' |
|
|
|
26
26
|
* Height of the bar this label belongs to.
|
|
27
27
|
*/
|
|
28
28
|
height: number;
|
|
29
|
+
/**
|
|
30
|
+
* The placement of the bar label.
|
|
31
|
+
* It controls whether the label is rendered in the center or outside the bar.
|
|
32
|
+
* @default 'center'
|
|
33
|
+
*/
|
|
34
|
+
placement?: 'center' | 'outside';
|
|
29
35
|
};
|
|
30
36
|
declare function BarLabel(inProps: BarLabelProps): React.JSX.Element;
|
|
31
37
|
declare namespace BarLabel {
|