@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,16 +1,16 @@
|
|
|
1
1
|
import type { DefaultizedProps, DistributiveOmit } from '@mui/x-internals/types';
|
|
2
2
|
import type { ChartSeriesType, ChartsSeriesConfig } from "./config.mjs";
|
|
3
|
-
type AllSeriesType<
|
|
4
|
-
type DefaultizedSeriesType<
|
|
5
|
-
export type SeriesItemIdentifier<
|
|
6
|
-
export type SeriesItemIdentifierWithType<
|
|
7
|
-
export type SeriesItemIdentifierWithData<
|
|
3
|
+
type AllSeriesType<SeriesType extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[SeriesType]['seriesProp'];
|
|
4
|
+
type DefaultizedSeriesType<SeriesType extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[SeriesType]['series'];
|
|
5
|
+
export type SeriesItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'type'> : never;
|
|
6
|
+
export type SeriesItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['itemIdentifier'] : never;
|
|
7
|
+
export type SeriesItemIdentifierWithData<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['itemIdentifierWithData'] : never;
|
|
8
8
|
/**
|
|
9
9
|
* Identifies an highlighted item or series.
|
|
10
10
|
*/
|
|
11
|
-
export type HighlightItemIdentifier<
|
|
12
|
-
export type HighlightItemIdentifierWithType<
|
|
13
|
-
export type FocusedItemIdentifier<
|
|
11
|
+
export type HighlightItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['highlightIdentifier'], 'type'> : never;
|
|
12
|
+
export type HighlightItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['highlightIdentifier'] : never;
|
|
13
|
+
export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
|
|
14
14
|
export { type SeriesId } from "./common.mjs";
|
|
15
15
|
export type { CartesianChartSeriesType, StackableChartSeriesType } from "./config.mjs";
|
|
16
16
|
export * from "./line.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { DefaultizedProps, DistributiveOmit } from '@mui/x-internals/types';
|
|
2
2
|
import type { ChartSeriesType, ChartsSeriesConfig } from "./config.js";
|
|
3
|
-
type AllSeriesType<
|
|
4
|
-
type DefaultizedSeriesType<
|
|
5
|
-
export type SeriesItemIdentifier<
|
|
6
|
-
export type SeriesItemIdentifierWithType<
|
|
7
|
-
export type SeriesItemIdentifierWithData<
|
|
3
|
+
type AllSeriesType<SeriesType extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[SeriesType]['seriesProp'];
|
|
4
|
+
type DefaultizedSeriesType<SeriesType extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[SeriesType]['series'];
|
|
5
|
+
export type SeriesItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'type'> : never;
|
|
6
|
+
export type SeriesItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['itemIdentifier'] : never;
|
|
7
|
+
export type SeriesItemIdentifierWithData<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['itemIdentifierWithData'] : never;
|
|
8
8
|
/**
|
|
9
9
|
* Identifies an highlighted item or series.
|
|
10
10
|
*/
|
|
11
|
-
export type HighlightItemIdentifier<
|
|
12
|
-
export type HighlightItemIdentifierWithType<
|
|
13
|
-
export type FocusedItemIdentifier<
|
|
11
|
+
export type HighlightItemIdentifier<SeriesType extends ChartSeriesType> = SeriesType extends any ? DistributiveOmit<ChartsSeriesConfig[SeriesType]['highlightIdentifier'], 'type'> : never;
|
|
12
|
+
export type HighlightItemIdentifierWithType<SeriesType extends ChartSeriesType> = SeriesType extends any ? ChartsSeriesConfig[SeriesType]['highlightIdentifier'] : never;
|
|
13
|
+
export type FocusedItemIdentifier<SeriesType extends ChartSeriesType = ChartSeriesType> = SeriesType extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'dataIndex'> : SeriesType extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[SeriesType]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[SeriesType]['itemIdentifier'];
|
|
14
14
|
export { type SeriesId } from "./common.js";
|
|
15
15
|
export type { CartesianChartSeriesType, StackableChartSeriesType } from "./config.js";
|
|
16
16
|
export * from "./line.js";
|
|
@@ -24,6 +24,7 @@ export interface ShowMarkParams<AxisValue = number | Date> {
|
|
|
24
24
|
*/
|
|
25
25
|
value: number;
|
|
26
26
|
}
|
|
27
|
+
export type MarkShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
|
|
27
28
|
export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType {
|
|
28
29
|
type: 'line';
|
|
29
30
|
/**
|
|
@@ -64,7 +65,7 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
64
65
|
* Using 'circle' renders a `<circle />` element, while all other options render a `<path />` instead. The path causes a small decrease in performance.
|
|
65
66
|
* @default 'circle'
|
|
66
67
|
*/
|
|
67
|
-
shape?:
|
|
68
|
+
shape?: MarkShape;
|
|
68
69
|
/**
|
|
69
70
|
* Do not render the line highlight item if set to `true`.
|
|
70
71
|
* @default false
|
|
@@ -24,6 +24,7 @@ export interface ShowMarkParams<AxisValue = number | Date> {
|
|
|
24
24
|
*/
|
|
25
25
|
value: number;
|
|
26
26
|
}
|
|
27
|
+
export type MarkShape = 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye';
|
|
27
28
|
export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType {
|
|
28
29
|
type: 'line';
|
|
29
30
|
/**
|
|
@@ -64,7 +65,7 @@ export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>,
|
|
|
64
65
|
* Using 'circle' renders a `<circle />` element, while all other options render a `<path />` instead. The path causes a small decrease in performance.
|
|
65
66
|
* @default 'circle'
|
|
66
67
|
*/
|
|
67
|
-
shape?:
|
|
68
|
+
shape?: MarkShape;
|
|
68
69
|
/**
|
|
69
70
|
* Do not render the line highlight item if set to `true`.
|
|
70
71
|
* @default false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { SeriesId, CommonDefaultizedProps, CommonSeriesType } from "./common.mjs";
|
|
3
3
|
export interface RadarSeriesType extends CommonSeriesType<number, 'radar'> {
|
|
4
4
|
type: 'radar';
|
|
5
5
|
data: number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { SeriesId, CommonDefaultizedProps, CommonSeriesType } from "./common.js";
|
|
3
3
|
export interface RadarSeriesType extends CommonSeriesType<number, 'radar'> {
|
|
4
4
|
type: 'radar';
|
|
5
5
|
data: number[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.3",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
36
|
"use-sync-external-store": "^1.6.0",
|
|
37
37
|
"@mui/x-charts-vendor": "9.0.0-alpha.2",
|
|
38
|
-
"@mui/x-
|
|
39
|
-
"@mui/x-
|
|
38
|
+
"@mui/x-internals": "9.0.0-alpha.2",
|
|
39
|
+
"@mui/x-internal-gestures": "0.4.1-alpha.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -42,10 +42,13 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
42
42
|
};
|
|
43
43
|
MuiBarChart?: {
|
|
44
44
|
defaultProps?: ComponentsProps['MuiBarChart'];
|
|
45
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiBarChart'];
|
|
45
46
|
};
|
|
47
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
46
48
|
MuiBarElement?: {
|
|
47
49
|
styleOverrides?: ComponentsOverrides<Theme>['MuiBarElement'];
|
|
48
50
|
};
|
|
51
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
49
52
|
MuiBarLabel?: {
|
|
50
53
|
defaultProps?: ComponentsProps['MuiBarLabel'];
|
|
51
54
|
styleOverrides?: ComponentsOverrides<Theme>['MuiBarLabel'];
|
|
@@ -53,19 +56,41 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
53
56
|
MuiLineChart?: {
|
|
54
57
|
defaultProps?: ComponentsProps['MuiLineChart'];
|
|
55
58
|
};
|
|
59
|
+
MuiAreaPlot?: {
|
|
60
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiAreaPlot'];
|
|
61
|
+
};
|
|
62
|
+
MuiLinePlot?: {
|
|
63
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiLinePlot'];
|
|
64
|
+
};
|
|
65
|
+
MuiMarkPlot?: {
|
|
66
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiMarkPlot'];
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated Use `MuiAreaPlot` instead. */
|
|
56
69
|
MuiAreaElement?: {
|
|
57
70
|
styleOverrides?: ComponentsOverrides<Theme>['MuiAreaElement'];
|
|
58
71
|
};
|
|
72
|
+
/** @deprecated Use `MuiLinePlot` instead. */
|
|
59
73
|
MuiLineElement?: {
|
|
60
74
|
styleOverrides?: ComponentsOverrides<Theme>['MuiLineElement'];
|
|
61
75
|
};
|
|
76
|
+
/** @deprecated Use `MuiMarkPlot` instead. */
|
|
62
77
|
MuiMarkElement?: {
|
|
63
78
|
styleOverrides?: ComponentsOverrides<Theme>['MuiMarkElement'];
|
|
64
79
|
};
|
|
80
|
+
MuiPieArcPlot?: {
|
|
81
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiPieArcPlot'];
|
|
82
|
+
};
|
|
83
|
+
MuiPieArcLabelPlot?: {
|
|
84
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiPieArcLabelPlot'];
|
|
85
|
+
};
|
|
65
86
|
MuiScatterChart?: {
|
|
66
87
|
defaultProps?: ComponentsProps['MuiScatterChart'];
|
|
88
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiScatterChart'];
|
|
89
|
+
};
|
|
90
|
+
/** @deprecated Use `MuiScatterChart` instead. */
|
|
91
|
+
MuiScatter?: {
|
|
92
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiScatterChart'];
|
|
67
93
|
};
|
|
68
|
-
MuiScatter?: {};
|
|
69
94
|
MuiGauge?: {
|
|
70
95
|
styleOverrides?: ComponentsOverrides<Theme>['MuiGauge'];
|
|
71
96
|
};
|
|
@@ -42,10 +42,13 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
42
42
|
};
|
|
43
43
|
MuiBarChart?: {
|
|
44
44
|
defaultProps?: ComponentsProps['MuiBarChart'];
|
|
45
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiBarChart'];
|
|
45
46
|
};
|
|
47
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
46
48
|
MuiBarElement?: {
|
|
47
49
|
styleOverrides?: ComponentsOverrides<Theme>['MuiBarElement'];
|
|
48
50
|
};
|
|
51
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
49
52
|
MuiBarLabel?: {
|
|
50
53
|
defaultProps?: ComponentsProps['MuiBarLabel'];
|
|
51
54
|
styleOverrides?: ComponentsOverrides<Theme>['MuiBarLabel'];
|
|
@@ -53,19 +56,41 @@ export interface ChartsComponents<Theme = unknown> {
|
|
|
53
56
|
MuiLineChart?: {
|
|
54
57
|
defaultProps?: ComponentsProps['MuiLineChart'];
|
|
55
58
|
};
|
|
59
|
+
MuiAreaPlot?: {
|
|
60
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiAreaPlot'];
|
|
61
|
+
};
|
|
62
|
+
MuiLinePlot?: {
|
|
63
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiLinePlot'];
|
|
64
|
+
};
|
|
65
|
+
MuiMarkPlot?: {
|
|
66
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiMarkPlot'];
|
|
67
|
+
};
|
|
68
|
+
/** @deprecated Use `MuiAreaPlot` instead. */
|
|
56
69
|
MuiAreaElement?: {
|
|
57
70
|
styleOverrides?: ComponentsOverrides<Theme>['MuiAreaElement'];
|
|
58
71
|
};
|
|
72
|
+
/** @deprecated Use `MuiLinePlot` instead. */
|
|
59
73
|
MuiLineElement?: {
|
|
60
74
|
styleOverrides?: ComponentsOverrides<Theme>['MuiLineElement'];
|
|
61
75
|
};
|
|
76
|
+
/** @deprecated Use `MuiMarkPlot` instead. */
|
|
62
77
|
MuiMarkElement?: {
|
|
63
78
|
styleOverrides?: ComponentsOverrides<Theme>['MuiMarkElement'];
|
|
64
79
|
};
|
|
80
|
+
MuiPieArcPlot?: {
|
|
81
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiPieArcPlot'];
|
|
82
|
+
};
|
|
83
|
+
MuiPieArcLabelPlot?: {
|
|
84
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiPieArcLabelPlot'];
|
|
85
|
+
};
|
|
65
86
|
MuiScatterChart?: {
|
|
66
87
|
defaultProps?: ComponentsProps['MuiScatterChart'];
|
|
88
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiScatterChart'];
|
|
89
|
+
};
|
|
90
|
+
/** @deprecated Use `MuiScatterChart` instead. */
|
|
91
|
+
MuiScatter?: {
|
|
92
|
+
styleOverrides?: ComponentsOverrides<Theme>['MuiScatterChart'];
|
|
67
93
|
};
|
|
68
|
-
MuiScatter?: {};
|
|
69
94
|
MuiGauge?: {
|
|
70
95
|
styleOverrides?: ComponentsOverrides<Theme>['MuiGauge'];
|
|
71
96
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type GaugeClassKey } from "../Gauge/index.mjs";
|
|
2
|
+
import { type BarClassKey } from "../BarChart/barClasses.mjs";
|
|
2
3
|
import { type BarLabelClassKey } from "../BarChart/index.mjs";
|
|
3
4
|
import { type BarElementClassKey } from "../BarChart/barElementClasses.mjs";
|
|
5
|
+
import { type ScatterClassKey } from "../ScatterChart/scatterClasses.mjs";
|
|
4
6
|
import { type ChartsAxisHighlightClassKey } from "../ChartsAxisHighlight/index.mjs";
|
|
5
7
|
import { type ChartsGridClassKey } from "../ChartsGrid/index.mjs";
|
|
6
8
|
import { type ChartsTooltipClassKey } from "../ChartsTooltip/index.mjs";
|
|
7
|
-
import {
|
|
9
|
+
import type { AreaElementClassKey, LineElementClassKey, MarkElementClassKey } from "../LineChart/index.mjs";
|
|
8
10
|
export interface ChartsComponentNameToClassKey {
|
|
9
11
|
MuiChartsAxis: 'root';
|
|
10
12
|
MuiChartsXAxis: 'root';
|
|
@@ -14,11 +16,23 @@ export interface ChartsComponentNameToClassKey {
|
|
|
14
16
|
MuiChartsGrid: ChartsGridClassKey;
|
|
15
17
|
MuiChartsTooltip: ChartsTooltipClassKey;
|
|
16
18
|
MuiChartsSurface: 'root';
|
|
19
|
+
MuiBarChart: BarClassKey;
|
|
20
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
17
21
|
MuiBarElement: BarElementClassKey;
|
|
22
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
18
23
|
MuiBarLabel: BarLabelClassKey;
|
|
24
|
+
MuiPieArcPlot: 'root';
|
|
25
|
+
MuiPieArcLabelPlot: 'root';
|
|
26
|
+
MuiAreaPlot: 'root';
|
|
27
|
+
MuiLinePlot: 'root';
|
|
28
|
+
MuiMarkPlot: 'root';
|
|
29
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
19
30
|
MuiAreaElement: AreaElementClassKey;
|
|
31
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
20
32
|
MuiLineElement: LineElementClassKey;
|
|
33
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
21
34
|
MuiMarkElement: MarkElementClassKey;
|
|
35
|
+
MuiScatterChart: ScatterClassKey;
|
|
22
36
|
MuiGauge: GaugeClassKey;
|
|
23
37
|
}
|
|
24
38
|
declare module '@mui/material/styles' {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type GaugeClassKey } from "../Gauge/index.js";
|
|
2
|
+
import { type BarClassKey } from "../BarChart/barClasses.js";
|
|
2
3
|
import { type BarLabelClassKey } from "../BarChart/index.js";
|
|
3
4
|
import { type BarElementClassKey } from "../BarChart/barElementClasses.js";
|
|
5
|
+
import { type ScatterClassKey } from "../ScatterChart/scatterClasses.js";
|
|
4
6
|
import { type ChartsAxisHighlightClassKey } from "../ChartsAxisHighlight/index.js";
|
|
5
7
|
import { type ChartsGridClassKey } from "../ChartsGrid/index.js";
|
|
6
8
|
import { type ChartsTooltipClassKey } from "../ChartsTooltip/index.js";
|
|
7
|
-
import {
|
|
9
|
+
import type { AreaElementClassKey, LineElementClassKey, MarkElementClassKey } from "../LineChart/index.js";
|
|
8
10
|
export interface ChartsComponentNameToClassKey {
|
|
9
11
|
MuiChartsAxis: 'root';
|
|
10
12
|
MuiChartsXAxis: 'root';
|
|
@@ -14,11 +16,23 @@ export interface ChartsComponentNameToClassKey {
|
|
|
14
16
|
MuiChartsGrid: ChartsGridClassKey;
|
|
15
17
|
MuiChartsTooltip: ChartsTooltipClassKey;
|
|
16
18
|
MuiChartsSurface: 'root';
|
|
19
|
+
MuiBarChart: BarClassKey;
|
|
20
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
17
21
|
MuiBarElement: BarElementClassKey;
|
|
22
|
+
/** @deprecated Use `MuiBarChart` instead. */
|
|
18
23
|
MuiBarLabel: BarLabelClassKey;
|
|
24
|
+
MuiPieArcPlot: 'root';
|
|
25
|
+
MuiPieArcLabelPlot: 'root';
|
|
26
|
+
MuiAreaPlot: 'root';
|
|
27
|
+
MuiLinePlot: 'root';
|
|
28
|
+
MuiMarkPlot: 'root';
|
|
29
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
19
30
|
MuiAreaElement: AreaElementClassKey;
|
|
31
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
20
32
|
MuiLineElement: LineElementClassKey;
|
|
33
|
+
/** @deprecated Use `MuiLineChart` instead. */
|
|
21
34
|
MuiMarkElement: MarkElementClassKey;
|
|
35
|
+
MuiScatterChart: ScatterClassKey;
|
|
22
36
|
MuiGauge: GaugeClassKey;
|
|
23
37
|
}
|
|
24
38
|
declare module '@mui/material/styles' {
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useStore } from "../internals/store/useStore.mjs";
|
|
4
|
-
import { selectorChartsIsFaded, selectorChartsIsHighlighted } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* A hook to check the highlighted state of the item.
|
|
7
|
-
* This function already calculates that an item is not faded if it is highlighted.
|
|
8
|
-
*
|
|
9
|
-
* If you need fine control over the state, use the `useItemHighlightedGetter` hook instead.
|
|
10
|
-
*
|
|
11
|
-
* @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
|
|
12
|
-
* @returns {UseItemHighlightedReturnType} the state of the item
|
|
13
|
-
*/
|
|
14
|
-
export function useItemHighlighted(item) {
|
|
15
|
-
const store = useStore();
|
|
16
|
-
const isHighlighted = store.use(selectorChartsIsHighlighted, item);
|
|
17
|
-
const isFaded = store.use(selectorChartsIsFaded, item);
|
|
18
|
-
return {
|
|
19
|
-
isHighlighted,
|
|
20
|
-
isFaded: !isHighlighted && isFaded
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { type ChartSeriesType } from "../models/seriesType/config.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* A hook to check the highlighted state of multiple items.
|
|
4
|
-
* If you're interested by a single one, consider using `useItemHighlighted`.
|
|
5
|
-
*
|
|
6
|
-
* Warning: highlighted and faded can both be true at the same time.
|
|
7
|
-
* We recommend to first test if item is highlighted: `const faded = !highlighted && isFaded(item)`
|
|
8
|
-
* @returns {{ isHighlighted, isFaded }} callbacks to get the state of the item.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useItemHighlightedGetter<SeriesType extends ChartSeriesType>(): {
|
|
11
|
-
isHighlighted: (item: {
|
|
12
|
-
type: "line";
|
|
13
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
14
|
-
dataIndex?: number;
|
|
15
|
-
} | {
|
|
16
|
-
type: "bar";
|
|
17
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
18
|
-
dataIndex?: number | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
type: "scatter";
|
|
21
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
22
|
-
dataIndex?: number;
|
|
23
|
-
} | {
|
|
24
|
-
type: "pie";
|
|
25
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
26
|
-
dataIndex?: number;
|
|
27
|
-
} | {
|
|
28
|
-
type: "radar";
|
|
29
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
30
|
-
dataIndex?: number;
|
|
31
|
-
} | null) => boolean;
|
|
32
|
-
isFaded: (item: {
|
|
33
|
-
type: "line";
|
|
34
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
35
|
-
dataIndex?: number;
|
|
36
|
-
} | {
|
|
37
|
-
type: "bar";
|
|
38
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
39
|
-
dataIndex?: number | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
type: "scatter";
|
|
42
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
43
|
-
dataIndex?: number;
|
|
44
|
-
} | {
|
|
45
|
-
type: "pie";
|
|
46
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
47
|
-
dataIndex?: number;
|
|
48
|
-
} | {
|
|
49
|
-
type: "radar";
|
|
50
|
-
seriesId: import("../index.mjs").SeriesId;
|
|
51
|
-
dataIndex?: number;
|
|
52
|
-
} | null) => boolean;
|
|
53
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { type ChartSeriesType } from "../models/seriesType/config.js";
|
|
2
|
-
/**
|
|
3
|
-
* A hook to check the highlighted state of multiple items.
|
|
4
|
-
* If you're interested by a single one, consider using `useItemHighlighted`.
|
|
5
|
-
*
|
|
6
|
-
* Warning: highlighted and faded can both be true at the same time.
|
|
7
|
-
* We recommend to first test if item is highlighted: `const faded = !highlighted && isFaded(item)`
|
|
8
|
-
* @returns {{ isHighlighted, isFaded }} callbacks to get the state of the item.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useItemHighlightedGetter<SeriesType extends ChartSeriesType>(): {
|
|
11
|
-
isHighlighted: (item: {
|
|
12
|
-
type: "line";
|
|
13
|
-
seriesId: import("../index.js").SeriesId;
|
|
14
|
-
dataIndex?: number;
|
|
15
|
-
} | {
|
|
16
|
-
type: "bar";
|
|
17
|
-
seriesId: import("../index.js").SeriesId;
|
|
18
|
-
dataIndex?: number | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
type: "scatter";
|
|
21
|
-
seriesId: import("../index.js").SeriesId;
|
|
22
|
-
dataIndex?: number;
|
|
23
|
-
} | {
|
|
24
|
-
type: "pie";
|
|
25
|
-
seriesId: import("../index.js").SeriesId;
|
|
26
|
-
dataIndex?: number;
|
|
27
|
-
} | {
|
|
28
|
-
type: "radar";
|
|
29
|
-
seriesId: import("../index.js").SeriesId;
|
|
30
|
-
dataIndex?: number;
|
|
31
|
-
} | null) => boolean;
|
|
32
|
-
isFaded: (item: {
|
|
33
|
-
type: "line";
|
|
34
|
-
seriesId: import("../index.js").SeriesId;
|
|
35
|
-
dataIndex?: number;
|
|
36
|
-
} | {
|
|
37
|
-
type: "bar";
|
|
38
|
-
seriesId: import("../index.js").SeriesId;
|
|
39
|
-
dataIndex?: number | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
type: "scatter";
|
|
42
|
-
seriesId: import("../index.js").SeriesId;
|
|
43
|
-
dataIndex?: number;
|
|
44
|
-
} | {
|
|
45
|
-
type: "pie";
|
|
46
|
-
seriesId: import("../index.js").SeriesId;
|
|
47
|
-
dataIndex?: number;
|
|
48
|
-
} | {
|
|
49
|
-
type: "radar";
|
|
50
|
-
seriesId: import("../index.js").SeriesId;
|
|
51
|
-
dataIndex?: number;
|
|
52
|
-
} | null) => boolean;
|
|
53
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useItemHighlightedGetter = useItemHighlightedGetter;
|
|
8
|
-
var _useStore = require("../internals/store/useStore");
|
|
9
|
-
var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors");
|
|
10
|
-
/**
|
|
11
|
-
* A hook to check the highlighted state of multiple items.
|
|
12
|
-
* If you're interested by a single one, consider using `useItemHighlighted`.
|
|
13
|
-
*
|
|
14
|
-
* Warning: highlighted and faded can both be true at the same time.
|
|
15
|
-
* We recommend to first test if item is highlighted: `const faded = !highlighted && isFaded(item)`
|
|
16
|
-
* @returns {{ isHighlighted, isFaded }} callbacks to get the state of the item.
|
|
17
|
-
*/
|
|
18
|
-
function useItemHighlightedGetter() {
|
|
19
|
-
const store = (0, _useStore.useStore)();
|
|
20
|
-
const isHighlighted = store.use(_useChartHighlight.selectorChartsIsHighlightedCallback);
|
|
21
|
-
const isFaded = store.use(_useChartHighlight.selectorChartsIsFadedCallback);
|
|
22
|
-
return {
|
|
23
|
-
isHighlighted,
|
|
24
|
-
isFaded
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { useStore } from "../internals/store/useStore.mjs";
|
|
4
|
-
import { selectorChartsIsFadedCallback, selectorChartsIsHighlightedCallback } from "../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* A hook to check the highlighted state of multiple items.
|
|
7
|
-
* If you're interested by a single one, consider using `useItemHighlighted`.
|
|
8
|
-
*
|
|
9
|
-
* Warning: highlighted and faded can both be true at the same time.
|
|
10
|
-
* We recommend to first test if item is highlighted: `const faded = !highlighted && isFaded(item)`
|
|
11
|
-
* @returns {{ isHighlighted, isFaded }} callbacks to get the state of the item.
|
|
12
|
-
*/
|
|
13
|
-
export function useItemHighlightedGetter() {
|
|
14
|
-
const store = useStore();
|
|
15
|
-
const isHighlighted = store.use(selectorChartsIsHighlightedCallback);
|
|
16
|
-
const isFaded = store.use(selectorChartsIsFadedCallback);
|
|
17
|
-
return {
|
|
18
|
-
isHighlighted,
|
|
19
|
-
isFaded
|
|
20
|
-
};
|
|
21
|
-
}
|