@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,9 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from "../models/seriesType/common.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface LineHighlightElementClasses {
|
|
4
7
|
/** Styles applied to the root element. */
|
|
5
8
|
root: string;
|
|
6
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
12
|
+
*/
|
|
7
13
|
export type HighlightElementClassKey = keyof LineHighlightElementClasses;
|
|
8
14
|
interface LineHighlightElementCommonProps {
|
|
9
15
|
seriesId: SeriesId;
|
|
@@ -12,7 +18,13 @@ interface LineHighlightElementCommonProps {
|
|
|
12
18
|
y: number;
|
|
13
19
|
classes?: Partial<LineHighlightElementClasses>;
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
23
|
+
*/
|
|
15
24
|
export declare function getHighlightElementUtilityClass(slot: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
27
|
+
*/
|
|
16
28
|
export declare const lineHighlightElementClasses: LineHighlightElementClasses;
|
|
17
29
|
export type LineHighlightElementProps = (LineHighlightElementCommonProps & {
|
|
18
30
|
shape: 'circle';
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type SeriesId } from "../models/seriesType/common.js";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
5
|
+
*/
|
|
3
6
|
export interface LineHighlightElementClasses {
|
|
4
7
|
/** Styles applied to the root element. */
|
|
5
8
|
root: string;
|
|
6
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
12
|
+
*/
|
|
7
13
|
export type HighlightElementClassKey = keyof LineHighlightElementClasses;
|
|
8
14
|
interface LineHighlightElementCommonProps {
|
|
9
15
|
seriesId: SeriesId;
|
|
@@ -12,7 +18,13 @@ interface LineHighlightElementCommonProps {
|
|
|
12
18
|
y: number;
|
|
13
19
|
classes?: Partial<LineHighlightElementClasses>;
|
|
14
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
23
|
+
*/
|
|
15
24
|
export declare function getHighlightElementUtilityClass(slot: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
27
|
+
*/
|
|
16
28
|
export declare const lineHighlightElementClasses: LineHighlightElementClasses;
|
|
17
29
|
export type LineHighlightElementProps = (LineHighlightElementCommonProps & {
|
|
18
30
|
shape: 'circle';
|
|
@@ -19,13 +19,31 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
19
19
|
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
20
20
|
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
21
21
|
var _getSymbol = require("../internals/getSymbol");
|
|
22
|
+
var _lineClasses = require("./lineClasses");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "shape"];
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
33
|
+
*/
|
|
24
34
|
function getHighlightElementUtilityClass(slot) {
|
|
25
35
|
return (0, _generateUtilityClass.default)('MuiHighlightElement', slot);
|
|
26
36
|
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
40
|
+
*/
|
|
27
41
|
const lineHighlightElementClasses = exports.lineHighlightElementClasses = (0, _generateUtilityClasses.default)('MuiHighlightElement', ['root']);
|
|
28
|
-
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
45
|
+
*/
|
|
46
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
29
47
|
const {
|
|
30
48
|
classes,
|
|
31
49
|
seriesId
|
|
@@ -53,7 +71,8 @@ function LineHighlightElement(props) {
|
|
|
53
71
|
shape
|
|
54
72
|
} = props,
|
|
55
73
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
56
|
-
const classes = useUtilityClasses(
|
|
74
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
75
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(props);
|
|
57
76
|
const Element = shape === 'circle' ? 'circle' : 'path';
|
|
58
77
|
const additionalProps = shape === 'circle' ? {
|
|
59
78
|
cx: 0,
|
|
@@ -71,7 +90,7 @@ function LineHighlightElement(props) {
|
|
|
71
90
|
};
|
|
72
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Element, (0, _extends2.default)({
|
|
73
92
|
pointerEvents: "none",
|
|
74
|
-
className: classes.root
|
|
93
|
+
className: `${classes.highlight} ${deprecatedClasses.root}`,
|
|
75
94
|
transform: `translate(${x} ${y})`,
|
|
76
95
|
fill: color
|
|
77
96
|
}, transformOrigin, additionalProps, other));
|
|
@@ -11,12 +11,32 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
11
11
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
12
12
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
13
13
|
import { getSymbol } from "../internals/getSymbol.mjs";
|
|
14
|
+
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `LineClasses` from `./lineClasses` instead.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `LineClassKey` from `./lineClasses` instead.
|
|
22
|
+
*/
|
|
14
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use `getLineUtilityClass` from `./lineClasses` instead.
|
|
26
|
+
*/
|
|
15
27
|
export function getHighlightElementUtilityClass(slot) {
|
|
16
28
|
return generateUtilityClass('MuiHighlightElement', slot);
|
|
17
29
|
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use `lineClasses` from `./lineClasses` instead.
|
|
33
|
+
*/
|
|
18
34
|
export const lineHighlightElementClasses = generateUtilityClasses('MuiHighlightElement', ['root']);
|
|
19
|
-
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use `useUtilityClasses` from `./lineClasses` instead.
|
|
38
|
+
*/
|
|
39
|
+
const useDeprecatedUtilityClasses = ownerState => {
|
|
20
40
|
const {
|
|
21
41
|
classes,
|
|
22
42
|
seriesId
|
|
@@ -44,7 +64,8 @@ function LineHighlightElement(props) {
|
|
|
44
64
|
shape
|
|
45
65
|
} = props,
|
|
46
66
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
47
|
-
const classes =
|
|
67
|
+
const classes = useLineUtilityClasses();
|
|
68
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(props);
|
|
48
69
|
const Element = shape === 'circle' ? 'circle' : 'path';
|
|
49
70
|
const additionalProps = shape === 'circle' ? {
|
|
50
71
|
cx: 0,
|
|
@@ -62,7 +83,7 @@ function LineHighlightElement(props) {
|
|
|
62
83
|
};
|
|
63
84
|
return /*#__PURE__*/_jsx(Element, _extends({
|
|
64
85
|
pointerEvents: "none",
|
|
65
|
-
className: classes.root
|
|
86
|
+
className: `${classes.highlight} ${deprecatedClasses.root}`,
|
|
66
87
|
transform: `translate(${x} ${y})`,
|
|
67
88
|
fill: color
|
|
68
89
|
}, transformOrigin, additionalProps, other));
|
package/LineChart/LinePlot.js
CHANGED
|
@@ -12,19 +12,21 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
16
|
var _LineElement = require("./LineElement");
|
|
16
17
|
var _useSkipAnimation = require("../hooks/useSkipAnimation");
|
|
17
18
|
var _hooks = require("../hooks");
|
|
18
19
|
var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
|
|
19
20
|
var _useLinePlotData = require("./useLinePlotData");
|
|
20
21
|
var _animation = require("../internals/animation/animation");
|
|
22
|
+
var _lineClasses = require("./lineClasses");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
-
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
24
|
+
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick", "className"];
|
|
23
25
|
const LinePlotRoot = (0, _styles.styled)('g', {
|
|
24
|
-
name: '
|
|
26
|
+
name: 'MuiLinePlot',
|
|
25
27
|
slot: 'Root'
|
|
26
28
|
})({
|
|
27
|
-
[`& .${
|
|
29
|
+
[`& .${_lineClasses.lineClasses.line}`]: {
|
|
28
30
|
transitionProperty: 'opacity, fill',
|
|
29
31
|
transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
|
|
30
32
|
transitionTimingFunction: _animation.ANIMATION_TIMING_FUNCTION
|
|
@@ -55,13 +57,17 @@ function LinePlot(props) {
|
|
|
55
57
|
slots,
|
|
56
58
|
slotProps,
|
|
57
59
|
skipAnimation: inSkipAnimation,
|
|
58
|
-
onItemClick
|
|
60
|
+
onItemClick,
|
|
61
|
+
className
|
|
59
62
|
} = props,
|
|
60
63
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
61
64
|
const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
|
|
62
65
|
const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
|
|
63
66
|
const completedData = useAggregatedData();
|
|
64
|
-
|
|
67
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinePlotRoot, (0, _extends2.default)({
|
|
69
|
+
className: (0, _clsx.default)(classes.linePlot, className)
|
|
70
|
+
}, other, {
|
|
65
71
|
children: completedData.map(({
|
|
66
72
|
d,
|
|
67
73
|
seriesId,
|
package/LineChart/LinePlot.mjs
CHANGED
|
@@ -2,22 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick", "className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
-
import
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { LineElement } from "./LineElement.mjs";
|
|
10
11
|
import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
|
|
11
12
|
import { useXAxes, useYAxes } from "../hooks/index.mjs";
|
|
12
13
|
import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
|
|
13
14
|
import { useLinePlotData } from "./useLinePlotData.mjs";
|
|
14
15
|
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
16
|
+
import { lineClasses, useUtilityClasses } from "./lineClasses.mjs";
|
|
15
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
18
|
const LinePlotRoot = styled('g', {
|
|
17
|
-
name: '
|
|
19
|
+
name: 'MuiLinePlot',
|
|
18
20
|
slot: 'Root'
|
|
19
21
|
})({
|
|
20
|
-
[`& .${
|
|
22
|
+
[`& .${lineClasses.line}`]: {
|
|
21
23
|
transitionProperty: 'opacity, fill',
|
|
22
24
|
transitionDuration: `${ANIMATION_DURATION_MS}ms`,
|
|
23
25
|
transitionTimingFunction: ANIMATION_TIMING_FUNCTION
|
|
@@ -48,13 +50,17 @@ function LinePlot(props) {
|
|
|
48
50
|
slots,
|
|
49
51
|
slotProps,
|
|
50
52
|
skipAnimation: inSkipAnimation,
|
|
51
|
-
onItemClick
|
|
53
|
+
onItemClick,
|
|
54
|
+
className
|
|
52
55
|
} = props,
|
|
53
56
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
54
57
|
const isZoomInteracting = useInternalIsZoomInteracting();
|
|
55
58
|
const skipAnimation = useSkipAnimation(isZoomInteracting || inSkipAnimation);
|
|
56
59
|
const completedData = useAggregatedData();
|
|
57
|
-
|
|
60
|
+
const classes = useUtilityClasses();
|
|
61
|
+
return /*#__PURE__*/_jsx(LinePlotRoot, _extends({
|
|
62
|
+
className: clsx(classes.linePlot, className)
|
|
63
|
+
}, other, {
|
|
58
64
|
children: completedData.map(({
|
|
59
65
|
d,
|
|
60
66
|
seriesId,
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -17,6 +17,7 @@ var _animation = require("../internals/animation/animation");
|
|
|
17
17
|
var _getSymbol = require("../internals/getSymbol");
|
|
18
18
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
19
19
|
var _markElementClasses = require("./markElementClasses");
|
|
20
|
+
var _lineClasses = require("./lineClasses");
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "hidden", "style"];
|
|
22
23
|
const MarkElementPath = (0, _styles.styled)('path', {
|
|
@@ -71,14 +72,18 @@ function MarkElement(props) {
|
|
|
71
72
|
isFaded,
|
|
72
73
|
skipAnimation
|
|
73
74
|
};
|
|
74
|
-
const classes = (0,
|
|
75
|
+
const classes = (0, _lineClasses.useUtilityClasses)({
|
|
76
|
+
skipAnimation,
|
|
77
|
+
classes: innerClasses
|
|
78
|
+
});
|
|
79
|
+
const deprecatedClasses = (0, _markElementClasses.useUtilityClasses)(ownerState);
|
|
75
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, {
|
|
76
81
|
style: (0, _extends2.default)({}, style, {
|
|
77
82
|
transform: `translate(${x}px, ${y}px)`,
|
|
78
83
|
transformOrigin: `${x}px ${y}px`
|
|
79
84
|
}),
|
|
80
85
|
ownerState: ownerState,
|
|
81
|
-
className: classes.root
|
|
86
|
+
className: `${classes.mark} ${deprecatedClasses.root}`,
|
|
82
87
|
d: (0, _d3Shape.symbol)(_d3Shape.symbolsFill[(0, _getSymbol.getSymbol)(shape)])(),
|
|
83
88
|
onClick: onClick,
|
|
84
89
|
cursor: onClick ? 'pointer' : 'unset',
|
|
@@ -86,6 +91,8 @@ function MarkElement(props) {
|
|
|
86
91
|
}, interactionProps, {
|
|
87
92
|
"data-highlighted": isHighlighted || undefined,
|
|
88
93
|
"data-faded": isFaded || undefined,
|
|
94
|
+
"data-series-id": seriesId,
|
|
95
|
+
"data-index": dataIndex,
|
|
89
96
|
opacity: hidden ? 0 : 1,
|
|
90
97
|
strokeWidth: 2,
|
|
91
98
|
stroke: color
|
|
@@ -10,7 +10,8 @@ import { symbol as d3Symbol, symbolsFill as d3SymbolsFill } from '@mui/x-charts-
|
|
|
10
10
|
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
11
11
|
import { getSymbol } from "../internals/getSymbol.mjs";
|
|
12
12
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
13
|
-
import { markElementClasses, useUtilityClasses } from "./markElementClasses.mjs";
|
|
13
|
+
import { markElementClasses, useUtilityClasses as useDeprecatedUtilityClasses } from "./markElementClasses.mjs";
|
|
14
|
+
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const MarkElementPath = styled('path', {
|
|
16
17
|
name: 'MuiMarkElement',
|
|
@@ -64,14 +65,18 @@ function MarkElement(props) {
|
|
|
64
65
|
isFaded,
|
|
65
66
|
skipAnimation
|
|
66
67
|
};
|
|
67
|
-
const classes =
|
|
68
|
+
const classes = useLineUtilityClasses({
|
|
69
|
+
skipAnimation,
|
|
70
|
+
classes: innerClasses
|
|
71
|
+
});
|
|
72
|
+
const deprecatedClasses = useDeprecatedUtilityClasses(ownerState);
|
|
68
73
|
return /*#__PURE__*/_jsx(MarkElementPath, _extends({}, other, {
|
|
69
74
|
style: _extends({}, style, {
|
|
70
75
|
transform: `translate(${x}px, ${y}px)`,
|
|
71
76
|
transformOrigin: `${x}px ${y}px`
|
|
72
77
|
}),
|
|
73
78
|
ownerState: ownerState,
|
|
74
|
-
className: classes.root
|
|
79
|
+
className: `${classes.mark} ${deprecatedClasses.root}`,
|
|
75
80
|
d: d3Symbol(d3SymbolsFill[getSymbol(shape)])(),
|
|
76
81
|
onClick: onClick,
|
|
77
82
|
cursor: onClick ? 'pointer' : 'unset',
|
|
@@ -79,6 +84,8 @@ function MarkElement(props) {
|
|
|
79
84
|
}, interactionProps, {
|
|
80
85
|
"data-highlighted": isHighlighted || undefined,
|
|
81
86
|
"data-faded": isFaded || undefined,
|
|
87
|
+
"data-series-id": seriesId,
|
|
88
|
+
"data-index": dataIndex,
|
|
82
89
|
opacity: hidden ? 0 : 1,
|
|
83
90
|
strokeWidth: 2,
|
|
84
91
|
stroke: color
|
package/LineChart/MarkPlot.js
CHANGED
|
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _styles = require("@mui/material/styles");
|
|
15
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
16
|
var _useSkipAnimation = require("../hooks/useSkipAnimation");
|
|
15
17
|
var _CircleMarkElement = require("./CircleMarkElement");
|
|
16
18
|
var _MarkElement = require("./MarkElement");
|
|
@@ -19,8 +21,14 @@ var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins
|
|
|
19
21
|
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
20
22
|
var _ChartProvider = require("../context/ChartProvider");
|
|
21
23
|
var _useMarkPlotData = require("./useMarkPlotData");
|
|
24
|
+
var _lineClasses = require("./lineClasses");
|
|
22
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
26
|
+
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick", "className"];
|
|
27
|
+
const MarkPlotRoot = (0, _styles.styled)('g', {
|
|
28
|
+
name: 'MuiMarkPlot',
|
|
29
|
+
slot: 'Root'
|
|
30
|
+
})({});
|
|
31
|
+
|
|
24
32
|
/**
|
|
25
33
|
* Demos:
|
|
26
34
|
*
|
|
@@ -36,7 +44,8 @@ function MarkPlot(props) {
|
|
|
36
44
|
slots,
|
|
37
45
|
slotProps,
|
|
38
46
|
skipAnimation: inSkipAnimation,
|
|
39
|
-
onItemClick
|
|
47
|
+
onItemClick,
|
|
48
|
+
className
|
|
40
49
|
} = props,
|
|
41
50
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
42
51
|
const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
|
|
@@ -50,10 +59,7 @@ function MarkPlot(props) {
|
|
|
50
59
|
const {
|
|
51
60
|
store
|
|
52
61
|
} = (0, _ChartProvider.useChartContext)();
|
|
53
|
-
const
|
|
54
|
-
isFaded,
|
|
55
|
-
isHighlighted
|
|
56
|
-
} = (0, _hooks.useItemHighlightedGetter)();
|
|
62
|
+
const getHighlightState = (0, _hooks.useItemHighlightStateGetter)();
|
|
57
63
|
const xAxisHighlightIndexes = store.use(_useChartCartesianAxis.selectorChartsHighlightXAxisIndex);
|
|
58
64
|
const highlightedItems = React.useMemo(() => {
|
|
59
65
|
const rep = {};
|
|
@@ -70,7 +76,10 @@ function MarkPlot(props) {
|
|
|
70
76
|
return rep;
|
|
71
77
|
}, [xAxisHighlightIndexes]);
|
|
72
78
|
const completedData = (0, _useMarkPlotData.useMarkPlotData)(xAxis, yAxis);
|
|
73
|
-
|
|
79
|
+
const classes = (0, _lineClasses.useUtilityClasses)();
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkPlotRoot, (0, _extends2.default)({
|
|
81
|
+
className: (0, _clsx.default)(classes.markPlot, className)
|
|
82
|
+
}, other, {
|
|
74
83
|
children: completedData.map(({
|
|
75
84
|
seriesId,
|
|
76
85
|
clipId,
|
|
@@ -84,8 +93,9 @@ function MarkPlot(props) {
|
|
|
84
93
|
type: 'line',
|
|
85
94
|
seriesId
|
|
86
95
|
};
|
|
87
|
-
const
|
|
88
|
-
const
|
|
96
|
+
const seriesHighlightState = getHighlightState(identifier);
|
|
97
|
+
const isSeriesHighlighted = seriesHighlightState === 'highlighted';
|
|
98
|
+
const isSeriesFaded = seriesHighlightState === 'faded';
|
|
89
99
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
90
100
|
clipPath: `url(#${clipId})`,
|
|
91
101
|
"data-series": seriesId,
|
package/LineChart/MarkPlot.mjs
CHANGED
|
@@ -2,18 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick"];
|
|
5
|
+
const _excluded = ["slots", "slotProps", "skipAnimation", "onItemClick", "className"];
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import * as React from 'react';
|
|
8
|
+
import { styled } from '@mui/material/styles';
|
|
9
|
+
import clsx from 'clsx';
|
|
8
10
|
import { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
|
|
9
11
|
import { CircleMarkElement } from "./CircleMarkElement.mjs";
|
|
10
12
|
import { MarkElement } from "./MarkElement.mjs";
|
|
11
|
-
import {
|
|
13
|
+
import { useItemHighlightStateGetter, useXAxes, useYAxes } from "../hooks/index.mjs";
|
|
12
14
|
import { useInternalIsZoomInteracting } from "../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting.mjs";
|
|
13
15
|
import { selectorChartsHighlightXAxisIndex } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs";
|
|
14
16
|
import { useChartContext } from "../context/ChartProvider/index.mjs";
|
|
15
17
|
import { useMarkPlotData } from "./useMarkPlotData.mjs";
|
|
18
|
+
import { useUtilityClasses } from "./lineClasses.mjs";
|
|
16
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
const MarkPlotRoot = styled('g', {
|
|
21
|
+
name: 'MuiMarkPlot',
|
|
22
|
+
slot: 'Root'
|
|
23
|
+
})({});
|
|
24
|
+
|
|
17
25
|
/**
|
|
18
26
|
* Demos:
|
|
19
27
|
*
|
|
@@ -29,7 +37,8 @@ function MarkPlot(props) {
|
|
|
29
37
|
slots,
|
|
30
38
|
slotProps,
|
|
31
39
|
skipAnimation: inSkipAnimation,
|
|
32
|
-
onItemClick
|
|
40
|
+
onItemClick,
|
|
41
|
+
className
|
|
33
42
|
} = props,
|
|
34
43
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
35
44
|
const isZoomInteracting = useInternalIsZoomInteracting();
|
|
@@ -43,10 +52,7 @@ function MarkPlot(props) {
|
|
|
43
52
|
const {
|
|
44
53
|
store
|
|
45
54
|
} = useChartContext();
|
|
46
|
-
const
|
|
47
|
-
isFaded,
|
|
48
|
-
isHighlighted
|
|
49
|
-
} = useItemHighlightedGetter();
|
|
55
|
+
const getHighlightState = useItemHighlightStateGetter();
|
|
50
56
|
const xAxisHighlightIndexes = store.use(selectorChartsHighlightXAxisIndex);
|
|
51
57
|
const highlightedItems = React.useMemo(() => {
|
|
52
58
|
const rep = {};
|
|
@@ -63,7 +69,10 @@ function MarkPlot(props) {
|
|
|
63
69
|
return rep;
|
|
64
70
|
}, [xAxisHighlightIndexes]);
|
|
65
71
|
const completedData = useMarkPlotData(xAxis, yAxis);
|
|
66
|
-
|
|
72
|
+
const classes = useUtilityClasses();
|
|
73
|
+
return /*#__PURE__*/_jsx(MarkPlotRoot, _extends({
|
|
74
|
+
className: clsx(classes.markPlot, className)
|
|
75
|
+
}, other, {
|
|
67
76
|
children: completedData.map(({
|
|
68
77
|
seriesId,
|
|
69
78
|
clipId,
|
|
@@ -77,8 +86,9 @@ function MarkPlot(props) {
|
|
|
77
86
|
type: 'line',
|
|
78
87
|
seriesId
|
|
79
88
|
};
|
|
80
|
-
const
|
|
81
|
-
const
|
|
89
|
+
const seriesHighlightState = getHighlightState(identifier);
|
|
90
|
+
const isSeriesHighlighted = seriesHighlightState === 'highlighted';
|
|
91
|
+
const isSeriesFaded = seriesHighlightState === 'faded';
|
|
82
92
|
return /*#__PURE__*/_jsx("g", {
|
|
83
93
|
clipPath: `url(#${clipId})`,
|
|
84
94
|
"data-series": seriesId,
|
package/LineChart/index.d.mts
CHANGED
|
@@ -12,4 +12,6 @@ export * from "./FocusedLineMark.mjs";
|
|
|
12
12
|
export * from "./LineHighlightElement.mjs";
|
|
13
13
|
export * from "./LineChart.plugins.mjs";
|
|
14
14
|
export type { MarkElementClasses, MarkElementClassKey } from "./markElementClasses.mjs";
|
|
15
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
15
|
+
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
16
|
+
export { lineClasses } from "./lineClasses.mjs";
|
|
17
|
+
export type { LineClassKey, LineClasses } from "./lineClasses.mjs";
|
package/LineChart/index.d.ts
CHANGED
|
@@ -12,4 +12,6 @@ export * from "./FocusedLineMark.js";
|
|
|
12
12
|
export * from "./LineHighlightElement.js";
|
|
13
13
|
export * from "./LineChart.plugins.js";
|
|
14
14
|
export type { MarkElementClasses, MarkElementClassKey } from "./markElementClasses.js";
|
|
15
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.js";
|
|
15
|
+
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.js";
|
|
16
|
+
export { lineClasses } from "./lineClasses.js";
|
|
17
|
+
export type { LineClassKey, LineClasses } from "./lineClasses.js";
|
package/LineChart/index.js
CHANGED
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
getMarkElementUtilityClass: true,
|
|
8
|
-
markElementClasses: true
|
|
8
|
+
markElementClasses: true,
|
|
9
|
+
lineClasses: true
|
|
9
10
|
};
|
|
10
11
|
Object.defineProperty(exports, "getMarkElementUtilityClass", {
|
|
11
12
|
enumerable: true,
|
|
@@ -13,6 +14,12 @@ Object.defineProperty(exports, "getMarkElementUtilityClass", {
|
|
|
13
14
|
return _markElementClasses.getMarkElementUtilityClass;
|
|
14
15
|
}
|
|
15
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "lineClasses", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _lineClasses.lineClasses;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
16
23
|
Object.defineProperty(exports, "markElementClasses", {
|
|
17
24
|
enumerable: true,
|
|
18
25
|
get: function () {
|
|
@@ -175,4 +182,5 @@ Object.keys(_LineChart2).forEach(function (key) {
|
|
|
175
182
|
}
|
|
176
183
|
});
|
|
177
184
|
});
|
|
178
|
-
var _markElementClasses = require("./markElementClasses");
|
|
185
|
+
var _markElementClasses = require("./markElementClasses");
|
|
186
|
+
var _lineClasses = require("./lineClasses");
|
package/LineChart/index.mjs
CHANGED
|
@@ -11,4 +11,5 @@ export * from "./MarkElement.mjs";
|
|
|
11
11
|
export * from "./FocusedLineMark.mjs";
|
|
12
12
|
export * from "./LineHighlightElement.mjs";
|
|
13
13
|
export * from "./LineChart.plugins.mjs";
|
|
14
|
-
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
14
|
+
export { getMarkElementUtilityClass, markElementClasses } from "./markElementClasses.mjs";
|
|
15
|
+
export { lineClasses } from "./lineClasses.mjs";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type SeriesId } from "../models/seriesType/common.mjs";
|
|
2
|
+
export interface LineClasses {
|
|
3
|
+
/** Styles applied to the area element. */
|
|
4
|
+
area: string;
|
|
5
|
+
/** Styles applied to the line element. */
|
|
6
|
+
line: string;
|
|
7
|
+
/** Styles applied to the mark element. */
|
|
8
|
+
mark: string;
|
|
9
|
+
/** Styles applied to a mark element when it is animated. */
|
|
10
|
+
markAnimate: string;
|
|
11
|
+
/** Styles applied to the highlight element. */
|
|
12
|
+
highlight: string;
|
|
13
|
+
/** Styles applied to the AreaPlot root element. */
|
|
14
|
+
areaPlot: string;
|
|
15
|
+
/** Styles applied to the LinePlot root element. */
|
|
16
|
+
linePlot: string;
|
|
17
|
+
/** Styles applied to the MarkPlot root element. */
|
|
18
|
+
markPlot: string;
|
|
19
|
+
}
|
|
20
|
+
export type LineClassKey = keyof LineClasses;
|
|
21
|
+
export interface MarkElementOwnerState {
|
|
22
|
+
seriesId: SeriesId;
|
|
23
|
+
isFaded: boolean;
|
|
24
|
+
isHighlighted: boolean;
|
|
25
|
+
classes?: Partial<LineClasses>;
|
|
26
|
+
skipAnimation?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function getLineUtilityClass(slot: string): string;
|
|
29
|
+
export declare const lineClasses: LineClasses;
|
|
30
|
+
export interface UseUtilityClassesOptions {
|
|
31
|
+
skipAnimation?: boolean;
|
|
32
|
+
classes?: Partial<LineClasses>;
|
|
33
|
+
}
|
|
34
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"line" | "area" | "mark" | "highlight" | "areaPlot" | "linePlot" | "markPlot", string>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type SeriesId } from "../models/seriesType/common.js";
|
|
2
|
+
export interface LineClasses {
|
|
3
|
+
/** Styles applied to the area element. */
|
|
4
|
+
area: string;
|
|
5
|
+
/** Styles applied to the line element. */
|
|
6
|
+
line: string;
|
|
7
|
+
/** Styles applied to the mark element. */
|
|
8
|
+
mark: string;
|
|
9
|
+
/** Styles applied to a mark element when it is animated. */
|
|
10
|
+
markAnimate: string;
|
|
11
|
+
/** Styles applied to the highlight element. */
|
|
12
|
+
highlight: string;
|
|
13
|
+
/** Styles applied to the AreaPlot root element. */
|
|
14
|
+
areaPlot: string;
|
|
15
|
+
/** Styles applied to the LinePlot root element. */
|
|
16
|
+
linePlot: string;
|
|
17
|
+
/** Styles applied to the MarkPlot root element. */
|
|
18
|
+
markPlot: string;
|
|
19
|
+
}
|
|
20
|
+
export type LineClassKey = keyof LineClasses;
|
|
21
|
+
export interface MarkElementOwnerState {
|
|
22
|
+
seriesId: SeriesId;
|
|
23
|
+
isFaded: boolean;
|
|
24
|
+
isHighlighted: boolean;
|
|
25
|
+
classes?: Partial<LineClasses>;
|
|
26
|
+
skipAnimation?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function getLineUtilityClass(slot: string): string;
|
|
29
|
+
export declare const lineClasses: LineClasses;
|
|
30
|
+
export interface UseUtilityClassesOptions {
|
|
31
|
+
skipAnimation?: boolean;
|
|
32
|
+
classes?: Partial<LineClasses>;
|
|
33
|
+
}
|
|
34
|
+
export declare const useUtilityClasses: (options?: UseUtilityClassesOptions) => Record<"line" | "area" | "mark" | "highlight" | "areaPlot" | "linePlot" | "markPlot", string>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getLineUtilityClass = getLineUtilityClass;
|
|
8
|
+
exports.useUtilityClasses = exports.lineClasses = void 0;
|
|
9
|
+
var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateUtilityClass"));
|
|
10
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
|
+
var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generateUtilityClasses"));
|
|
12
|
+
function getLineUtilityClass(slot) {
|
|
13
|
+
return (0, _generateUtilityClass.default)('MuiLineChart', slot);
|
|
14
|
+
}
|
|
15
|
+
const lineClasses = exports.lineClasses = (0, _generateUtilityClasses.default)('MuiLineChart', ['area', 'line', 'mark', 'markAnimate', 'highlight', 'areaPlot', 'linePlot', 'markPlot']);
|
|
16
|
+
const useUtilityClasses = options => {
|
|
17
|
+
const {
|
|
18
|
+
skipAnimation,
|
|
19
|
+
classes
|
|
20
|
+
} = options ?? {};
|
|
21
|
+
const slots = {
|
|
22
|
+
area: ['area'],
|
|
23
|
+
line: ['line'],
|
|
24
|
+
mark: ['mark', !skipAnimation && 'markAnimate'],
|
|
25
|
+
highlight: ['highlight'],
|
|
26
|
+
areaPlot: ['areaPlot'],
|
|
27
|
+
linePlot: ['linePlot'],
|
|
28
|
+
markPlot: ['markPlot']
|
|
29
|
+
};
|
|
30
|
+
return (0, _composeClasses.default)(slots, getLineUtilityClass, classes);
|
|
31
|
+
};
|
|
32
|
+
exports.useUtilityClasses = useUtilityClasses;
|