@mui/x-charts 9.0.0-alpha.2 → 9.0.0-alpha.3
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.mts +1 -1
- package/BarChart/AnimatedBarElement.d.ts +1 -1
- package/BarChart/BarChart.js +5 -2
- package/BarChart/BarChart.mjs +5 -2
- package/BarChart/BarElement.d.mts +1 -1
- package/BarChart/BarElement.d.ts +1 -1
- package/BarChart/BarElement.js +8 -7
- package/BarChart/BarElement.mjs +8 -7
- package/BarChart/BarLabel/BarLabel.js +4 -0
- package/BarChart/BarLabel/BarLabel.mjs +4 -0
- package/BarChart/BarLabel/BarLabel.types.d.mts +2 -2
- package/BarChart/BarLabel/BarLabel.types.d.ts +2 -2
- package/BarChart/BarLabel/BarLabelItem.js +8 -7
- package/BarChart/BarLabel/BarLabelItem.mjs +8 -7
- package/BarChart/BarLabel/barLabelClasses.d.mts +15 -0
- package/BarChart/BarLabel/barLabelClasses.d.ts +15 -0
- package/BarChart/BarLabel/barLabelClasses.js +19 -0
- package/BarChart/BarLabel/barLabelClasses.mjs +20 -0
- package/BarChart/BarPlot.js +1 -2
- package/BarChart/BarPlot.mjs +2 -3
- package/BarChart/barClasses.d.mts +21 -1
- package/BarChart/barClasses.d.ts +21 -1
- package/BarChart/barClasses.js +9 -3
- package/BarChart/barClasses.mjs +9 -3
- package/BarChart/barElementClasses.d.mts +17 -10
- package/BarChart/barElementClasses.d.ts +17 -10
- package/BarChart/barElementClasses.js +19 -0
- package/BarChart/barElementClasses.mjs +20 -0
- package/BarChart/index.d.mts +1 -1
- package/BarChart/index.d.ts +1 -1
- package/BarChart/index.js +1 -8
- package/BarChart/index.mjs +1 -1
- package/CHANGELOG.md +123 -1
- package/ChartContainer/ChartContainer.d.mts +1 -1
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/useChartContainerProps.d.mts +2 -2
- package/ChartContainer/useChartContainerProps.d.ts +2 -2
- package/ChartDataProvider/ChartDataProvider.d.mts +1 -1
- package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
- package/ChartDataProvider/useChartDataProviderProps.d.mts +2 -2
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartsContainer/ChartsContainer.d.mts +1 -1
- package/ChartsContainer/ChartsContainer.d.ts +1 -1
- package/ChartsContainer/ChartsContainer.js +5 -2
- package/ChartsContainer/ChartsContainer.mjs +5 -2
- package/ChartsContainer/useChartsContainerProps.d.mts +3 -3
- package/ChartsContainer/useChartsContainerProps.d.ts +3 -3
- package/ChartsContainer/useChartsContainerProps.js +3 -3
- package/ChartsContainer/useChartsContainerProps.mjs +3 -3
- package/ChartsDataProvider/ChartsDataProvider.d.mts +2 -2
- package/ChartsDataProvider/ChartsDataProvider.d.ts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.mts +2 -2
- package/ChartsDataProvider/useChartsDataProviderProps.d.ts +2 -2
- package/ChartsLabel/ChartsLabelMark.d.mts +8 -1
- package/ChartsLabel/ChartsLabelMark.d.ts +8 -1
- package/ChartsLabel/ChartsLabelMark.js +29 -3
- package/ChartsLabel/ChartsLabelMark.mjs +29 -3
- package/ChartsLabel/labelMarkClasses.d.mts +2 -0
- package/ChartsLabel/labelMarkClasses.d.ts +2 -0
- package/ChartsLabel/labelMarkClasses.js +1 -1
- package/ChartsLabel/labelMarkClasses.mjs +1 -1
- package/ChartsLegend/ChartsLegend.js +4 -2
- package/ChartsLegend/ChartsLegend.mjs +4 -2
- package/ChartsLegend/legendContext.types.d.mts +1 -0
- package/ChartsLegend/legendContext.types.d.ts +1 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +3 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.mjs +3 -1
- package/ChartsTooltip/ChartsItemTooltipContent.js +6 -2
- package/ChartsTooltip/ChartsItemTooltipContent.mjs +6 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +7 -5
- package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -4
- package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
- package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
- package/ChartsTooltip/useAxesTooltip.d.mts +1 -0
- package/ChartsTooltip/useAxesTooltip.d.ts +1 -0
- package/ChartsTooltip/useAxesTooltip.js +6 -4
- package/ChartsTooltip/useAxesTooltip.mjs +6 -4
- package/ChartsTooltip/useItemTooltip.d.mts +5 -3
- package/ChartsTooltip/useItemTooltip.d.ts +5 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsXAxis/useAxisTicksProps.d.ts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.mts +286 -286
- package/ChartsYAxis/useAxisTicksProps.d.ts +286 -286
- package/LineChart/AreaElement.d.mts +12 -0
- package/LineChart/AreaElement.d.ts +12 -0
- package/LineChart/AreaElement.js +28 -9
- package/LineChart/AreaElement.mjs +30 -9
- package/LineChart/AreaPlot.js +10 -4
- package/LineChart/AreaPlot.mjs +11 -5
- package/LineChart/CircleMarkElement.js +9 -2
- package/LineChart/CircleMarkElement.mjs +10 -3
- package/LineChart/LineChart.js +5 -2
- package/LineChart/LineChart.mjs +5 -2
- package/LineChart/LineElement.d.mts +12 -0
- package/LineChart/LineElement.d.ts +12 -0
- package/LineChart/LineElement.js +28 -9
- package/LineChart/LineElement.mjs +30 -9
- package/LineChart/LineHighlightElement.d.mts +12 -0
- package/LineChart/LineHighlightElement.d.ts +12 -0
- package/LineChart/LineHighlightElement.js +22 -3
- package/LineChart/LineHighlightElement.mjs +24 -3
- package/LineChart/LinePlot.js +11 -5
- package/LineChart/LinePlot.mjs +12 -6
- package/LineChart/MarkElement.js +9 -2
- package/LineChart/MarkElement.mjs +10 -3
- package/LineChart/MarkPlot.js +19 -9
- package/LineChart/MarkPlot.mjs +20 -10
- package/LineChart/index.d.mts +3 -1
- package/LineChart/index.d.ts +3 -1
- package/LineChart/index.js +10 -2
- package/LineChart/index.mjs +2 -1
- package/LineChart/lineClasses.d.mts +34 -0
- package/LineChart/lineClasses.d.ts +34 -0
- package/LineChart/lineClasses.js +32 -0
- package/LineChart/lineClasses.mjs +23 -0
- package/LineChart/markElementClasses.d.mts +17 -8
- package/LineChart/markElementClasses.d.ts +17 -8
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/markElementClasses.mjs +20 -0
- package/LineChart/seriesConfig/legend.js +1 -0
- package/LineChart/seriesConfig/legend.mjs +1 -0
- package/LineChart/seriesConfig/seriesProcessor.js +1 -1
- package/LineChart/seriesConfig/seriesProcessor.mjs +1 -1
- package/LineChart/seriesConfig/tooltip.js +2 -1
- package/LineChart/seriesConfig/tooltip.mjs +2 -1
- package/PieChart/FocusedPieArc.js +8 -6
- package/PieChart/FocusedPieArc.mjs +8 -6
- package/PieChart/PieArc.d.mts +14 -11
- package/PieChart/PieArc.d.ts +14 -11
- package/PieChart/PieArc.js +22 -4
- package/PieChart/PieArc.mjs +24 -4
- package/PieChart/PieArcLabel.d.mts +16 -2
- package/PieChart/PieArcLabel.d.ts +16 -2
- package/PieChart/PieArcLabel.js +26 -5
- package/PieChart/PieArcLabel.mjs +28 -5
- package/PieChart/PieArcLabelPlot.js +6 -1
- package/PieChart/PieArcLabelPlot.mjs +6 -1
- package/PieChart/PieArcPlot.js +6 -1
- package/PieChart/PieArcPlot.mjs +6 -1
- package/PieChart/PieChart.js +5 -2
- package/PieChart/PieChart.mjs +5 -2
- package/PieChart/PiePlot.d.mts +1 -0
- package/PieChart/PiePlot.d.ts +1 -0
- package/PieChart/PiePlot.js +4 -1
- package/PieChart/PiePlot.mjs +4 -1
- package/PieChart/dataTransform/useTransformData.js +6 -8
- package/PieChart/dataTransform/useTransformData.mjs +6 -8
- package/PieChart/pieClasses.d.mts +22 -1
- package/PieChart/pieClasses.d.ts +22 -1
- package/PieChart/pieClasses.js +10 -3
- package/PieChart/pieClasses.mjs +10 -3
- package/RadarChart/RadarChart.js +5 -2
- package/RadarChart/RadarChart.mjs +5 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +3 -3
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -2
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +7 -14
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +4 -9
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -9
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -16
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +8 -16
- package/RadarChart/seriesConfig/tooltip.js +13 -8
- package/RadarChart/seriesConfig/tooltip.mjs +13 -8
- package/RadarChart/useRadarChartProps.js +3 -3
- package/RadarChart/useRadarChartProps.mjs +3 -3
- package/ScatterChart/BatchScatter.d.mts +2 -1
- package/ScatterChart/BatchScatter.d.ts +2 -1
- package/ScatterChart/BatchScatter.js +5 -3
- package/ScatterChart/BatchScatter.mjs +4 -3
- package/ScatterChart/FocusedScatterMark.d.mts +4 -1
- package/ScatterChart/FocusedScatterMark.d.ts +4 -1
- package/ScatterChart/FocusedScatterMark.js +12 -2
- package/ScatterChart/FocusedScatterMark.mjs +11 -1
- package/ScatterChart/Scatter.d.mts +1 -1
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/Scatter.js +11 -9
- package/ScatterChart/Scatter.mjs +11 -9
- package/ScatterChart/ScatterChart.js +5 -2
- package/ScatterChart/ScatterChart.mjs +5 -2
- package/ScatterChart/ScatterPlot.d.mts +2 -1
- package/ScatterChart/ScatterPlot.d.ts +2 -1
- package/ScatterChart/ScatterPlot.js +16 -2
- package/ScatterChart/ScatterPlot.mjs +16 -2
- package/ScatterChart/index.d.mts +2 -2
- package/ScatterChart/index.d.ts +2 -2
- package/ScatterChart/scatterClasses.d.mts +14 -2
- package/ScatterChart/scatterClasses.d.ts +14 -2
- package/ScatterChart/scatterClasses.js +9 -3
- package/ScatterChart/scatterClasses.mjs +9 -3
- package/SparkLineChart/SparkLineChart.js +5 -2
- package/SparkLineChart/SparkLineChart.mjs +5 -2
- package/context/ChartApi.d.mts +1 -1
- package/context/ChartApi.d.ts +1 -1
- package/context/ChartProvider/ChartProvider.types.d.mts +2 -2
- package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
- package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
- package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
- package/context/ChartsProvider/ChartsProvider.types.d.mts +3 -3
- package/context/ChartsProvider/ChartsProvider.types.d.ts +3 -3
- package/hooks/index.d.mts +2 -2
- package/hooks/index.d.ts +2 -2
- package/hooks/index.js +8 -8
- package/hooks/index.mjs +2 -2
- package/hooks/useInteractionItemProps.d.mts +1 -2
- package/hooks/useInteractionItemProps.d.ts +1 -2
- package/hooks/{useItemHighlighted.d.mts → useItemHighlightState.d.mts} +5 -13
- package/hooks/{useItemHighlighted.d.ts → useItemHighlightState.d.ts} +5 -13
- package/hooks/{useItemHighlighted.js → useItemHighlightState.js} +5 -10
- package/hooks/useItemHighlightState.mjs +17 -0
- package/hooks/useItemHighlightStateGetter.d.mts +9 -0
- package/hooks/useItemHighlightStateGetter.d.ts +9 -0
- package/hooks/useItemHighlightStateGetter.js +21 -0
- package/hooks/useItemHighlightStateGetter.mjs +16 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/commonNextFocusItem.d.mts +5 -5
- package/internals/commonNextFocusItem.d.ts +5 -5
- package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
- package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
- package/internals/identifierCleaner.d.mts +8 -4
- package/internals/identifierCleaner.d.ts +8 -4
- package/internals/identifierCleaner.js +5 -1
- package/internals/identifierCleaner.mjs +5 -1
- package/internals/identifierSerializer.d.mts +10 -2
- package/internals/identifierSerializer.d.ts +10 -2
- package/internals/identifierSerializer.js +8 -0
- package/internals/identifierSerializer.mjs +8 -0
- package/internals/plugins/allPlugins.d.mts +2 -2
- package/internals/plugins/allPlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.mts +1 -1
- package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.mts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +9 -9
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +28 -28
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.mts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +21 -11
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.mts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +10 -10
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.mts +3 -3
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.mts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +1 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +0 -5
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.mjs +0 -4
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +10 -29
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +27 -64
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +24 -60
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.mts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +3 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +8 -10
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +1 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +8 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +8 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -4
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +6 -4
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.mts +10 -10
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +10 -10
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.mts +16 -16
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +16 -16
- package/internals/plugins/models/chart.d.mts +1 -1
- package/internals/plugins/models/chart.d.ts +1 -1
- package/models/seriesType/config.d.mts +18 -6
- package/models/seriesType/config.d.ts +18 -6
- package/models/seriesType/index.d.mts +8 -8
- package/models/seriesType/index.d.ts +8 -8
- package/models/seriesType/line.d.mts +2 -1
- package/models/seriesType/line.d.ts +2 -1
- package/models/seriesType/radar.d.mts +1 -1
- package/models/seriesType/radar.d.ts +1 -1
- package/package.json +3 -3
- package/themeAugmentation/components.d.mts +26 -1
- package/themeAugmentation/components.d.ts +26 -1
- package/themeAugmentation/overrides.d.mts +15 -1
- package/themeAugmentation/overrides.d.ts +15 -1
- package/hooks/useItemHighlighted.mjs +0 -22
- package/hooks/useItemHighlightedGetter.d.mts +0 -53
- package/hooks/useItemHighlightedGetter.d.ts +0 -53
- package/hooks/useItemHighlightedGetter.js +0 -26
- package/hooks/useItemHighlightedGetter.mjs +0 -21
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type RadarSeriesAreaProps } from "./RadarSeriesPlot.types.js";
|
|
2
2
|
import { type RadarSeriesPlotClasses } from "./radarSeriesPlotClasses.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SeriesId, HighlightItemIdentifierWithType } from "../../models/seriesType/index.js";
|
|
4
|
+
import type { HighlightState } from "../../hooks/useItemHighlightState.js";
|
|
4
5
|
interface GetPathPropsParams {
|
|
5
6
|
seriesId: SeriesId;
|
|
6
7
|
classes: RadarSeriesPlotClasses;
|
|
7
|
-
|
|
8
|
-
isHighlighted: (item: HighlightItemIdentifierWithType<'radar'> | null) => boolean;
|
|
8
|
+
getHighlightState: (item: HighlightItemIdentifierWithType<'radar'> | null) => HighlightState;
|
|
9
9
|
points: {
|
|
10
10
|
x: number;
|
|
11
11
|
y: number;
|
|
@@ -15,29 +15,26 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
15
15
|
var _useRadarSeriesData = require("./useRadarSeriesData");
|
|
16
16
|
var _getAreaPath = require("./getAreaPath");
|
|
17
17
|
var _radarSeriesPlotClasses = require("./radarSeriesPlotClasses");
|
|
18
|
-
var
|
|
18
|
+
var _useItemHighlightStateGetter = require("../../hooks/useItemHighlightStateGetter");
|
|
19
19
|
var _useInteractionAllItemProps = require("./useInteractionAllItemProps");
|
|
20
20
|
var _useRadarRotationIndex = require("./useRadarRotationIndex");
|
|
21
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
22
|
const _excluded = ["seriesId", "onItemClick"];
|
|
23
23
|
function getPathProps(params) {
|
|
24
24
|
const {
|
|
25
|
-
|
|
26
|
-
isFaded,
|
|
25
|
+
getHighlightState,
|
|
27
26
|
seriesId,
|
|
28
27
|
classes,
|
|
29
28
|
points,
|
|
30
29
|
fillArea,
|
|
31
30
|
color
|
|
32
31
|
} = params;
|
|
33
|
-
const
|
|
34
|
-
type: 'radar',
|
|
35
|
-
seriesId
|
|
36
|
-
});
|
|
37
|
-
const isItemFaded = !isItemHighlighted && isFaded({
|
|
32
|
+
const highlightState = getHighlightState({
|
|
38
33
|
type: 'radar',
|
|
39
34
|
seriesId
|
|
40
35
|
});
|
|
36
|
+
const isItemHighlighted = highlightState === 'highlighted';
|
|
37
|
+
const isItemFaded = highlightState === 'faded';
|
|
41
38
|
return {
|
|
42
39
|
d: (0, _getAreaPath.getAreaPath)(points),
|
|
43
40
|
fill: fillArea ? color : 'transparent',
|
|
@@ -59,10 +56,7 @@ function RadarSeriesArea(props) {
|
|
|
59
56
|
const seriesCoordinates = (0, _useRadarSeriesData.useRadarSeriesData)(seriesId);
|
|
60
57
|
const getRotationIndex = (0, _useRadarRotationIndex.useRadarRotationIndex)();
|
|
61
58
|
const interactionProps = (0, _useInteractionAllItemProps.useInteractionAllItemProps)(seriesCoordinates);
|
|
62
|
-
const
|
|
63
|
-
isFaded,
|
|
64
|
-
isHighlighted
|
|
65
|
-
} = (0, _useItemHighlightedGetter.useItemHighlightedGetter)();
|
|
59
|
+
const getHighlightState = (0, _useItemHighlightStateGetter.useItemHighlightStateGetter)();
|
|
66
60
|
const classes = (0, _radarSeriesPlotClasses.useUtilityClasses)(props.classes);
|
|
67
61
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
68
62
|
children: seriesCoordinates?.map(({
|
|
@@ -80,8 +74,7 @@ function RadarSeriesArea(props) {
|
|
|
80
74
|
points,
|
|
81
75
|
color,
|
|
82
76
|
fillArea,
|
|
83
|
-
|
|
84
|
-
isHighlighted,
|
|
77
|
+
getHighlightState,
|
|
85
78
|
classes
|
|
86
79
|
}), {
|
|
87
80
|
onClick: event => onItemClick?.(event, {
|
|
@@ -7,28 +7,25 @@ import clsx from 'clsx';
|
|
|
7
7
|
import { useRadarSeriesData } from "./useRadarSeriesData.mjs";
|
|
8
8
|
import { getAreaPath } from "./getAreaPath.mjs";
|
|
9
9
|
import { useUtilityClasses } from "./radarSeriesPlotClasses.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { useItemHighlightStateGetter } from "../../hooks/useItemHighlightStateGetter.mjs";
|
|
11
11
|
import { useInteractionAllItemProps } from "./useInteractionAllItemProps.mjs";
|
|
12
12
|
import { useRadarRotationIndex } from "./useRadarRotationIndex.mjs";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export function getPathProps(params) {
|
|
15
15
|
const {
|
|
16
|
-
|
|
17
|
-
isFaded,
|
|
16
|
+
getHighlightState,
|
|
18
17
|
seriesId,
|
|
19
18
|
classes,
|
|
20
19
|
points,
|
|
21
20
|
fillArea,
|
|
22
21
|
color
|
|
23
22
|
} = params;
|
|
24
|
-
const
|
|
25
|
-
type: 'radar',
|
|
26
|
-
seriesId
|
|
27
|
-
});
|
|
28
|
-
const isItemFaded = !isItemHighlighted && isFaded({
|
|
23
|
+
const highlightState = getHighlightState({
|
|
29
24
|
type: 'radar',
|
|
30
25
|
seriesId
|
|
31
26
|
});
|
|
27
|
+
const isItemHighlighted = highlightState === 'highlighted';
|
|
28
|
+
const isItemFaded = highlightState === 'faded';
|
|
32
29
|
return {
|
|
33
30
|
d: getAreaPath(points),
|
|
34
31
|
fill: fillArea ? color : 'transparent',
|
|
@@ -50,10 +47,7 @@ function RadarSeriesArea(props) {
|
|
|
50
47
|
const seriesCoordinates = useRadarSeriesData(seriesId);
|
|
51
48
|
const getRotationIndex = useRadarRotationIndex();
|
|
52
49
|
const interactionProps = useInteractionAllItemProps(seriesCoordinates);
|
|
53
|
-
const
|
|
54
|
-
isFaded,
|
|
55
|
-
isHighlighted
|
|
56
|
-
} = useItemHighlightedGetter();
|
|
50
|
+
const getHighlightState = useItemHighlightStateGetter();
|
|
57
51
|
const classes = useUtilityClasses(props.classes);
|
|
58
52
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
59
53
|
children: seriesCoordinates?.map(({
|
|
@@ -71,8 +65,7 @@ function RadarSeriesArea(props) {
|
|
|
71
65
|
points,
|
|
72
66
|
color,
|
|
73
67
|
fillArea,
|
|
74
|
-
|
|
75
|
-
isHighlighted,
|
|
68
|
+
getHighlightState,
|
|
76
69
|
classes
|
|
77
70
|
}), {
|
|
78
71
|
onClick: event => onItemClick?.(event, {
|
|
@@ -3,11 +3,11 @@ import { type RadarSeriesMarksProps } from "./RadarSeriesPlot.types.mjs";
|
|
|
3
3
|
import { type RadarSeriesPlotClasses } from "./radarSeriesPlotClasses.mjs";
|
|
4
4
|
import { type SeriesId } from "../../models/seriesType/common.mjs";
|
|
5
5
|
import type { HighlightItemIdentifierWithType } from "../../models/index.mjs";
|
|
6
|
+
import type { HighlightState } from "../../hooks/useItemHighlightState.mjs";
|
|
6
7
|
interface GetCirclePropsParams {
|
|
7
8
|
seriesId: SeriesId;
|
|
8
9
|
classes: RadarSeriesPlotClasses;
|
|
9
|
-
|
|
10
|
-
isHighlighted: (item: HighlightItemIdentifierWithType<'radar'> | null) => boolean;
|
|
10
|
+
getHighlightState: (item: HighlightItemIdentifierWithType<'radar'> | null) => HighlightState;
|
|
11
11
|
point: {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
@@ -3,11 +3,11 @@ import { type RadarSeriesMarksProps } from "./RadarSeriesPlot.types.js";
|
|
|
3
3
|
import { type RadarSeriesPlotClasses } from "./radarSeriesPlotClasses.js";
|
|
4
4
|
import { type SeriesId } from "../../models/seriesType/common.js";
|
|
5
5
|
import type { HighlightItemIdentifierWithType } from "../../models/index.js";
|
|
6
|
+
import type { HighlightState } from "../../hooks/useItemHighlightState.js";
|
|
6
7
|
interface GetCirclePropsParams {
|
|
7
8
|
seriesId: SeriesId;
|
|
8
9
|
classes: RadarSeriesPlotClasses;
|
|
9
|
-
|
|
10
|
-
isHighlighted: (item: HighlightItemIdentifierWithType<'radar'> | null) => boolean;
|
|
10
|
+
getHighlightState: (item: HighlightItemIdentifierWithType<'radar'> | null) => HighlightState;
|
|
11
11
|
point: {
|
|
12
12
|
x: number;
|
|
13
13
|
y: number;
|
|
@@ -13,28 +13,25 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _clsx = require("clsx");
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
var _useRadarSeriesData = require("./useRadarSeriesData");
|
|
16
|
-
var
|
|
16
|
+
var _useItemHighlightStateGetter = require("../../hooks/useItemHighlightStateGetter");
|
|
17
17
|
var _radarSeriesPlotClasses = require("./radarSeriesPlotClasses");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const _excluded = ["seriesId", "onItemClick"];
|
|
20
20
|
function getCircleProps(params) {
|
|
21
21
|
const {
|
|
22
|
-
|
|
23
|
-
isFaded,
|
|
22
|
+
getHighlightState,
|
|
24
23
|
seriesId,
|
|
25
24
|
classes,
|
|
26
25
|
point,
|
|
27
26
|
fillArea,
|
|
28
27
|
color
|
|
29
28
|
} = params;
|
|
30
|
-
const
|
|
31
|
-
type: 'radar',
|
|
32
|
-
seriesId
|
|
33
|
-
});
|
|
34
|
-
const isItemFaded = !isItemHighlighted && isFaded({
|
|
29
|
+
const highlightState = getHighlightState({
|
|
35
30
|
type: 'radar',
|
|
36
31
|
seriesId
|
|
37
32
|
});
|
|
33
|
+
const isItemHighlighted = highlightState === 'highlighted';
|
|
34
|
+
const isItemFaded = highlightState === 'faded';
|
|
38
35
|
return {
|
|
39
36
|
cx: point.x,
|
|
40
37
|
cy: point.y,
|
|
@@ -52,10 +49,7 @@ function RadarSeriesMarks(props) {
|
|
|
52
49
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
53
50
|
const seriesCoordinates = (0, _useRadarSeriesData.useRadarSeriesData)(props.seriesId);
|
|
54
51
|
const classes = (0, _radarSeriesPlotClasses.useUtilityClasses)(props.classes);
|
|
55
|
-
const
|
|
56
|
-
isFaded,
|
|
57
|
-
isHighlighted
|
|
58
|
-
} = (0, _useItemHighlightedGetter.useItemHighlightedGetter)();
|
|
52
|
+
const getHighlightState = (0, _useItemHighlightStateGetter.useItemHighlightStateGetter)();
|
|
59
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(React.Fragment, {
|
|
60
54
|
children: seriesCoordinates?.map(({
|
|
61
55
|
seriesId: id,
|
|
@@ -73,8 +67,7 @@ function RadarSeriesMarks(props) {
|
|
|
73
67
|
point,
|
|
74
68
|
color: point.color,
|
|
75
69
|
fillArea,
|
|
76
|
-
|
|
77
|
-
isHighlighted,
|
|
70
|
+
getHighlightState,
|
|
78
71
|
classes
|
|
79
72
|
}), {
|
|
80
73
|
pointerEvents: onItemClick ? undefined : 'none',
|
|
@@ -5,27 +5,24 @@ import * as React from 'react';
|
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import { useRadarSeriesData } from "./useRadarSeriesData.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { useItemHighlightStateGetter } from "../../hooks/useItemHighlightStateGetter.mjs";
|
|
9
9
|
import { useUtilityClasses } from "./radarSeriesPlotClasses.mjs";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
export function getCircleProps(params) {
|
|
12
12
|
const {
|
|
13
|
-
|
|
14
|
-
isFaded,
|
|
13
|
+
getHighlightState,
|
|
15
14
|
seriesId,
|
|
16
15
|
classes,
|
|
17
16
|
point,
|
|
18
17
|
fillArea,
|
|
19
18
|
color
|
|
20
19
|
} = params;
|
|
21
|
-
const
|
|
22
|
-
type: 'radar',
|
|
23
|
-
seriesId
|
|
24
|
-
});
|
|
25
|
-
const isItemFaded = !isItemHighlighted && isFaded({
|
|
20
|
+
const highlightState = getHighlightState({
|
|
26
21
|
type: 'radar',
|
|
27
22
|
seriesId
|
|
28
23
|
});
|
|
24
|
+
const isItemHighlighted = highlightState === 'highlighted';
|
|
25
|
+
const isItemFaded = highlightState === 'faded';
|
|
29
26
|
return {
|
|
30
27
|
cx: point.x,
|
|
31
28
|
cy: point.y,
|
|
@@ -43,10 +40,7 @@ function RadarSeriesMarks(props) {
|
|
|
43
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
44
41
|
const seriesCoordinates = useRadarSeriesData(props.seriesId);
|
|
45
42
|
const classes = useUtilityClasses(props.classes);
|
|
46
|
-
const
|
|
47
|
-
isFaded,
|
|
48
|
-
isHighlighted
|
|
49
|
-
} = useItemHighlightedGetter();
|
|
43
|
+
const getHighlightState = useItemHighlightStateGetter();
|
|
50
44
|
return /*#__PURE__*/_jsx(React.Fragment, {
|
|
51
45
|
children: seriesCoordinates?.map(({
|
|
52
46
|
seriesId: id,
|
|
@@ -64,8 +58,7 @@ function RadarSeriesMarks(props) {
|
|
|
64
58
|
point,
|
|
65
59
|
color: point.color,
|
|
66
60
|
fillArea,
|
|
67
|
-
|
|
68
|
-
isHighlighted,
|
|
61
|
+
getHighlightState,
|
|
69
62
|
classes
|
|
70
63
|
}), {
|
|
71
64
|
pointerEvents: onItemClick ? undefined : 'none',
|
|
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _useRadarSeriesData = require("./useRadarSeriesData");
|
|
11
11
|
var _useInteractionAllItemProps = require("./useInteractionAllItemProps");
|
|
12
|
-
var
|
|
12
|
+
var _useItemHighlightStateGetter = require("../../hooks/useItemHighlightStateGetter");
|
|
13
13
|
var _radarSeriesPlotClasses = require("./radarSeriesPlotClasses");
|
|
14
14
|
var _RadarSeriesArea = require("./RadarSeriesArea");
|
|
15
15
|
var _RadarSeriesMarks = require("./RadarSeriesMarks");
|
|
@@ -25,10 +25,7 @@ function RadarSeriesPlot(props) {
|
|
|
25
25
|
const seriesCoordinates = (0, _useRadarSeriesData.useRadarSeriesData)(inSeriesId);
|
|
26
26
|
const getRotationIndex = (0, _useRadarRotationIndex.useRadarRotationIndex)();
|
|
27
27
|
const interactionProps = (0, _useInteractionAllItemProps.useInteractionAllItemProps)(seriesCoordinates);
|
|
28
|
-
const
|
|
29
|
-
isFaded,
|
|
30
|
-
isHighlighted
|
|
31
|
-
} = (0, _useItemHighlightedGetter.useItemHighlightedGetter)();
|
|
28
|
+
const getHighlightState = (0, _useItemHighlightStateGetter.useItemHighlightStateGetter)();
|
|
32
29
|
const classes = (0, _radarSeriesPlotClasses.useUtilityClasses)(inClasses);
|
|
33
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
34
31
|
className: classes.root,
|
|
@@ -49,8 +46,7 @@ function RadarSeriesPlot(props) {
|
|
|
49
46
|
points,
|
|
50
47
|
color,
|
|
51
48
|
fillArea,
|
|
52
|
-
|
|
53
|
-
isHighlighted,
|
|
49
|
+
getHighlightState,
|
|
54
50
|
classes
|
|
55
51
|
}), {
|
|
56
52
|
onClick: event => onAreaClick?.(event, {
|
|
@@ -64,8 +60,7 @@ function RadarSeriesPlot(props) {
|
|
|
64
60
|
point,
|
|
65
61
|
color: point.color,
|
|
66
62
|
fillArea,
|
|
67
|
-
|
|
68
|
-
isHighlighted,
|
|
63
|
+
getHighlightState,
|
|
69
64
|
classes
|
|
70
65
|
}), {
|
|
71
66
|
onClick: event => onMarkClick?.(event, {
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { useRadarSeriesData } from "./useRadarSeriesData.mjs";
|
|
4
4
|
import { useInteractionAllItemProps } from "./useInteractionAllItemProps.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { useItemHighlightStateGetter } from "../../hooks/useItemHighlightStateGetter.mjs";
|
|
6
6
|
import { useUtilityClasses } from "./radarSeriesPlotClasses.mjs";
|
|
7
7
|
import { getPathProps } from "./RadarSeriesArea.mjs";
|
|
8
8
|
import { getCircleProps } from "./RadarSeriesMarks.mjs";
|
|
@@ -18,10 +18,7 @@ function RadarSeriesPlot(props) {
|
|
|
18
18
|
const seriesCoordinates = useRadarSeriesData(inSeriesId);
|
|
19
19
|
const getRotationIndex = useRadarRotationIndex();
|
|
20
20
|
const interactionProps = useInteractionAllItemProps(seriesCoordinates);
|
|
21
|
-
const
|
|
22
|
-
isFaded,
|
|
23
|
-
isHighlighted
|
|
24
|
-
} = useItemHighlightedGetter();
|
|
21
|
+
const getHighlightState = useItemHighlightStateGetter();
|
|
25
22
|
const classes = useUtilityClasses(inClasses);
|
|
26
23
|
return /*#__PURE__*/_jsx("g", {
|
|
27
24
|
className: classes.root,
|
|
@@ -42,8 +39,7 @@ function RadarSeriesPlot(props) {
|
|
|
42
39
|
points,
|
|
43
40
|
color,
|
|
44
41
|
fillArea,
|
|
45
|
-
|
|
46
|
-
isHighlighted,
|
|
42
|
+
getHighlightState,
|
|
47
43
|
classes
|
|
48
44
|
}), {
|
|
49
45
|
onClick: event => onAreaClick?.(event, {
|
|
@@ -57,8 +53,7 @@ function RadarSeriesPlot(props) {
|
|
|
57
53
|
point,
|
|
58
54
|
color: point.color,
|
|
59
55
|
fillArea,
|
|
60
|
-
|
|
61
|
-
isHighlighted,
|
|
56
|
+
getHighlightState,
|
|
62
57
|
classes
|
|
63
58
|
}), {
|
|
64
59
|
onClick: event => onMarkClick?.(event, {
|
|
@@ -26,7 +26,7 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
|
|
|
26
26
|
hideMark?: boolean | undefined;
|
|
27
27
|
fillArea?: boolean | undefined;
|
|
28
28
|
data: number[];
|
|
29
|
-
color: string;
|
|
30
29
|
id: SeriesId;
|
|
31
30
|
valueFormatter: import("../../internals/index.mjs").SeriesValueFormatter<number>;
|
|
31
|
+
color: string;
|
|
32
32
|
}[];
|
|
@@ -26,7 +26,7 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
|
|
|
26
26
|
hideMark?: boolean | undefined;
|
|
27
27
|
fillArea?: boolean | undefined;
|
|
28
28
|
data: number[];
|
|
29
|
-
color: string;
|
|
30
29
|
id: SeriesId;
|
|
31
30
|
valueFormatter: import("../../internals/index.js").SeriesValueFormatter<number>;
|
|
31
|
+
color: string;
|
|
32
32
|
}[];
|
|
@@ -9,7 +9,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _useScale = require("../../hooks/useScale");
|
|
10
10
|
var _useRadarSeries = require("../../hooks/useRadarSeries");
|
|
11
11
|
var _useAxis = require("../../hooks/useAxis");
|
|
12
|
-
var
|
|
12
|
+
var _useItemHighlightStateGetter = require("../../hooks/useItemHighlightStateGetter");
|
|
13
13
|
var _useChartContext = require("../../context/ChartProvider/useChartContext");
|
|
14
14
|
var _getSeriesColorFn = require("../../internals/getSeriesColorFn");
|
|
15
15
|
/**
|
|
@@ -26,38 +26,30 @@ function useRadarSeriesData(querySeriesId) {
|
|
|
26
26
|
radiusAxis
|
|
27
27
|
} = (0, _useAxis.useRadiusAxes)();
|
|
28
28
|
const radarSeries = (0, _useRadarSeries.useRadarSeries)(querySeriesId === undefined ? undefined : [querySeriesId]);
|
|
29
|
-
const
|
|
30
|
-
isFaded: isItemFaded,
|
|
31
|
-
isHighlighted: isItemHighlighted
|
|
32
|
-
} = (0, _useItemHighlightedGetter.useItemHighlightedGetter)();
|
|
29
|
+
const getHighlightState = (0, _useItemHighlightStateGetter.useItemHighlightStateGetter)();
|
|
33
30
|
const metrics = rotationScale?.domain() ?? [];
|
|
34
31
|
const angles = metrics.map(key => rotationScale(key));
|
|
35
32
|
return radarSeries.map(series => {
|
|
36
33
|
const seriesId = series.id;
|
|
37
|
-
const
|
|
38
|
-
type: 'radar',
|
|
39
|
-
seriesId
|
|
40
|
-
});
|
|
41
|
-
const isSeriesFaded = !isSeriesHighlighted && isItemFaded({
|
|
34
|
+
const seriesHighlightState = getHighlightState({
|
|
42
35
|
type: 'radar',
|
|
43
36
|
seriesId
|
|
44
37
|
});
|
|
38
|
+
const isSeriesHighlighted = seriesHighlightState === 'highlighted';
|
|
39
|
+
const isSeriesFaded = seriesHighlightState === 'faded';
|
|
45
40
|
const getColor = (0, _getSeriesColorFn.getSeriesColorFn)(series);
|
|
46
41
|
return (0, _extends2.default)({}, series, {
|
|
47
42
|
seriesId: series.id,
|
|
48
43
|
isSeriesHighlighted,
|
|
49
44
|
isSeriesFaded,
|
|
50
45
|
points: series.data.map((value, dataIndex) => {
|
|
51
|
-
const
|
|
52
|
-
type: 'radar',
|
|
53
|
-
seriesId,
|
|
54
|
-
dataIndex
|
|
55
|
-
});
|
|
56
|
-
const faded = !highlighted && isItemFaded({
|
|
46
|
+
const pointHighlightState = getHighlightState({
|
|
57
47
|
type: 'radar',
|
|
58
48
|
seriesId,
|
|
59
49
|
dataIndex
|
|
60
50
|
});
|
|
51
|
+
const highlighted = pointHighlightState === 'highlighted';
|
|
52
|
+
const faded = pointHighlightState === 'faded';
|
|
61
53
|
const r = radiusAxis[metrics[dataIndex]].scale(value);
|
|
62
54
|
const angle = angles[dataIndex];
|
|
63
55
|
const [x, y] = instance.polar2svg(r, angle);
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import { useRotationScale } from "../../hooks/useScale.mjs";
|
|
3
3
|
import { useRadarSeries } from "../../hooks/useRadarSeries.mjs";
|
|
4
4
|
import { useRadiusAxes } from "../../hooks/useAxis.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { useItemHighlightStateGetter } from "../../hooks/useItemHighlightStateGetter.mjs";
|
|
6
6
|
import { useChartContext } from "../../context/ChartProvider/useChartContext.mjs";
|
|
7
7
|
import { getSeriesColorFn } from "../../internals/getSeriesColorFn.mjs";
|
|
8
8
|
|
|
@@ -20,38 +20,30 @@ export function useRadarSeriesData(querySeriesId) {
|
|
|
20
20
|
radiusAxis
|
|
21
21
|
} = useRadiusAxes();
|
|
22
22
|
const radarSeries = useRadarSeries(querySeriesId === undefined ? undefined : [querySeriesId]);
|
|
23
|
-
const
|
|
24
|
-
isFaded: isItemFaded,
|
|
25
|
-
isHighlighted: isItemHighlighted
|
|
26
|
-
} = useItemHighlightedGetter();
|
|
23
|
+
const getHighlightState = useItemHighlightStateGetter();
|
|
27
24
|
const metrics = rotationScale?.domain() ?? [];
|
|
28
25
|
const angles = metrics.map(key => rotationScale(key));
|
|
29
26
|
return radarSeries.map(series => {
|
|
30
27
|
const seriesId = series.id;
|
|
31
|
-
const
|
|
32
|
-
type: 'radar',
|
|
33
|
-
seriesId
|
|
34
|
-
});
|
|
35
|
-
const isSeriesFaded = !isSeriesHighlighted && isItemFaded({
|
|
28
|
+
const seriesHighlightState = getHighlightState({
|
|
36
29
|
type: 'radar',
|
|
37
30
|
seriesId
|
|
38
31
|
});
|
|
32
|
+
const isSeriesHighlighted = seriesHighlightState === 'highlighted';
|
|
33
|
+
const isSeriesFaded = seriesHighlightState === 'faded';
|
|
39
34
|
const getColor = getSeriesColorFn(series);
|
|
40
35
|
return _extends({}, series, {
|
|
41
36
|
seriesId: series.id,
|
|
42
37
|
isSeriesHighlighted,
|
|
43
38
|
isSeriesFaded,
|
|
44
39
|
points: series.data.map((value, dataIndex) => {
|
|
45
|
-
const
|
|
46
|
-
type: 'radar',
|
|
47
|
-
seriesId,
|
|
48
|
-
dataIndex
|
|
49
|
-
});
|
|
50
|
-
const faded = !highlighted && isItemFaded({
|
|
40
|
+
const pointHighlightState = getHighlightState({
|
|
51
41
|
type: 'radar',
|
|
52
42
|
seriesId,
|
|
53
43
|
dataIndex
|
|
54
44
|
});
|
|
45
|
+
const highlighted = pointHighlightState === 'highlighted';
|
|
46
|
+
const faded = pointHighlightState === 'faded';
|
|
55
47
|
const r = radiusAxis[metrics[dataIndex]].scale(value);
|
|
56
48
|
const angle = angles[dataIndex];
|
|
57
49
|
const [x, y] = instance.polar2svg(r, angle);
|
|
@@ -26,14 +26,19 @@ const tooltipGetter = params => {
|
|
|
26
26
|
color: getColor(),
|
|
27
27
|
label,
|
|
28
28
|
markType: series.labelMarkType,
|
|
29
|
-
values: series.data.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
values: series.data.map((value, dataIndex) => {
|
|
30
|
+
if (identifier.dataIndex != null && identifier.dataIndex !== dataIndex) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
value,
|
|
35
|
+
formattedValue: series.valueFormatter(value, {
|
|
36
|
+
dataIndex
|
|
37
|
+
}),
|
|
38
|
+
markType: series.labelMarkType,
|
|
39
|
+
label: formatter(rotationAxis?.data?.[dataIndex])
|
|
40
|
+
};
|
|
41
|
+
}).filter(v => v !== null)
|
|
37
42
|
};
|
|
38
43
|
};
|
|
39
44
|
const axisTooltipGetter = series => {
|
|
@@ -20,14 +20,19 @@ const tooltipGetter = params => {
|
|
|
20
20
|
color: getColor(),
|
|
21
21
|
label,
|
|
22
22
|
markType: series.labelMarkType,
|
|
23
|
-
values: series.data.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
values: series.data.map((value, dataIndex) => {
|
|
24
|
+
if (identifier.dataIndex != null && identifier.dataIndex !== dataIndex) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
value,
|
|
29
|
+
formattedValue: series.valueFormatter(value, {
|
|
30
|
+
dataIndex
|
|
31
|
+
}),
|
|
32
|
+
markType: series.labelMarkType,
|
|
33
|
+
label: formatter(rotationAxis?.data?.[dataIndex])
|
|
34
|
+
};
|
|
35
|
+
}).filter(v => v !== null)
|
|
31
36
|
};
|
|
32
37
|
};
|
|
33
38
|
export const axisTooltipGetter = series => {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useRadarChartProps = void 0;
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var _RadarChart = require("./RadarChart.plugins");
|
|
11
|
-
const _excluded = ["apiRef", "series", "radar", "width", "height", "margin", "colors", "sx", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "hideLegend", "divisions", "shape", "stripeColor", "highlight", "showToolbar", "onAxisClick", "onAreaClick", "onMarkClick", "
|
|
11
|
+
const _excluded = ["apiRef", "series", "radar", "width", "height", "margin", "colors", "sx", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "hideLegend", "divisions", "shape", "stripeColor", "highlight", "showToolbar", "onAxisClick", "onAreaClick", "onMarkClick", "disableKeyboardNavigation", "className"];
|
|
12
12
|
/**
|
|
13
13
|
* A helper function that extracts RadarChartProps from the input props
|
|
14
14
|
* and returns an object with props for the children components of RadarChart.
|
|
@@ -40,7 +40,7 @@ const useRadarChartProps = props => {
|
|
|
40
40
|
onAxisClick,
|
|
41
41
|
onAreaClick,
|
|
42
42
|
onMarkClick,
|
|
43
|
-
|
|
43
|
+
disableKeyboardNavigation,
|
|
44
44
|
className
|
|
45
45
|
} = props,
|
|
46
46
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -57,7 +57,7 @@ const useRadarChartProps = props => {
|
|
|
57
57
|
onHighlightChange,
|
|
58
58
|
skipAnimation,
|
|
59
59
|
onAxisClick,
|
|
60
|
-
|
|
60
|
+
disableKeyboardNavigation,
|
|
61
61
|
plugins: _RadarChart.RADAR_PLUGINS
|
|
62
62
|
};
|
|
63
63
|
const overlayProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
|
-
const _excluded = ["apiRef", "series", "radar", "width", "height", "margin", "colors", "sx", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "hideLegend", "divisions", "shape", "stripeColor", "highlight", "showToolbar", "onAxisClick", "onAreaClick", "onMarkClick", "
|
|
4
|
+
const _excluded = ["apiRef", "series", "radar", "width", "height", "margin", "colors", "sx", "children", "slots", "slotProps", "skipAnimation", "loading", "highlightedItem", "onHighlightChange", "hideLegend", "divisions", "shape", "stripeColor", "highlight", "showToolbar", "onAxisClick", "onAreaClick", "onMarkClick", "disableKeyboardNavigation", "className"];
|
|
5
5
|
import { RADAR_PLUGINS } from "./RadarChart.plugins.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* A helper function that extracts RadarChartProps from the input props
|
|
@@ -34,7 +34,7 @@ export const useRadarChartProps = props => {
|
|
|
34
34
|
onAxisClick,
|
|
35
35
|
onAreaClick,
|
|
36
36
|
onMarkClick,
|
|
37
|
-
|
|
37
|
+
disableKeyboardNavigation,
|
|
38
38
|
className
|
|
39
39
|
} = props,
|
|
40
40
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -51,7 +51,7 @@ export const useRadarChartProps = props => {
|
|
|
51
51
|
onHighlightChange,
|
|
52
52
|
skipAnimation,
|
|
53
53
|
onAxisClick,
|
|
54
|
-
|
|
54
|
+
disableKeyboardNavigation,
|
|
55
55
|
plugins: RADAR_PLUGINS
|
|
56
56
|
};
|
|
57
57
|
const overlayProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DefaultizedScatterSeriesType } from "../models/seriesType/scatter.mjs";
|
|
2
2
|
import { type D3Scale } from "../models/axis.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import type { ScatterClasses } from "./scatterClasses.mjs";
|
|
4
4
|
import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
|
|
5
5
|
export interface BatchScatterProps {
|
|
6
6
|
series: DefaultizedScatterSeriesType;
|
|
@@ -9,6 +9,7 @@ export interface BatchScatterProps {
|
|
|
9
9
|
color: string;
|
|
10
10
|
colorGetter?: ColorGetter<'scatter'>;
|
|
11
11
|
classes?: Partial<ScatterClasses>;
|
|
12
|
+
className?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface BatchScatterPathsProps {
|
|
14
15
|
series: DefaultizedScatterSeriesType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DefaultizedScatterSeriesType } from "../models/seriesType/scatter.js";
|
|
2
2
|
import { type D3Scale } from "../models/axis.js";
|
|
3
|
-
import {
|
|
3
|
+
import type { ScatterClasses } from "./scatterClasses.js";
|
|
4
4
|
import { type ColorGetter } from "../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
|
|
5
5
|
export interface BatchScatterProps {
|
|
6
6
|
series: DefaultizedScatterSeriesType;
|
|
@@ -9,6 +9,7 @@ export interface BatchScatterProps {
|
|
|
9
9
|
color: string;
|
|
10
10
|
colorGetter?: ColorGetter<'scatter'>;
|
|
11
11
|
classes?: Partial<ScatterClasses>;
|
|
12
|
+
className?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface BatchScatterPathsProps {
|
|
14
15
|
series: DefaultizedScatterSeriesType;
|