@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,6 +1,14 @@
|
|
|
1
1
|
export const typeSerializer = type => `Type(${type})`;
|
|
2
2
|
export const seriesIdSerializer = id => `Series(${id})`;
|
|
3
3
|
export const dataIndexSerializer = dataIndex => dataIndex === undefined ? '' : `Index(${dataIndex})`;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Serializes an identifier using type, seriesId, and dataIndex properties.
|
|
7
|
+
*
|
|
8
|
+
* The generic constraint ensures this can only be used for series types whose
|
|
9
|
+
* identifier actually includes `dataIndex`. Series types with different identifier
|
|
10
|
+
* properties (like heatmap's xIndex/yIndex) must provide their own serializer.
|
|
11
|
+
*/
|
|
4
12
|
export const identifierSerializerSeriesIdDataIndex = identifier => {
|
|
5
13
|
return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}${dataIndexSerializer(identifier.dataIndex)}`;
|
|
6
14
|
};
|
|
@@ -9,6 +9,6 @@ import { type UseChartZAxisSignature } from "./featurePlugins/useChartZAxis/inde
|
|
|
9
9
|
import { type UseChartBrushSignature } from "./featurePlugins/useChartBrush/index.mjs";
|
|
10
10
|
import { type UseChartVisibilityManagerSignature } from "./featurePlugins/useChartVisibilityManager/index.mjs";
|
|
11
11
|
import { type UseChartTooltipSignature } from "./featurePlugins/useChartTooltip/index.mjs";
|
|
12
|
-
export type AllPluginSignatures<
|
|
13
|
-
export type DefaultPluginSignatures<
|
|
12
|
+
export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
|
|
13
|
+
export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
|
|
14
14
|
export declare const DEFAULT_PLUGINS: readonly [import("./models/index.mjs").ChartPlugin<UseChartZAxisSignature>, import("./models/index.mjs").ChartPlugin<UseChartBrushSignature>, import("./models/index.mjs").ChartPlugin<UseChartTooltipSignature<any>>, import("./models/index.mjs").ChartPlugin<UseChartInteractionSignature>, import("./models/index.mjs").ChartPlugin<UseChartCartesianAxisSignature<any>>, import("./models/index.mjs").ChartPlugin<UseChartHighlightSignature<any>>, import("./models/index.mjs").ChartPlugin<UseChartVisibilityManagerSignature<any>>, import("./models/index.mjs").ChartPlugin<UseChartClosestPointSignature>, import("./models/index.mjs").ChartPlugin<UseChartKeyboardNavigationSignature>];
|
|
@@ -9,6 +9,6 @@ import { type UseChartZAxisSignature } from "./featurePlugins/useChartZAxis/inde
|
|
|
9
9
|
import { type UseChartBrushSignature } from "./featurePlugins/useChartBrush/index.js";
|
|
10
10
|
import { type UseChartVisibilityManagerSignature } from "./featurePlugins/useChartVisibilityManager/index.js";
|
|
11
11
|
import { type UseChartTooltipSignature } from "./featurePlugins/useChartTooltip/index.js";
|
|
12
|
-
export type AllPluginSignatures<
|
|
13
|
-
export type DefaultPluginSignatures<
|
|
12
|
+
export type AllPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartPolarAxisSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
|
|
13
|
+
export type DefaultPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartCartesianAxisSignature<SeriesType>, UseChartHighlightSignature<SeriesType>, UseChartVisibilityManagerSignature<SeriesType>, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
|
|
14
14
|
export declare const DEFAULT_PLUGINS: readonly [import("./models/index.js").ChartPlugin<UseChartZAxisSignature>, import("./models/index.js").ChartPlugin<UseChartBrushSignature>, import("./models/index.js").ChartPlugin<UseChartTooltipSignature<any>>, import("./models/index.js").ChartPlugin<UseChartInteractionSignature>, import("./models/index.js").ChartPlugin<UseChartCartesianAxisSignature<any>>, import("./models/index.js").ChartPlugin<UseChartHighlightSignature<any>>, import("./models/index.js").ChartPlugin<UseChartVisibilityManagerSignature<any>>, import("./models/index.js").ChartPlugin<UseChartClosestPointSignature>, import("./models/index.js").ChartPlugin<UseChartKeyboardNavigationSignature>];
|
|
@@ -12,5 +12,5 @@ import type { ChartSeriesType } from "../../../models/seriesType/config.mjs";
|
|
|
12
12
|
* These plugins are used by the Charts components.
|
|
13
13
|
*/
|
|
14
14
|
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.mjs").ChartPlugin<UseChartElementRefSignature>, import("../models/index.mjs").ChartPlugin<UseChartIdSignature>, import("../models/index.mjs").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.mjs").ChartPlugin<UseChartExperimentalFeaturesSignature>, import("../models/index.mjs").ChartPlugin<UseChartDimensionsSignature>, import("../models/index.mjs").ChartPlugin<UseChartSeriesSignature>, import("../models/index.mjs").ChartPlugin<UseChartInteractionListenerSignature>, import("../models/index.mjs").ChartPlugin<UseChartAnimationSignature>];
|
|
15
|
-
export type ChartCorePluginSignatures<
|
|
15
|
+
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature, UseChartDimensionsSignature, UseChartSeriesSignature<SeriesType>, UseChartAnimationSignature, UseChartInteractionListenerSignature];
|
|
16
16
|
export interface ChartCorePluginParameters extends UseChartIdParameters, UseChartSeriesConfigParameters {}
|
|
@@ -12,5 +12,5 @@ import type { ChartSeriesType } from "../../../models/seriesType/config.js";
|
|
|
12
12
|
* These plugins are used by the Charts components.
|
|
13
13
|
*/
|
|
14
14
|
export declare const CHART_CORE_PLUGINS: readonly [import("../models/index.js").ChartPlugin<UseChartElementRefSignature>, import("../models/index.js").ChartPlugin<UseChartIdSignature>, import("../models/index.js").ChartPlugin<UseChartSeriesConfigSignature>, import("../models/index.js").ChartPlugin<UseChartExperimentalFeaturesSignature>, import("../models/index.js").ChartPlugin<UseChartDimensionsSignature>, import("../models/index.js").ChartPlugin<UseChartSeriesSignature>, import("../models/index.js").ChartPlugin<UseChartInteractionListenerSignature>, import("../models/index.js").ChartPlugin<UseChartAnimationSignature>];
|
|
15
|
-
export type ChartCorePluginSignatures<
|
|
15
|
+
export type ChartCorePluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartElementRefSignature, UseChartIdSignature, UseChartSeriesConfigSignature<SeriesType>, UseChartExperimentalFeaturesSignature, UseChartDimensionsSignature, UseChartSeriesSignature<SeriesType>, UseChartAnimationSignature, UseChartInteractionListenerSignature];
|
|
16
16
|
export interface ChartCorePluginParameters extends UseChartIdParameters, UseChartSeriesConfigParameters {}
|
|
@@ -11,16 +11,16 @@ import type { IsItemVisibleFunction } from "../../featurePlugins/useChartVisibil
|
|
|
11
11
|
* @param colors The color palette used to defaultize series colors
|
|
12
12
|
* @returns An object structuring all the series by type with default values.
|
|
13
13
|
*/
|
|
14
|
-
export declare const defaultizeSeries: <
|
|
14
|
+
export declare const defaultizeSeries: <SeriesType extends ChartSeriesType>({
|
|
15
15
|
series,
|
|
16
16
|
colors,
|
|
17
17
|
seriesConfig
|
|
18
18
|
}: {
|
|
19
|
-
series: Readonly<AllSeriesType<
|
|
19
|
+
series: Readonly<AllSeriesType<SeriesType>[]>;
|
|
20
20
|
colors: readonly string[];
|
|
21
|
-
seriesConfig: ChartSeriesConfig<
|
|
21
|
+
seriesConfig: ChartSeriesConfig<SeriesType>;
|
|
22
22
|
}) => {
|
|
23
|
-
defaultizedSeries: DefaultizedSeriesGroups<
|
|
23
|
+
defaultizedSeries: DefaultizedSeriesGroups<SeriesType>;
|
|
24
24
|
idToType: SeriesIdToType;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
@@ -31,7 +31,7 @@ export declare const defaultizeSeries: <TSeriesType extends ChartSeriesType>({
|
|
|
31
31
|
* @param dataset The optional dataset
|
|
32
32
|
* @returns Processed series with all transformations applied
|
|
33
33
|
*/
|
|
34
|
-
export declare const applySeriesProcessors: <
|
|
34
|
+
export declare const applySeriesProcessors: <SeriesType extends ChartSeriesType>(defaultizedSeries: DefaultizedSeriesGroups<SeriesType>, seriesConfig: ChartSeriesConfig<SeriesType>, dataset?: Readonly<DatasetType>, isItemVisible?: IsItemVisibleFunction) => ProcessedSeries<SeriesType>;
|
|
35
35
|
/**
|
|
36
36
|
* Applies series processors with drawing area to series if defined.
|
|
37
37
|
* @param processedSeries The processed series groups
|
|
@@ -39,4 +39,4 @@ export declare const applySeriesProcessors: <TSeriesType extends ChartSeriesType
|
|
|
39
39
|
* @param drawingArea The drawing area
|
|
40
40
|
* @returns Processed series with all transformations applied
|
|
41
41
|
*/
|
|
42
|
-
export declare const applySeriesLayout: <
|
|
42
|
+
export declare const applySeriesLayout: <SeriesType extends ChartSeriesType>(processedSeries: ProcessedSeries<SeriesType>, seriesConfig: ChartSeriesConfig<SeriesType>, drawingArea: ChartDrawingArea) => SeriesLayout<SeriesType>;
|
|
@@ -11,16 +11,16 @@ import type { IsItemVisibleFunction } from "../../featurePlugins/useChartVisibil
|
|
|
11
11
|
* @param colors The color palette used to defaultize series colors
|
|
12
12
|
* @returns An object structuring all the series by type with default values.
|
|
13
13
|
*/
|
|
14
|
-
export declare const defaultizeSeries: <
|
|
14
|
+
export declare const defaultizeSeries: <SeriesType extends ChartSeriesType>({
|
|
15
15
|
series,
|
|
16
16
|
colors,
|
|
17
17
|
seriesConfig
|
|
18
18
|
}: {
|
|
19
|
-
series: Readonly<AllSeriesType<
|
|
19
|
+
series: Readonly<AllSeriesType<SeriesType>[]>;
|
|
20
20
|
colors: readonly string[];
|
|
21
|
-
seriesConfig: ChartSeriesConfig<
|
|
21
|
+
seriesConfig: ChartSeriesConfig<SeriesType>;
|
|
22
22
|
}) => {
|
|
23
|
-
defaultizedSeries: DefaultizedSeriesGroups<
|
|
23
|
+
defaultizedSeries: DefaultizedSeriesGroups<SeriesType>;
|
|
24
24
|
idToType: SeriesIdToType;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
@@ -31,7 +31,7 @@ export declare const defaultizeSeries: <TSeriesType extends ChartSeriesType>({
|
|
|
31
31
|
* @param dataset The optional dataset
|
|
32
32
|
* @returns Processed series with all transformations applied
|
|
33
33
|
*/
|
|
34
|
-
export declare const applySeriesProcessors: <
|
|
34
|
+
export declare const applySeriesProcessors: <SeriesType extends ChartSeriesType>(defaultizedSeries: DefaultizedSeriesGroups<SeriesType>, seriesConfig: ChartSeriesConfig<SeriesType>, dataset?: Readonly<DatasetType>, isItemVisible?: IsItemVisibleFunction) => ProcessedSeries<SeriesType>;
|
|
35
35
|
/**
|
|
36
36
|
* Applies series processors with drawing area to series if defined.
|
|
37
37
|
* @param processedSeries The processed series groups
|
|
@@ -39,4 +39,4 @@ export declare const applySeriesProcessors: <TSeriesType extends ChartSeriesType
|
|
|
39
39
|
* @param drawingArea The drawing area
|
|
40
40
|
* @returns Processed series with all transformations applied
|
|
41
41
|
*/
|
|
42
|
-
export declare const applySeriesLayout: <
|
|
42
|
+
export declare const applySeriesLayout: <SeriesType extends ChartSeriesType>(processedSeries: ProcessedSeries<SeriesType>, seriesConfig: ChartSeriesConfig<SeriesType>, drawingArea: ChartDrawingArea) => SeriesLayout<SeriesType>;
|
|
@@ -5,7 +5,7 @@ import { type ChartSeriesType, type DatasetType } from "../../../../models/serie
|
|
|
5
5
|
import { type SeriesId } from "../../../../models/seriesType/common.mjs";
|
|
6
6
|
import { type SeriesLayoutGetterResult, type SeriesProcessorParams, type SeriesProcessorResult, type UseChartSeriesConfigSignature } from "../useChartSeriesConfig/index.mjs";
|
|
7
7
|
import { type VisibilityIdentifier, type VisibilityIdentifierWithType } from "../../featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.mjs";
|
|
8
|
-
export interface UseChartSeriesParameters<
|
|
8
|
+
export interface UseChartSeriesParameters<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
9
9
|
/**
|
|
10
10
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export interface UseChartSeriesParameters<T extends ChartSeriesType = ChartSerie
|
|
|
15
15
|
* Each type of series has its own specificity.
|
|
16
16
|
* Please refer to the appropriate docs page to learn more about it.
|
|
17
17
|
*/
|
|
18
|
-
series?: Readonly<AllSeriesType<
|
|
18
|
+
series?: Readonly<AllSeriesType<SeriesType>[]>;
|
|
19
19
|
/**
|
|
20
20
|
* Color palette used to colorize multiple series.
|
|
21
21
|
* @default rainbowSurgePalette
|
|
@@ -23,13 +23,13 @@ export interface UseChartSeriesParameters<T extends ChartSeriesType = ChartSerie
|
|
|
23
23
|
colors?: ChartsColorPalette;
|
|
24
24
|
theme?: 'light' | 'dark';
|
|
25
25
|
}
|
|
26
|
-
export type UseChartSeriesDefaultizedParameters<
|
|
26
|
+
export type UseChartSeriesDefaultizedParameters<SeriesType extends ChartSeriesType = ChartSeriesType> = UseChartSeriesParameters<SeriesType> & {
|
|
27
27
|
/**
|
|
28
28
|
* The array of series to display.
|
|
29
29
|
* Each type of series has its own specificity.
|
|
30
30
|
* Please refer to the appropriate docs page to learn more about it.
|
|
31
31
|
*/
|
|
32
|
-
series: Readonly<AllSeriesType<
|
|
32
|
+
series: Readonly<AllSeriesType<SeriesType>[]>;
|
|
33
33
|
/**
|
|
34
34
|
* Color palette used to colorize multiple series.
|
|
35
35
|
* @default rainbowSurgePalette
|
|
@@ -37,13 +37,13 @@ export type UseChartSeriesDefaultizedParameters<T extends ChartSeriesType = Char
|
|
|
37
37
|
colors: ChartsColorPalette;
|
|
38
38
|
theme: 'light' | 'dark';
|
|
39
39
|
};
|
|
40
|
-
export type ProcessedSeries<
|
|
41
|
-
export type SeriesLayout<
|
|
42
|
-
export type DefaultizedSeriesGroups<
|
|
40
|
+
export type ProcessedSeries<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesProcessorResult<type> };
|
|
41
|
+
export type SeriesLayout<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesLayoutGetterResult<type> };
|
|
42
|
+
export type DefaultizedSeriesGroups<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesProcessorParams<type> };
|
|
43
43
|
export type SeriesIdToType = ReadonlyMap<SeriesId, ChartSeriesType>;
|
|
44
|
-
export interface UseChartSeriesState<
|
|
44
|
+
export interface UseChartSeriesState<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
45
45
|
series: {
|
|
46
|
-
defaultizedSeries: DefaultizedSeriesGroups<
|
|
46
|
+
defaultizedSeries: DefaultizedSeriesGroups<SeriesType>;
|
|
47
47
|
idToType: SeriesIdToType;
|
|
48
48
|
dataset?: Readonly<DatasetType>;
|
|
49
49
|
};
|
|
@@ -5,7 +5,7 @@ import { type ChartSeriesType, type DatasetType } from "../../../../models/serie
|
|
|
5
5
|
import { type SeriesId } from "../../../../models/seriesType/common.js";
|
|
6
6
|
import { type SeriesLayoutGetterResult, type SeriesProcessorParams, type SeriesProcessorResult, type UseChartSeriesConfigSignature } from "../useChartSeriesConfig/index.js";
|
|
7
7
|
import { type VisibilityIdentifier, type VisibilityIdentifierWithType } from "../../featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.js";
|
|
8
|
-
export interface UseChartSeriesParameters<
|
|
8
|
+
export interface UseChartSeriesParameters<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
9
9
|
/**
|
|
10
10
|
* An array of objects that can be used to populate series and axes data using their `dataKey` property.
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export interface UseChartSeriesParameters<T extends ChartSeriesType = ChartSerie
|
|
|
15
15
|
* Each type of series has its own specificity.
|
|
16
16
|
* Please refer to the appropriate docs page to learn more about it.
|
|
17
17
|
*/
|
|
18
|
-
series?: Readonly<AllSeriesType<
|
|
18
|
+
series?: Readonly<AllSeriesType<SeriesType>[]>;
|
|
19
19
|
/**
|
|
20
20
|
* Color palette used to colorize multiple series.
|
|
21
21
|
* @default rainbowSurgePalette
|
|
@@ -23,13 +23,13 @@ export interface UseChartSeriesParameters<T extends ChartSeriesType = ChartSerie
|
|
|
23
23
|
colors?: ChartsColorPalette;
|
|
24
24
|
theme?: 'light' | 'dark';
|
|
25
25
|
}
|
|
26
|
-
export type UseChartSeriesDefaultizedParameters<
|
|
26
|
+
export type UseChartSeriesDefaultizedParameters<SeriesType extends ChartSeriesType = ChartSeriesType> = UseChartSeriesParameters<SeriesType> & {
|
|
27
27
|
/**
|
|
28
28
|
* The array of series to display.
|
|
29
29
|
* Each type of series has its own specificity.
|
|
30
30
|
* Please refer to the appropriate docs page to learn more about it.
|
|
31
31
|
*/
|
|
32
|
-
series: Readonly<AllSeriesType<
|
|
32
|
+
series: Readonly<AllSeriesType<SeriesType>[]>;
|
|
33
33
|
/**
|
|
34
34
|
* Color palette used to colorize multiple series.
|
|
35
35
|
* @default rainbowSurgePalette
|
|
@@ -37,13 +37,13 @@ export type UseChartSeriesDefaultizedParameters<T extends ChartSeriesType = Char
|
|
|
37
37
|
colors: ChartsColorPalette;
|
|
38
38
|
theme: 'light' | 'dark';
|
|
39
39
|
};
|
|
40
|
-
export type ProcessedSeries<
|
|
41
|
-
export type SeriesLayout<
|
|
42
|
-
export type DefaultizedSeriesGroups<
|
|
40
|
+
export type ProcessedSeries<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesProcessorResult<type> };
|
|
41
|
+
export type SeriesLayout<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesLayoutGetterResult<type> };
|
|
42
|
+
export type DefaultizedSeriesGroups<SeriesType extends ChartSeriesType = ChartSeriesType> = { [type in SeriesType]?: SeriesProcessorParams<type> };
|
|
43
43
|
export type SeriesIdToType = ReadonlyMap<SeriesId, ChartSeriesType>;
|
|
44
|
-
export interface UseChartSeriesState<
|
|
44
|
+
export interface UseChartSeriesState<SeriesType extends ChartSeriesType = ChartSeriesType> {
|
|
45
45
|
series: {
|
|
46
|
-
defaultizedSeries: DefaultizedSeriesGroups<
|
|
46
|
+
defaultizedSeries: DefaultizedSeriesGroups<SeriesType>;
|
|
47
47
|
idToType: SeriesIdToType;
|
|
48
48
|
dataset?: Readonly<DatasetType>;
|
|
49
49
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChartSeriesType } from "../../../../models/seriesType/config.mjs";
|
|
2
2
|
import { type ColorProcessor } from "../useChartSeriesConfig/index.mjs";
|
|
3
|
-
export type ColorProcessorsConfig<
|
|
4
|
-
export declare function useColorProcessor<
|
|
3
|
+
export type ColorProcessorsConfig<SeriesType extends ChartSeriesType> = { [Key in SeriesType]?: ColorProcessor<Key> };
|
|
4
|
+
export declare function useColorProcessor<SeriesType extends ChartSeriesType>(seriesType: SeriesType): ColorProcessor<SeriesType>;
|
|
5
5
|
export declare function useColorProcessor(): ColorProcessorsConfig<ChartSeriesType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
2
|
import { type ColorProcessor } from "../useChartSeriesConfig/index.js";
|
|
3
|
-
export type ColorProcessorsConfig<
|
|
4
|
-
export declare function useColorProcessor<
|
|
3
|
+
export type ColorProcessorsConfig<SeriesType extends ChartSeriesType> = { [Key in SeriesType]?: ColorProcessor<Key> };
|
|
4
|
+
export declare function useColorProcessor<SeriesType extends ChartSeriesType>(seriesType: SeriesType): ColorProcessor<SeriesType>;
|
|
5
5
|
export declare function useColorProcessor(): ColorProcessorsConfig<ChartSeriesType>;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CartesianChartSeriesType, ChartSeriesDefaultized } from "../../../../../models/seriesType/config.mjs";
|
|
2
2
|
import type { AxisConfig, AxisId } from "../../../../../models/axis.mjs";
|
|
3
3
|
import type { SeriesId } from "../../../../../models/seriesType/common.mjs";
|
|
4
|
-
type CartesianExtremumGetterParams<
|
|
5
|
-
series: Record<SeriesId, ChartSeriesDefaultized<
|
|
4
|
+
type CartesianExtremumGetterParams<SeriesType extends CartesianChartSeriesType> = {
|
|
5
|
+
series: Record<SeriesId, ChartSeriesDefaultized<SeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
7
7
|
axisIndex: number;
|
|
8
8
|
isDefaultAxis: boolean;
|
|
@@ -14,7 +14,7 @@ type CartesianExtremumGetterParams<TSeriesType extends CartesianChartSeriesType>
|
|
|
14
14
|
}) => CartesianExtremumFilter;
|
|
15
15
|
};
|
|
16
16
|
export type CartesianExtremumGetterResult = [number, number];
|
|
17
|
-
export type CartesianExtremumGetter<
|
|
17
|
+
export type CartesianExtremumGetter<SeriesType extends CartesianChartSeriesType> = (params: CartesianExtremumGetterParams<SeriesType>) => CartesianExtremumGetterResult;
|
|
18
18
|
export type CartesianExtremumFilter = (value: {
|
|
19
19
|
x: number | Date | string | null;
|
|
20
20
|
y: number | Date | string | null;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CartesianChartSeriesType, ChartSeriesDefaultized } from "../../../../../models/seriesType/config.js";
|
|
2
2
|
import type { AxisConfig, AxisId } from "../../../../../models/axis.js";
|
|
3
3
|
import type { SeriesId } from "../../../../../models/seriesType/common.js";
|
|
4
|
-
type CartesianExtremumGetterParams<
|
|
5
|
-
series: Record<SeriesId, ChartSeriesDefaultized<
|
|
4
|
+
type CartesianExtremumGetterParams<SeriesType extends CartesianChartSeriesType> = {
|
|
5
|
+
series: Record<SeriesId, ChartSeriesDefaultized<SeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
7
7
|
axisIndex: number;
|
|
8
8
|
isDefaultAxis: boolean;
|
|
@@ -14,7 +14,7 @@ type CartesianExtremumGetterParams<TSeriesType extends CartesianChartSeriesType>
|
|
|
14
14
|
}) => CartesianExtremumFilter;
|
|
15
15
|
};
|
|
16
16
|
export type CartesianExtremumGetterResult = [number, number];
|
|
17
|
-
export type CartesianExtremumGetter<
|
|
17
|
+
export type CartesianExtremumGetter<SeriesType extends CartesianChartSeriesType> = (params: CartesianExtremumGetterParams<SeriesType>) => CartesianExtremumGetterResult;
|
|
18
18
|
export type CartesianExtremumFilter = (value: {
|
|
19
19
|
x: number | Date | string | null;
|
|
20
20
|
y: number | Date | string | null;
|
|
@@ -6,14 +6,14 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.mj
|
|
|
6
6
|
* Map data index to a color.
|
|
7
7
|
* If dataIndex is not defined, it falls back to the series color when defined.
|
|
8
8
|
*/
|
|
9
|
-
export type ColorGetter<
|
|
9
|
+
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : (dataIndex?: number) => string;
|
|
10
10
|
/**
|
|
11
11
|
* Transforms charts config to a color getter.
|
|
12
12
|
* If dataIndex is not defined, it falls back to the series color.
|
|
13
|
-
* @param {DefaultizedSeriesType<
|
|
13
|
+
* @param {DefaultizedSeriesType<SeriesType>} series - The series configuration.
|
|
14
14
|
* @param {ComputedXAxis | undefined} xAxis - The computed x-axis configuration.
|
|
15
15
|
* @param {ComputedYAxis | undefined} yAxis - The computed y-axis configuration.
|
|
16
16
|
* @param {ZAxisDefaultized | undefined} zAxis - The defaulted z-axis configuration.
|
|
17
|
-
* @returns {ColorGetter<
|
|
17
|
+
* @returns {ColorGetter<SeriesType>} A function that takes a data index and returns a color string.
|
|
18
18
|
*/
|
|
19
|
-
export type ColorProcessor<
|
|
19
|
+
export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>, xAxis?: ComputedXAxis, yAxis?: ComputedYAxis, zAxis?: ZAxisDefaultized) => ColorGetter<SeriesType>;
|
|
@@ -6,14 +6,14 @@ import type { ChartSeriesType } from "../../../../../models/seriesType/config.js
|
|
|
6
6
|
* Map data index to a color.
|
|
7
7
|
* If dataIndex is not defined, it falls back to the series color when defined.
|
|
8
8
|
*/
|
|
9
|
-
export type ColorGetter<
|
|
9
|
+
export type ColorGetter<SeriesType extends ChartSeriesType> = SeriesType extends 'pie' | 'funnel' ? (dataIndex: number) => string : SeriesType extends 'heatmap' ? (value: number | null) => string : (dataIndex?: number) => string;
|
|
10
10
|
/**
|
|
11
11
|
* Transforms charts config to a color getter.
|
|
12
12
|
* If dataIndex is not defined, it falls back to the series color.
|
|
13
|
-
* @param {DefaultizedSeriesType<
|
|
13
|
+
* @param {DefaultizedSeriesType<SeriesType>} series - The series configuration.
|
|
14
14
|
* @param {ComputedXAxis | undefined} xAxis - The computed x-axis configuration.
|
|
15
15
|
* @param {ComputedYAxis | undefined} yAxis - The computed y-axis configuration.
|
|
16
16
|
* @param {ZAxisDefaultized | undefined} zAxis - The defaulted z-axis configuration.
|
|
17
|
-
* @returns {ColorGetter<
|
|
17
|
+
* @returns {ColorGetter<SeriesType>} A function that takes a data index and returns a color string.
|
|
18
18
|
*/
|
|
19
|
-
export type ColorProcessor<
|
|
19
|
+
export type ColorProcessor<SeriesType extends ChartSeriesType> = (series: DefaultizedSeriesType<SeriesType>, xAxis?: ComputedXAxis, yAxis?: ComputedYAxis, zAxis?: ZAxisDefaultized) => ColorGetter<SeriesType>;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SeriesItemIdentifierWithType } from "../../../../../models/seriesT
|
|
|
2
2
|
import type { ChartState } from "../../../models/chart.mjs";
|
|
3
3
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
4
4
|
import type { ChartSeriesTypeRequiredPlugins } from "./seriesConfig.types.mjs";
|
|
5
|
-
export type GetItemAtPosition<
|
|
5
|
+
export type GetItemAtPosition<SeriesType extends ChartSeriesType> = (state: ChartState<ChartSeriesTypeRequiredPlugins<SeriesType>>, point: {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
8
|
-
}) => SeriesItemIdentifierWithType<
|
|
8
|
+
}) => SeriesItemIdentifierWithType<SeriesType> | undefined;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { SeriesItemIdentifierWithType } from "../../../../../models/seriesT
|
|
|
2
2
|
import type { ChartState } from "../../../models/chart.js";
|
|
3
3
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
4
4
|
import type { ChartSeriesTypeRequiredPlugins } from "./seriesConfig.types.js";
|
|
5
|
-
export type GetItemAtPosition<
|
|
5
|
+
export type GetItemAtPosition<SeriesType extends ChartSeriesType> = (state: ChartState<ChartSeriesTypeRequiredPlugins<SeriesType>>, point: {
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
8
|
-
}) => SeriesItemIdentifierWithType<
|
|
8
|
+
}) => SeriesItemIdentifierWithType<SeriesType> | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChartSeries, ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
2
2
|
import type { AllSeriesType } from "../../../../../models/seriesType/index.mjs";
|
|
3
|
-
export type GetSeriesWithDefaultValues<
|
|
3
|
+
export type GetSeriesWithDefaultValues<SeriesType extends ChartSeriesType> = (series: AllSeriesType<SeriesType>, seriesIndex: number, colors: readonly string[]) => ChartSeries<SeriesType>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChartSeries, ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
2
2
|
import type { AllSeriesType } from "../../../../../models/seriesType/index.js";
|
|
3
|
-
export type GetSeriesWithDefaultValues<
|
|
3
|
+
export type GetSeriesWithDefaultValues<SeriesType extends ChartSeriesType> = (series: AllSeriesType<SeriesType>, seriesIndex: number, colors: readonly string[]) => ChartSeries<SeriesType>;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/index.mjs";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
3
|
-
export type IdentifierCleaner<
|
|
3
|
+
export type IdentifierCleaner<SeriesType extends ChartSeriesType = ChartSeriesType> = (identifier: SeriesItemIdentifierWithType<SeriesType>) => SeriesItemIdentifierWithType<SeriesType>;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/index.js";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
3
|
-
export type IdentifierCleaner<
|
|
3
|
+
export type IdentifierCleaner<SeriesType extends ChartSeriesType = ChartSeriesType> = (identifier: SeriesItemIdentifierWithType<SeriesType>) => SeriesItemIdentifierWithType<SeriesType>;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/index.mjs";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
3
|
-
export type IdentifierSerializer<
|
|
3
|
+
export type IdentifierSerializer<SeriesType extends ChartSeriesType> = (identifier: SeriesItemIdentifierWithType<SeriesType>) => string;
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SeriesItemIdentifierWithType } from "../../../../../models/index.js";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
3
|
-
export type IdentifierSerializer<
|
|
3
|
+
export type IdentifierSerializer<SeriesType extends ChartSeriesType> = (identifier: SeriesItemIdentifierWithType<SeriesType>) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SeriesLegendItemParams } from "../../../../../ChartsLegend/index.mjs";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
|
|
3
3
|
import type { SeriesProcessorResult } from "./seriesProcessor.types.mjs";
|
|
4
|
-
export type LegendGetter<
|
|
4
|
+
export type LegendGetter<SeriesType extends ChartSeriesType> = (series: SeriesProcessorResult<SeriesType>) => SeriesLegendItemParams[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SeriesLegendItemParams } from "../../../../../ChartsLegend/index.js";
|
|
2
2
|
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
3
3
|
import type { SeriesProcessorResult } from "./seriesProcessor.types.js";
|
|
4
|
-
export type LegendGetter<
|
|
4
|
+
export type LegendGetter<SeriesType extends ChartSeriesType> = (series: SeriesProcessorResult<SeriesType>) => SeriesLegendItemParams[];
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { PolarChartSeriesType, ChartSeriesDefaultized } from "../../../../../models/seriesType/config.mjs";
|
|
2
2
|
import type { AxisConfig } from "../../../../../models/axis.mjs";
|
|
3
3
|
import type { SeriesId } from "../../../../../models/seriesType/common.mjs";
|
|
4
|
-
type PolarExtremumGetterParams<
|
|
5
|
-
series: Record<SeriesId, ChartSeriesDefaultized<
|
|
4
|
+
type PolarExtremumGetterParams<SeriesType extends PolarChartSeriesType> = {
|
|
5
|
+
series: Record<SeriesId, ChartSeriesDefaultized<SeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
7
7
|
axisIndex: number;
|
|
8
8
|
isDefaultAxis: boolean;
|
|
9
9
|
};
|
|
10
10
|
export type PolarExtremumGetterResult = [number, number];
|
|
11
|
-
export type PolarExtremumGetter<
|
|
11
|
+
export type PolarExtremumGetter<SeriesType extends PolarChartSeriesType> = (params: PolarExtremumGetterParams<SeriesType>) => PolarExtremumGetterResult;
|
|
12
12
|
export {};
|
package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { PolarChartSeriesType, ChartSeriesDefaultized } from "../../../../../models/seriesType/config.js";
|
|
2
2
|
import type { AxisConfig } from "../../../../../models/axis.js";
|
|
3
3
|
import type { SeriesId } from "../../../../../models/seriesType/common.js";
|
|
4
|
-
type PolarExtremumGetterParams<
|
|
5
|
-
series: Record<SeriesId, ChartSeriesDefaultized<
|
|
4
|
+
type PolarExtremumGetterParams<SeriesType extends PolarChartSeriesType> = {
|
|
5
|
+
series: Record<SeriesId, ChartSeriesDefaultized<SeriesType>>;
|
|
6
6
|
axis: AxisConfig;
|
|
7
7
|
axisIndex: number;
|
|
8
8
|
isDefaultAxis: boolean;
|
|
9
9
|
};
|
|
10
10
|
export type PolarExtremumGetterResult = [number, number];
|
|
11
|
-
export type PolarExtremumGetter<
|
|
11
|
+
export type PolarExtremumGetter<SeriesType extends PolarChartSeriesType> = (params: PolarExtremumGetterParams<SeriesType>) => PolarExtremumGetterResult;
|
|
12
12
|
export {};
|
|
@@ -15,46 +15,46 @@ import { type GetItemAtPosition } from "./getItemAtPosition.types.mjs";
|
|
|
15
15
|
import { type UseChartCartesianAxisSignature } from "../../../featurePlugins/useChartCartesianAxis/index.mjs";
|
|
16
16
|
import { type UseChartPolarAxisSignature } from "../../../featurePlugins/useChartPolarAxis/index.mjs";
|
|
17
17
|
import { type HighlightCreator } from "../../../featurePlugins/useChartHighlight/highlightCreator.types.mjs";
|
|
18
|
-
export type ChartSeriesTypeRequiredPlugins<
|
|
18
|
+
export type ChartSeriesTypeRequiredPlugins<SeriesType extends ChartSeriesType> = ChartsSeriesConfig[SeriesType] extends {
|
|
19
19
|
axisType: 'cartesian';
|
|
20
|
-
} ? [UseChartCartesianAxisSignature] : ChartsSeriesConfig[
|
|
20
|
+
} ? [UseChartCartesianAxisSignature] : ChartsSeriesConfig[SeriesType] extends {
|
|
21
21
|
axisType: 'polar';
|
|
22
22
|
} ? [UseChartPolarAxisSignature] : [];
|
|
23
|
-
export type ChartSeriesTypeConfig<
|
|
24
|
-
seriesProcessor: SeriesProcessor<
|
|
23
|
+
export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
|
|
24
|
+
seriesProcessor: SeriesProcessor<SeriesType>;
|
|
25
25
|
/**
|
|
26
26
|
* A processor to add series layout when the layout does not depend from other series.
|
|
27
27
|
*/
|
|
28
|
-
seriesLayout?: SeriesLayoutGetter<
|
|
29
|
-
colorProcessor: ColorProcessor<
|
|
30
|
-
legendGetter: LegendGetter<
|
|
31
|
-
tooltipGetter: TooltipGetter<
|
|
32
|
-
tooltipItemPositionGetter?: TooltipItemPositionGetter<
|
|
33
|
-
getSeriesWithDefaultValues: GetSeriesWithDefaultValues<
|
|
34
|
-
keyboardFocusHandler?: KeyboardFocusHandler<
|
|
28
|
+
seriesLayout?: SeriesLayoutGetter<SeriesType>;
|
|
29
|
+
colorProcessor: ColorProcessor<SeriesType>;
|
|
30
|
+
legendGetter: LegendGetter<SeriesType>;
|
|
31
|
+
tooltipGetter: TooltipGetter<SeriesType>;
|
|
32
|
+
tooltipItemPositionGetter?: TooltipItemPositionGetter<SeriesType>;
|
|
33
|
+
getSeriesWithDefaultValues: GetSeriesWithDefaultValues<SeriesType>;
|
|
34
|
+
keyboardFocusHandler?: KeyboardFocusHandler<SeriesType>;
|
|
35
35
|
/**
|
|
36
36
|
* A function to serialize the series item identifier into a unique string.
|
|
37
|
-
* @param {SeriesItemIdentifierWithType<
|
|
37
|
+
* @param {SeriesItemIdentifierWithType<SeriesType>} identifier The series item identifier.
|
|
38
38
|
* @returns {string} A unique string representation of the identifier.
|
|
39
39
|
*/
|
|
40
|
-
identifierSerializer: IdentifierSerializer<
|
|
40
|
+
identifierSerializer: IdentifierSerializer<SeriesType>;
|
|
41
41
|
/**
|
|
42
42
|
* A function to clean a series item identifier, returning only the properties
|
|
43
43
|
* relevant to the series type.
|
|
44
|
-
* @param {Partial<SeriesItemIdentifierWithType<
|
|
45
|
-
* @returns {SeriesItemIdentifierWithType<
|
|
44
|
+
* @param {Partial<SeriesItemIdentifierWithType<SeriesType>> & { type: SeriesType }} identifier The partial identifier to clean.
|
|
45
|
+
* @returns {SeriesItemIdentifierWithType<SeriesType>} A cleaned identifier with only the relevant properties.
|
|
46
46
|
*/
|
|
47
|
-
identifierCleaner: IdentifierCleaner<
|
|
48
|
-
getItemAtPosition?: GetItemAtPosition<
|
|
49
|
-
isHighlightedCreator: HighlightCreator<
|
|
50
|
-
isFadedCreator: HighlightCreator<
|
|
51
|
-
} & (
|
|
52
|
-
xExtremumGetter: CartesianExtremumGetter<
|
|
53
|
-
yExtremumGetter: CartesianExtremumGetter<
|
|
54
|
-
axisTooltipGetter?: AxisTooltipGetter<
|
|
55
|
-
} : {}) & (
|
|
56
|
-
rotationExtremumGetter: PolarExtremumGetter<
|
|
57
|
-
radiusExtremumGetter: PolarExtremumGetter<
|
|
58
|
-
axisTooltipGetter?: AxisTooltipGetter<
|
|
47
|
+
identifierCleaner: IdentifierCleaner<SeriesType>;
|
|
48
|
+
getItemAtPosition?: GetItemAtPosition<SeriesType>;
|
|
49
|
+
isHighlightedCreator: HighlightCreator<SeriesType>;
|
|
50
|
+
isFadedCreator: HighlightCreator<SeriesType>;
|
|
51
|
+
} & (SeriesType extends CartesianChartSeriesType ? {
|
|
52
|
+
xExtremumGetter: CartesianExtremumGetter<SeriesType>;
|
|
53
|
+
yExtremumGetter: CartesianExtremumGetter<SeriesType>;
|
|
54
|
+
axisTooltipGetter?: AxisTooltipGetter<SeriesType, 'x' | 'y'>;
|
|
55
|
+
} : {}) & (SeriesType extends PolarChartSeriesType ? {
|
|
56
|
+
rotationExtremumGetter: PolarExtremumGetter<SeriesType>;
|
|
57
|
+
radiusExtremumGetter: PolarExtremumGetter<SeriesType>;
|
|
58
|
+
axisTooltipGetter?: AxisTooltipGetter<SeriesType, 'rotation' | 'radius'>;
|
|
59
59
|
} : {});
|
|
60
|
-
export type ChartSeriesConfig<
|
|
60
|
+
export type ChartSeriesConfig<SeriesType extends ChartSeriesType> = { [Key in SeriesType]: ChartSeriesTypeConfig<Key> };
|