@mui/x-charts 8.27.0 → 9.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BarChart/AnimatedBarElement.d.ts +2 -2
- package/BarChart/AnimatedBarElement.js +1 -1
- package/BarChart/BarChart.js +9 -4
- package/BarChart/BarElement.d.ts +2 -2
- package/BarChart/BarElement.js +9 -9
- package/BarChart/BarLabel/BarLabel.js +1 -1
- package/BarChart/FocusedBar.js +4 -6
- package/BarChart/IndividualBarPlot.js +1 -1
- package/BarChart/barClasses.d.ts +1 -1
- package/BarChart/barClasses.js +2 -2
- package/BarChart/barElementClasses.d.ts +2 -1
- package/BarChart/barElementClasses.js +2 -2
- package/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +2 -2
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +2 -1
- package/BarChart/seriesConfig/bar/keyboardFocusHandler.js +4 -5
- package/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/BarChart/seriesConfig/bar/legend.js +0 -1
- package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltip.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +1 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.js +5 -6
- package/BarChart/seriesConfig/index.d.ts +1 -1
- package/BarChart/seriesConfig/index.js +3 -1
- package/BarChart/useBarPlotData.d.ts +1 -1
- package/BarChart/useBarPlotData.js +9 -10
- package/BarChart/useRegisterItemClickHandlers.js +2 -2
- package/CHANGELOG.md +255 -3
- package/ChartContainer/ChartContainer.d.ts +16 -29
- package/ChartContainer/ChartContainer.js +14 -1691
- package/ChartContainer/index.d.ts +1 -8
- package/ChartContainer/useChartContainerProps.d.ts +9 -10
- package/ChartContainer/useChartContainerProps.js +9 -94
- package/ChartDataProvider/ChartDataProvider.d.ts +5 -3
- package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/ChartDataProvider/useChartDataProviderProps.js +7 -6
- package/ChartsAxis/ChartsAxis.d.ts +1 -0
- package/ChartsAxis/ChartsAxis.js +4 -2
- package/ChartsAxis/axisClasses.d.ts +0 -7
- package/ChartsAxis/axisClasses.js +1 -1
- package/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/ChartsContainer/ChartsContainer.js +1698 -0
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainer/useChartsContainerProps.d.ts +15 -0
- package/ChartsContainer/useChartsContainerProps.js +106 -0
- package/ChartsLabel/ChartsLabelMark.js +34 -32
- package/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/ChartsLabel/labelMarkClasses.d.ts +1 -3
- package/ChartsLabel/labelMarkClasses.js +1 -2
- package/ChartsLegend/ChartsLegend.js +1 -7
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/legendContext.types.d.ts +1 -8
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsSurface/ChartsSurface.js +1 -3
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -0
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +16 -1
- package/ChartsTooltip/index.d.ts +1 -2
- package/ChartsTooltip/index.js +0 -12
- package/ChartsTooltip/useAxesTooltip.d.ts +29 -3
- package/ChartsTooltip/useAxesTooltip.js +173 -6
- package/ChartsTooltip/useItemTooltip.d.ts +1 -1
- package/ChartsTooltip/useItemTooltip.js +2 -2
- package/ChartsXAxis/ChartsXAxis.d.ts +3 -1
- package/ChartsXAxis/ChartsXAxis.js +2 -1
- package/ChartsXAxis/ChartsXAxisImpl.js +1 -1
- package/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/ChartsXAxis/shortenLabels.d.ts +2 -2
- package/ChartsXAxis/useAxisTicksProps.d.ts +674 -671
- package/ChartsXAxis/useAxisTicksProps.js +1 -1
- package/ChartsXAxis/utilities.d.ts +1 -1
- package/ChartsXAxis/utilities.js +2 -3
- package/ChartsYAxis/ChartsYAxis.d.ts +3 -1
- package/ChartsYAxis/ChartsYAxis.js +2 -1
- package/ChartsYAxis/ChartsYAxisImpl.js +1 -1
- package/ChartsYAxis/shortenLabels.d.ts +2 -2
- package/ChartsYAxis/useAxisTicksProps.d.ts +674 -671
- package/ChartsYAxis/useAxisTicksProps.js +1 -1
- package/ChartsYAxis/utilities.js +2 -3
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +3 -1
- package/LineChart/AnimatedArea.js +3 -3
- package/LineChart/AnimatedLine.js +4 -4
- package/LineChart/AppearingMask.d.ts +1 -1
- package/LineChart/AppearingMask.js +1 -1
- package/LineChart/AreaElement.d.ts +2 -2
- package/LineChart/AreaElement.js +8 -8
- package/LineChart/AreaPlot.js +1 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/CircleMarkElement.js +5 -5
- package/LineChart/LineChart.js +9 -4
- package/LineChart/LineElement.d.ts +2 -2
- package/LineChart/LineElement.js +8 -8
- package/LineChart/LineHighlightElement.d.ts +3 -3
- package/LineChart/LineHighlightElement.js +4 -4
- package/LineChart/LineHighlightPlot.js +1 -1
- package/LineChart/LinePlot.js +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkElement.js +5 -5
- package/LineChart/MarkPlot.js +1 -1
- package/LineChart/markElementClasses.d.ts +1 -1
- package/LineChart/markElementClasses.js +2 -2
- package/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/LineChart/seriesConfig/index.d.ts +1 -1
- package/LineChart/seriesConfig/index.js +3 -1
- package/LineChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/LineChart/seriesConfig/keyboardFocusHandler.js +4 -5
- package/LineChart/seriesConfig/legend.d.ts +1 -1
- package/LineChart/seriesConfig/legend.js +0 -1
- package/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/LineChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/PieChart/FocusedPieArc.d.ts +1 -1
- package/PieChart/FocusedPieArc.js +1 -1
- package/PieChart/PieArc.d.ts +4 -4
- package/PieChart/PieArc.js +7 -7
- package/PieChart/PieArcLabel.d.ts +4 -4
- package/PieChart/PieArcLabel.js +6 -6
- package/PieChart/PieArcLabelPlot.d.ts +5 -1
- package/PieChart/PieArcLabelPlot.js +5 -5
- package/PieChart/PieArcPlot.d.ts +5 -1
- package/PieChart/PieArcPlot.js +6 -6
- package/PieChart/PieChart.js +4 -4
- package/PieChart/PiePlot.js +2 -2
- package/PieChart/index.d.ts +1 -0
- package/PieChart/index.js +12 -0
- package/PieChart/pieClasses.d.ts +1 -1
- package/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/PieChart/seriesConfig/index.d.ts +1 -1
- package/PieChart/seriesConfig/index.js +3 -1
- package/PieChart/seriesConfig/legend.d.ts +1 -1
- package/PieChart/seriesConfig/legend.js +0 -1
- package/PieChart/seriesConfig/seriesLayout.d.ts +1 -1
- package/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/PieChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/RadarChart/RadarAxisHighlight/index.d.ts +2 -1
- package/RadarChart/RadarChart.js +4 -4
- package/RadarChart/RadarGrid/index.d.ts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +2 -0
- package/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +2 -2
- package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
- package/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/RadarChart/seriesConfig/index.d.ts +1 -1
- package/RadarChart/seriesConfig/index.js +3 -1
- package/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/RadarChart/seriesConfig/legend.js +0 -1
- package/RadarChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/RadarChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/ScatterChart/BatchScatter.d.ts +1 -1
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +9 -4
- package/ScatterChart/scatterClasses.js +2 -2
- package/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.js +3 -1
- package/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/ScatterChart/seriesConfig/keyboardFocusHandler.js +4 -5
- package/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/ScatterChart/seriesConfig/legend.js +0 -1
- package/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/ScatterChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/SparkLineChart/SparkLineChart.js +16 -16
- package/context/ChartProvider/ChartProvider.d.ts +3 -4
- package/context/ChartProvider/ChartProvider.js +2 -15
- package/context/ChartProvider/ChartProvider.types.d.ts +3 -18
- package/context/index.d.ts +2 -1
- package/esm/BarChart/AnimatedBarElement.d.ts +2 -2
- package/esm/BarChart/AnimatedBarElement.js +1 -1
- package/esm/BarChart/BarChart.js +9 -4
- package/esm/BarChart/BarElement.d.ts +2 -2
- package/esm/BarChart/BarElement.js +9 -9
- package/esm/BarChart/BarLabel/BarLabel.js +1 -1
- package/esm/BarChart/FocusedBar.js +4 -6
- package/esm/BarChart/IndividualBarPlot.js +1 -1
- package/esm/BarChart/barClasses.d.ts +1 -1
- package/esm/BarChart/barClasses.js +2 -2
- package/esm/BarChart/barElementClasses.d.ts +2 -1
- package/esm/BarChart/barElementClasses.js +2 -2
- package/esm/BarChart/seriesConfig/bar/extremums.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getColor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +2 -2
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.d.ts +2 -1
- package/esm/BarChart/seriesConfig/bar/keyboardFocusHandler.js +5 -6
- package/esm/BarChart/seriesConfig/bar/legend.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/legend.js +0 -1
- package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltip.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.d.ts +1 -1
- package/esm/BarChart/seriesConfig/bar/tooltipPosition.js +5 -6
- package/esm/BarChart/seriesConfig/index.d.ts +1 -1
- package/esm/BarChart/seriesConfig/index.js +3 -1
- package/esm/BarChart/useBarPlotData.d.ts +1 -1
- package/esm/BarChart/useBarPlotData.js +9 -10
- package/esm/BarChart/useRegisterItemClickHandlers.js +2 -2
- package/esm/ChartContainer/ChartContainer.d.ts +16 -29
- package/esm/ChartContainer/ChartContainer.js +15 -1690
- package/esm/ChartContainer/index.d.ts +1 -8
- package/esm/ChartContainer/index.js +1 -6
- package/esm/ChartContainer/useChartContainerProps.d.ts +9 -10
- package/esm/ChartContainer/useChartContainerProps.js +10 -93
- package/esm/ChartDataProvider/ChartDataProvider.d.ts +5 -3
- package/esm/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
- package/esm/ChartDataProvider/useChartDataProviderProps.js +7 -6
- package/esm/ChartsAxis/ChartsAxis.d.ts +1 -0
- package/esm/ChartsAxis/ChartsAxis.js +4 -2
- package/esm/ChartsAxis/axisClasses.d.ts +0 -7
- package/esm/ChartsAxis/axisClasses.js +1 -1
- package/esm/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/esm/ChartsContainer/ChartsContainer.js +1692 -0
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +1 -0
- package/esm/ChartsContainer/useChartsContainerProps.d.ts +15 -0
- package/esm/ChartsContainer/useChartsContainerProps.js +99 -0
- package/esm/ChartsLabel/ChartsLabelMark.js +35 -33
- package/esm/ChartsLabel/labelGradientClasses.d.ts +1 -1
- package/esm/ChartsLabel/labelMarkClasses.d.ts +1 -3
- package/esm/ChartsLabel/labelMarkClasses.js +1 -2
- package/esm/ChartsLegend/ChartsLegend.js +1 -7
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/legendContext.types.d.ts +1 -8
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsSurface/ChartsSurface.js +2 -4
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -0
- package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +16 -1
- package/esm/ChartsTooltip/index.d.ts +1 -2
- package/esm/ChartsTooltip/index.js +0 -1
- package/esm/ChartsTooltip/useAxesTooltip.d.ts +29 -3
- package/esm/ChartsTooltip/useAxesTooltip.js +173 -5
- package/esm/ChartsTooltip/useItemTooltip.d.ts +1 -1
- package/esm/ChartsTooltip/useItemTooltip.js +1 -1
- package/esm/ChartsXAxis/ChartsXAxis.d.ts +3 -1
- package/esm/ChartsXAxis/ChartsXAxis.js +1 -2
- package/esm/ChartsXAxis/ChartsXAxisImpl.js +1 -1
- package/esm/ChartsXAxis/getVisibleLabels.d.ts +2 -2
- package/esm/ChartsXAxis/shortenLabels.d.ts +2 -2
- package/esm/ChartsXAxis/useAxisTicksProps.d.ts +674 -671
- package/esm/ChartsXAxis/useAxisTicksProps.js +1 -1
- package/esm/ChartsXAxis/utilities.d.ts +1 -1
- package/esm/ChartsXAxis/utilities.js +2 -3
- package/esm/ChartsYAxis/ChartsYAxis.d.ts +3 -1
- package/esm/ChartsYAxis/ChartsYAxis.js +1 -2
- package/esm/ChartsYAxis/ChartsYAxisImpl.js +1 -1
- package/esm/ChartsYAxis/shortenLabels.d.ts +2 -2
- package/esm/ChartsYAxis/useAxisTicksProps.d.ts +674 -671
- package/esm/ChartsYAxis/useAxisTicksProps.js +1 -1
- package/esm/ChartsYAxis/utilities.js +2 -3
- package/esm/Gauge/GaugeContainer.d.ts +1 -1
- package/esm/Gauge/GaugeContainer.js +3 -1
- package/esm/LineChart/AnimatedArea.js +3 -3
- package/esm/LineChart/AnimatedLine.js +4 -4
- package/esm/LineChart/AppearingMask.d.ts +1 -1
- package/esm/LineChart/AppearingMask.js +1 -1
- package/esm/LineChart/AreaElement.d.ts +2 -2
- package/esm/LineChart/AreaElement.js +8 -8
- package/esm/LineChart/AreaPlot.js +1 -1
- package/esm/LineChart/CircleMarkElement.d.ts +1 -1
- package/esm/LineChart/CircleMarkElement.js +5 -5
- package/esm/LineChart/LineChart.js +9 -4
- package/esm/LineChart/LineElement.d.ts +2 -2
- package/esm/LineChart/LineElement.js +8 -8
- package/esm/LineChart/LineHighlightElement.d.ts +3 -3
- package/esm/LineChart/LineHighlightElement.js +4 -4
- package/esm/LineChart/LineHighlightPlot.js +1 -1
- package/esm/LineChart/LinePlot.js +1 -1
- package/esm/LineChart/MarkElement.d.ts +1 -1
- package/esm/LineChart/MarkElement.js +5 -5
- package/esm/LineChart/MarkPlot.js +1 -1
- package/esm/LineChart/markElementClasses.d.ts +1 -1
- package/esm/LineChart/markElementClasses.js +2 -2
- package/esm/LineChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.d.ts +1 -1
- package/esm/LineChart/seriesConfig/index.js +3 -1
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/esm/LineChart/seriesConfig/keyboardFocusHandler.js +5 -6
- package/esm/LineChart/seriesConfig/legend.d.ts +1 -1
- package/esm/LineChart/seriesConfig/legend.js +0 -1
- package/esm/LineChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/LineChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/LineChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/PieChart/FocusedPieArc.d.ts +1 -1
- package/esm/PieChart/FocusedPieArc.js +1 -1
- package/esm/PieChart/PieArc.d.ts +4 -4
- package/esm/PieChart/PieArc.js +7 -7
- package/esm/PieChart/PieArcLabel.d.ts +4 -4
- package/esm/PieChart/PieArcLabel.js +6 -6
- package/esm/PieChart/PieArcLabelPlot.d.ts +5 -1
- package/esm/PieChart/PieArcLabelPlot.js +5 -5
- package/esm/PieChart/PieArcPlot.d.ts +5 -1
- package/esm/PieChart/PieArcPlot.js +6 -6
- package/esm/PieChart/PieChart.js +4 -4
- package/esm/PieChart/PiePlot.js +2 -2
- package/esm/PieChart/index.d.ts +1 -0
- package/esm/PieChart/index.js +1 -0
- package/esm/PieChart/pieClasses.d.ts +1 -1
- package/esm/PieChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/PieChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.d.ts +1 -1
- package/esm/PieChart/seriesConfig/index.js +3 -1
- package/esm/PieChart/seriesConfig/legend.d.ts +1 -1
- package/esm/PieChart/seriesConfig/legend.js +0 -1
- package/esm/PieChart/seriesConfig/seriesLayout.d.ts +1 -1
- package/esm/PieChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/PieChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/PieChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/RadarChart/RadarAxisHighlight/index.d.ts +2 -1
- package/esm/RadarChart/RadarAxisHighlight/index.js +2 -1
- package/esm/RadarChart/RadarChart.js +4 -4
- package/esm/RadarChart/RadarGrid/index.d.ts +2 -1
- package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +2 -0
- package/esm/RadarChart/RadarSeriesPlot/useRadarRotationIndex.js +2 -2
- package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +2 -2
- package/esm/RadarChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/index.js +3 -1
- package/esm/RadarChart/seriesConfig/legend.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/legend.js +0 -1
- package/esm/RadarChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/RadarChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/ScatterChart/BatchScatter.d.ts +1 -1
- package/esm/ScatterChart/Scatter.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +9 -4
- package/esm/ScatterChart/scatterClasses.js +2 -2
- package/esm/ScatterChart/seriesConfig/extremums.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getColor.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/index.js +3 -1
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.d.ts +2 -1
- package/esm/ScatterChart/seriesConfig/keyboardFocusHandler.js +5 -6
- package/esm/ScatterChart/seriesConfig/legend.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/legend.js +0 -1
- package/esm/ScatterChart/seriesConfig/seriesProcessor.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/tooltip.d.ts +1 -1
- package/esm/ScatterChart/seriesConfig/tooltipPosition.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.d.ts +1 -1
- package/esm/SparkLineChart/SparkLineChart.js +16 -16
- package/esm/context/ChartProvider/ChartProvider.d.ts +3 -4
- package/esm/context/ChartProvider/ChartProvider.js +2 -14
- package/esm/context/ChartProvider/ChartProvider.types.d.ts +3 -18
- package/esm/context/index.d.ts +2 -1
- package/esm/hooks/index.d.ts +4 -1
- package/esm/hooks/index.js +3 -1
- package/esm/hooks/useAxisCoordinates.d.ts +30 -0
- package/esm/hooks/useAxisCoordinates.js +105 -0
- package/esm/hooks/useAxisTicks.d.ts +14 -0
- package/esm/hooks/useAxisTicks.js +68 -0
- package/esm/hooks/useChartRootRef.d.ts +1 -1
- package/esm/hooks/useChartRootRef.js +4 -2
- package/esm/hooks/useInteractionItemProps.d.ts +1 -1
- package/esm/hooks/useLegend.js +1 -1
- package/esm/hooks/useSvgRef.js +4 -5
- package/esm/hooks/useTicks.d.ts +19 -4
- package/esm/index.d.ts +3 -1
- package/esm/index.js +2 -1
- package/esm/internals/commonNextFocusItem.d.ts +2 -0
- package/esm/internals/commonNextFocusItem.js +3 -2
- package/esm/internals/components/WebGLContext.d.ts +3 -0
- package/esm/internals/components/WebGLContext.js +108 -0
- package/esm/internals/consumeSlots.js +1 -1
- package/esm/internals/consumeThemeProps.js +1 -1
- package/esm/internals/{getBarDimensions.d.ts → createGetBarDimensions.d.ts} +2 -4
- package/esm/internals/createGetBarDimensions.js +55 -0
- package/esm/internals/getChartPoint.d.ts +7 -0
- package/esm/internals/getChartPoint.js +13 -0
- package/esm/internals/getSeriesColorFn.d.ts +3 -2
- package/esm/internals/identifierCleaner.d.ts +11 -0
- package/esm/internals/identifierCleaner.js +12 -0
- package/esm/internals/index.d.ts +7 -2
- package/esm/internals/index.js +7 -3
- package/esm/internals/plugins/corePlugins/corePlugins.d.ts +5 -3
- package/esm/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/esm/internals/plugins/corePlugins/index.d.ts +2 -1
- package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +4 -1
- package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +5 -5
- package/esm/internals/plugins/corePlugins/useChartElementRef/index.d.ts +2 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/index.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.js +14 -0
- package/esm/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.types.d.ts +15 -0
- package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +5 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +6 -14
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +4 -7
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +2 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -16
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/index.d.ts +4 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/index.js +3 -0
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/cartesianExtremumGetter.types.d.ts +3 -3
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/colorProcessor.types.d.ts +4 -4
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +8 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +3 -0
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.d.ts +3 -1
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.js +3 -1
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +4 -0
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/polarExtremumGetter.types.d.ts +3 -3
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesConfig.types.d.ts +13 -5
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/seriesLayout.types.d.ts +3 -3
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesProcessor.types.d.ts +4 -4
- package/esm/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/tooltipGetter.types.d.ts +5 -5
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.js +1 -0
- package/{internals/plugins/models/seriesConfig → esm/internals/plugins/corePlugins/useChartSeriesConfig/types}/tooltipItemPositionGetter.types.d.ts +6 -6
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.d.ts +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.js +35 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.d.ts +6 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.js +3 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +48 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js +1 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +15 -0
- package/esm/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.js +18 -0
- package/esm/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +3 -2
- package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +2 -2
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +6 -4
- package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +14 -14
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +4 -3
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +22 -9
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +18 -12
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +7 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +50 -51
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +8 -8
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -3
- package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +11 -7
- package/esm/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +3 -3
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +17 -19
- package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +2 -1
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -3
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +7 -7
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +8 -7
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +5 -5
- package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -1
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +4 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -5
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +1 -1
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +1 -1
- package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/esm/internals/plugins/models/index.d.ts +1 -2
- package/esm/internals/plugins/models/index.js +1 -2
- package/esm/internals/plugins/models/plugin.d.ts +1 -16
- package/esm/internals/plugins/utils/defaultSeriesConfig.d.ts +2 -0
- package/esm/internals/plugins/utils/defaultSeriesConfig.js +10 -0
- package/esm/internals/seriesSelectorOfType.d.ts +8 -8
- package/esm/internals/seriesSelectorOfType.js +1 -1
- package/esm/internals/stacking/stackSeries.d.ts +3 -2
- package/esm/internals/stacking/stackSeries.js +0 -1
- package/esm/internals/store/useCharts.d.ts +2 -7
- package/esm/internals/store/useCharts.js +4 -12
- package/esm/internals/store/useCharts.types.d.ts +6 -0
- package/esm/models/axis.d.ts +16 -3
- package/esm/models/index.d.ts +1 -0
- package/esm/models/seriesType/bar.d.ts +1 -1
- package/esm/models/seriesType/common.d.ts +5 -5
- package/esm/models/seriesType/config.d.ts +8 -1
- package/esm/models/seriesType/index.d.ts +5 -30
- package/esm/models/seriesType/index.js +1 -32
- package/esm/models/seriesType/line.d.ts +1 -1
- package/esm/models/seriesType/pie.d.ts +1 -1
- package/esm/models/seriesType/radar.d.ts +1 -1
- package/esm/models/seriesType/scatter.d.ts +1 -1
- package/hooks/index.d.ts +4 -1
- package/hooks/index.js +28 -1
- package/hooks/useAxisCoordinates.d.ts +30 -0
- package/hooks/useAxisCoordinates.js +115 -0
- package/hooks/useAxisTicks.d.ts +14 -0
- package/hooks/useAxisTicks.js +75 -0
- package/hooks/useChartRootRef.d.ts +1 -1
- package/hooks/useChartRootRef.js +4 -2
- package/hooks/useInteractionItemProps.d.ts +1 -1
- package/hooks/useLegend.js +2 -2
- package/hooks/useSvgRef.js +4 -5
- package/hooks/useTicks.d.ts +19 -4
- package/index.d.ts +3 -1
- package/index.js +9 -1
- package/internals/commonNextFocusItem.d.ts +2 -0
- package/internals/commonNextFocusItem.js +4 -2
- package/internals/components/WebGLContext.d.ts +3 -0
- package/internals/components/WebGLContext.js +116 -0
- package/internals/consumeSlots.js +1 -1
- package/internals/consumeThemeProps.js +1 -1
- package/internals/{getBarDimensions.d.ts → createGetBarDimensions.d.ts} +2 -4
- package/internals/createGetBarDimensions.js +61 -0
- package/internals/getChartPoint.d.ts +7 -0
- package/internals/getChartPoint.js +19 -0
- package/internals/getSeriesColorFn.d.ts +3 -2
- package/internals/identifierCleaner.d.ts +11 -0
- package/internals/identifierCleaner.js +19 -0
- package/internals/index.d.ts +7 -2
- package/internals/index.js +64 -4
- package/internals/plugins/corePlugins/corePlugins.d.ts +5 -3
- package/internals/plugins/corePlugins/corePlugins.js +3 -1
- package/internals/plugins/corePlugins/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +4 -1
- package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +5 -5
- package/internals/plugins/corePlugins/useChartElementRef/index.d.ts +2 -0
- package/internals/plugins/corePlugins/useChartElementRef/index.js +12 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.js +21 -0
- package/internals/plugins/corePlugins/useChartElementRef/useChartElementRef.types.d.ts +15 -0
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +5 -2
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +6 -14
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +4 -7
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +5 -5
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +3 -16
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.js +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/index.d.ts +4 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/index.js +39 -0
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/cartesianExtremumGetter.types.d.ts +3 -3
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/colorProcessor.types.d.ts +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +3 -0
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.d.ts +3 -1
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/index.js +22 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +4 -0
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/polarExtremumGetter.types.d.ts +3 -3
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesConfig.types.d.ts +13 -5
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/seriesLayout.types.d.ts +3 -3
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/seriesProcessor.types.d.ts +4 -4
- package/internals/plugins/{models/seriesConfig → corePlugins/useChartSeriesConfig/types}/tooltipGetter.types.d.ts +5 -5
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.js +5 -0
- package/{esm/internals/plugins/models/seriesConfig → internals/plugins/corePlugins/useChartSeriesConfig/types}/tooltipItemPositionGetter.types.d.ts +6 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.d.ts +3 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.js +42 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.d.ts +6 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.selectors.js +10 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +48 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +15 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.js +25 -0
- package/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.d.ts +2 -2
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +3 -2
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +2 -2
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +6 -4
- package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +14 -14
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisDomainLimit.d.ts +4 -3
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisExtrema.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +21 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +18 -12
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +7 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisLayout.selectors.js +4 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +50 -51
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +7 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +8 -8
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +5 -3
- package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/createIsFaded.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/createIsHighlighted.d.ts +2 -2
- package/internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +11 -7
- package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +5 -5
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +17 -19
- package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +3 -3
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +4 -4
- package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +2 -1
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -3
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +7 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +8 -7
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.js +3 -2
- package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +6 -6
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +5 -5
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +4 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -5
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +1 -1
- package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +1 -1
- package/internals/plugins/models/index.d.ts +1 -2
- package/internals/plugins/models/index.js +0 -11
- package/internals/plugins/models/plugin.d.ts +1 -16
- package/internals/plugins/utils/defaultSeriesConfig.d.ts +2 -0
- package/internals/plugins/utils/defaultSeriesConfig.js +16 -0
- package/internals/seriesSelectorOfType.d.ts +8 -8
- package/internals/seriesSelectorOfType.js +1 -1
- package/internals/stacking/stackSeries.d.ts +3 -2
- package/internals/stacking/stackSeries.js +0 -1
- package/internals/store/useCharts.d.ts +2 -7
- package/internals/store/useCharts.js +4 -12
- package/internals/store/useCharts.types.d.ts +6 -0
- package/models/axis.d.ts +16 -3
- package/models/index.d.ts +1 -0
- package/models/seriesType/bar.d.ts +1 -1
- package/models/seriesType/common.d.ts +5 -5
- package/models/seriesType/config.d.ts +8 -1
- package/models/seriesType/index.d.ts +5 -30
- package/models/seriesType/index.js +1 -48
- package/models/seriesType/line.d.ts +1 -1
- package/models/seriesType/pie.d.ts +1 -1
- package/models/seriesType/radar.d.ts +1 -1
- package/models/seriesType/scatter.d.ts +1 -1
- package/package.json +5 -5
- package/ChartsTooltip/useAxisTooltip.d.ts +0 -42
- package/ChartsTooltip/useAxisTooltip.js +0 -181
- package/esm/ChartsTooltip/useAxisTooltip.d.ts +0 -42
- package/esm/ChartsTooltip/useAxisTooltip.js +0 -176
- package/esm/internals/getBarDimensions.js +0 -55
- package/esm/internals/getSVGPoint.d.ts +0 -6
- package/esm/internals/getSVGPoint.js +0 -11
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +0 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +0 -5
- package/esm/internals/plugins/models/seriesConfig/getItemAtPosition.types.d.ts +0 -8
- package/esm/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +0 -3
- package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +0 -2
- package/esm/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +0 -4
- package/internals/getBarDimensions.js +0 -61
- package/internals/getSVGPoint.d.ts +0 -6
- package/internals/getSVGPoint.js +0 -17
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +0 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +0 -12
- package/internals/plugins/models/seriesConfig/getItemAtPosition.types.d.ts +0 -8
- package/internals/plugins/models/seriesConfig/getSeriesWithDefaultValues.types.d.ts +0 -3
- package/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +0 -2
- package/internals/plugins/models/seriesConfig/legendGetter.types.d.ts +0 -4
- /package/esm/internals/plugins/{models/seriesConfig/cartesianExtremumGetter.types.js → corePlugins/useChartElementRef/useChartElementRef.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/colorProcessor.types.js → corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/getItemAtPosition.types.js → corePlugins/useChartSeriesConfig/types/colorProcessor.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/getSeriesWithDefaultValues.types.js → corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/identifierSerializer.types.js → corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/legendGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierCleaner.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/polarExtremumGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierSerializer.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesConfig.types.js → corePlugins/useChartSeriesConfig/types/legendGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesLayout.types.js → corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/seriesProcessor.types.js → corePlugins/useChartSeriesConfig/types/seriesConfig.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/tooltipGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesLayout.types.js} +0 -0
- /package/esm/internals/plugins/{models/seriesConfig/tooltipItemPositionGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesProcessor.types.js} +0 -0
- /package/esm/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.js +0 -0
- /package/internals/plugins/{models/seriesConfig/cartesianExtremumGetter.types.js → corePlugins/useChartElementRef/useChartElementRef.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/colorProcessor.types.js → corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/getItemAtPosition.types.js → corePlugins/useChartSeriesConfig/types/colorProcessor.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/getSeriesWithDefaultValues.types.js → corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/identifierSerializer.types.js → corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/legendGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierCleaner.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/polarExtremumGetter.types.js → corePlugins/useChartSeriesConfig/types/identifierSerializer.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesConfig.types.js → corePlugins/useChartSeriesConfig/types/legendGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesLayout.types.js → corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/seriesProcessor.types.js → corePlugins/useChartSeriesConfig/types/seriesConfig.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/tooltipGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesLayout.types.js} +0 -0
- /package/internals/plugins/{models/seriesConfig/tooltipItemPositionGetter.types.js → corePlugins/useChartSeriesConfig/types/seriesProcessor.types.js} +0 -0
- /package/internals/plugins/corePlugins/{useChartSeries → useChartSeriesConfig/utils}/serializeIdentifier.js +0 -0
|
@@ -22,9 +22,8 @@ let globalId = 0;
|
|
|
22
22
|
*
|
|
23
23
|
* @param inPlugins All the plugins that will be used in the chart.
|
|
24
24
|
* @param props The props passed to the chart.
|
|
25
|
-
* @param seriesConfig The set of helpers used for series-specific computation.
|
|
26
25
|
*/
|
|
27
|
-
function useCharts(inPlugins, props
|
|
26
|
+
function useCharts(inPlugins, props) {
|
|
28
27
|
const chartId = (0, _useId.default)();
|
|
29
28
|
const plugins = React.useMemo(() => [..._corePlugins.CHART_CORE_PLUGINS, ...inPlugins], [inPlugins]);
|
|
30
29
|
const pluginParams = (0, _extractPluginParamsFromProps.extractPluginParamsFromProps)({
|
|
@@ -35,8 +34,6 @@ function useCharts(inPlugins, props, seriesConfig) {
|
|
|
35
34
|
const instanceRef = React.useRef({});
|
|
36
35
|
const instance = instanceRef.current;
|
|
37
36
|
const publicAPI = useChartApiInitialization(props.apiRef);
|
|
38
|
-
const innerChartRootRef = React.useRef(null);
|
|
39
|
-
const innerSvgRef = React.useRef(null);
|
|
40
37
|
const storeRef = React.useRef(null);
|
|
41
38
|
if (storeRef.current == null) {
|
|
42
39
|
// eslint-disable-next-line react-compiler/react-compiler
|
|
@@ -48,7 +45,7 @@ function useCharts(inPlugins, props, seriesConfig) {
|
|
|
48
45
|
};
|
|
49
46
|
plugins.forEach(plugin => {
|
|
50
47
|
if (plugin.getInitialState) {
|
|
51
|
-
Object.assign(initialState, plugin.getInitialState(pluginParams, initialState
|
|
48
|
+
Object.assign(initialState, plugin.getInitialState(pluginParams, initialState));
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
51
|
storeRef.current = new _store.Store(initialState);
|
|
@@ -58,10 +55,7 @@ function useCharts(inPlugins, props, seriesConfig) {
|
|
|
58
55
|
instance,
|
|
59
56
|
params: pluginParams,
|
|
60
57
|
plugins: plugins,
|
|
61
|
-
store: storeRef.current
|
|
62
|
-
svgRef: innerSvgRef,
|
|
63
|
-
chartRootRef: innerChartRootRef,
|
|
64
|
-
seriesConfig
|
|
58
|
+
store: storeRef.current
|
|
65
59
|
});
|
|
66
60
|
if (pluginResponse.publicAPI) {
|
|
67
61
|
Object.assign(publicAPI.current, pluginResponse.publicAPI);
|
|
@@ -74,9 +68,7 @@ function useCharts(inPlugins, props, seriesConfig) {
|
|
|
74
68
|
const contextValue = React.useMemo(() => ({
|
|
75
69
|
store: storeRef.current,
|
|
76
70
|
publicAPI: publicAPI.current,
|
|
77
|
-
instance
|
|
78
|
-
svgRef: innerSvgRef,
|
|
79
|
-
chartRootRef: innerChartRootRef
|
|
71
|
+
instance
|
|
80
72
|
}), [instance, publicAPI]);
|
|
81
73
|
return {
|
|
82
74
|
contextValue
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import { type ChartAnyPluginSignature, type ChartPublicAPI } from "../plugins/models/index.js";
|
|
3
|
+
import type { ChartSeriesConfig } from "../plugins/corePlugins/useChartSeriesConfig/index.js";
|
|
3
4
|
export interface UseChartBaseProps<TSignatures extends readonly ChartAnyPluginSignature[]> {
|
|
4
5
|
apiRef?: React.RefObject<ChartPublicAPI<TSignatures> | undefined>;
|
|
6
|
+
/**
|
|
7
|
+
* The configuration for the series types.
|
|
8
|
+
* This is used to define how each series type should be processed, colored, and displayed.
|
|
9
|
+
*/
|
|
10
|
+
seriesConfig?: ChartSeriesConfig<any>;
|
|
5
11
|
}
|
package/models/axis.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
1
2
|
import type { ScaleBand, ScaleLinear, ScaleLogarithmic, ScaleOrdinal, ScalePoint, ScalePower, ScaleSequential, ScaleThreshold, ScaleTime, ScaleSymLog, NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
2
3
|
import { type SxProps } from '@mui/system/styleFunctionSx';
|
|
3
4
|
import { type HasProperty, type MakeOptional, type MakeRequired } from '@mui/x-internals/types';
|
|
@@ -41,12 +42,24 @@ export interface ChartsAxisSlots {
|
|
|
41
42
|
* @default ChartsText
|
|
42
43
|
*/
|
|
43
44
|
axisLabel?: React.JSXElementConstructor<ChartsTextProps>;
|
|
45
|
+
/**
|
|
46
|
+
* Custom component for the x-axis.
|
|
47
|
+
* @default ChartsXAxis
|
|
48
|
+
*/
|
|
49
|
+
xAxis?: React.JSXElementConstructor<ChartsXAxisProps>;
|
|
50
|
+
/**
|
|
51
|
+
* Custom component for the y-axis.
|
|
52
|
+
* @default ChartsYAxis
|
|
53
|
+
*/
|
|
54
|
+
yAxis?: React.JSXElementConstructor<ChartsYAxisProps>;
|
|
44
55
|
}
|
|
45
56
|
export interface ChartsAxisSlotProps {
|
|
46
57
|
axisLine?: Partial<React.SVGAttributes<SVGPathElement>>;
|
|
47
58
|
axisTick?: Partial<React.SVGAttributes<SVGPathElement>>;
|
|
48
59
|
axisTickLabel?: Partial<ChartsTextProps>;
|
|
49
60
|
axisLabel?: Partial<ChartsTextProps>;
|
|
61
|
+
xAxis?: Partial<ChartsXAxisProps>;
|
|
62
|
+
yAxis?: Partial<ChartsYAxisProps>;
|
|
50
63
|
}
|
|
51
64
|
export interface ChartsAxisProps extends TickParams {
|
|
52
65
|
/**
|
|
@@ -448,9 +461,9 @@ type CommonAxisConfig<S extends ScaleName = ScaleName, V = any> = {
|
|
|
448
461
|
* - 'strict': Set the domain to the min/max value provided. No extra space is added.
|
|
449
462
|
* - function: Receives the calculated extremums as parameters, and should return the axis domain.
|
|
450
463
|
*/
|
|
451
|
-
domainLimit?: 'nice' | 'strict' | ((min:
|
|
452
|
-
min:
|
|
453
|
-
max:
|
|
464
|
+
domainLimit?: 'nice' | 'strict' | ((min: NumberValue, max: NumberValue) => {
|
|
465
|
+
min: NumberValue;
|
|
466
|
+
max: NumberValue;
|
|
454
467
|
});
|
|
455
468
|
/**
|
|
456
469
|
* If `true`, the axis will be ignored by the tooltip with `trigger='axis'`.
|
package/models/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./stacking.js";
|
|
|
3
3
|
export * from "./slots/index.js";
|
|
4
4
|
export * from "./featureFlags.js";
|
|
5
5
|
export type { AxisConfig, ChartsYAxisProps, ChartsXAxisProps, ScaleName, ContinuousScaleName, ChartsAxisData, XAxis, YAxis, RadiusAxis, RotationAxis, AxisItemIdentifier, AxisValueFormatterContext } from "./axis.js";
|
|
6
|
+
export type { NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
6
7
|
export type { PropsFromSlot } from '@mui/x-internals/slots';
|
|
7
8
|
export type { Position } from "./position.js";
|
|
8
9
|
export type { CurveType } from "./curve.js";
|
|
@@ -3,7 +3,7 @@ import type { StackOffsetType } from "../stacking.js";
|
|
|
3
3
|
import { type CartesianSeriesType, type CommonSeriesType, type CommonDefaultizedProps, type StackableSeriesType, type SeriesId } from "./common.js";
|
|
4
4
|
import { type BarItem, type BarLabelContext } from "../../BarChart/index.js";
|
|
5
5
|
export type BarValueType = number;
|
|
6
|
-
export interface BarSeriesType extends CommonSeriesType<BarValueType | null>, CartesianSeriesType, StackableSeriesType {
|
|
6
|
+
export interface BarSeriesType extends CommonSeriesType<BarValueType | null, 'bar'>, CartesianSeriesType, StackableSeriesType {
|
|
7
7
|
type: 'bar';
|
|
8
8
|
/**
|
|
9
9
|
* Data associated to each bar.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type HighlightScope } from "../../internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.js";
|
|
2
1
|
import type { StackOffsetType, StackOrderType } from "../stacking.js";
|
|
3
2
|
import type { ChartsLabelMarkType } from "../../ChartsLabel/ChartsLabelMark.js";
|
|
4
|
-
import {
|
|
3
|
+
import type { AxisId } from "../axis.js";
|
|
4
|
+
import type { ChartSeriesType, HighlightScope } from "./config.js";
|
|
5
5
|
/**
|
|
6
6
|
* The unique identifier of a series.
|
|
7
7
|
*/
|
|
8
|
-
export type SeriesId =
|
|
8
|
+
export type SeriesId = string;
|
|
9
9
|
export type SeriesValueFormatterContext = {
|
|
10
10
|
/**
|
|
11
11
|
* The index of the value in the data array.
|
|
@@ -33,7 +33,7 @@ export interface SeriesColor<TValue> {
|
|
|
33
33
|
*/
|
|
34
34
|
colorGetter?: (data: ColorCallbackValue<TValue>) => string;
|
|
35
35
|
}
|
|
36
|
-
export interface CommonSeriesType<TValue> extends SeriesColor<TValue> {
|
|
36
|
+
export interface CommonSeriesType<TValue, SeriesType extends ChartSeriesType> extends SeriesColor<TValue> {
|
|
37
37
|
/**
|
|
38
38
|
* The id of this series.
|
|
39
39
|
*/
|
|
@@ -48,7 +48,7 @@ export interface CommonSeriesType<TValue> extends SeriesColor<TValue> {
|
|
|
48
48
|
/**
|
|
49
49
|
* The scope to apply when the series is highlighted.
|
|
50
50
|
*/
|
|
51
|
-
highlightScope?: HighlightScope
|
|
51
|
+
highlightScope?: HighlightScope<SeriesType>;
|
|
52
52
|
/**
|
|
53
53
|
* Defines the mark type for the series.
|
|
54
54
|
*
|
|
@@ -5,6 +5,7 @@ import type { BarItemIdentifier, BarSeriesType, DefaultizedBarSeriesType } from
|
|
|
5
5
|
import type { PieSeriesType, DefaultizedPieSeriesType, PieItemIdentifier, PieValueType, DefaultizedPieValueType, PieSeriesLayout } from "./pie.js";
|
|
6
6
|
import type { DefaultizedRadarSeriesType, RadarItemIdentifier, RadarSeriesType } from "./radar.js";
|
|
7
7
|
import type { SeriesColor } from "./common.js";
|
|
8
|
+
import type { CommonHighlightScope } from "../../internals/plugins/featurePlugins/useChartHighlight/highlightConfig.types.js";
|
|
8
9
|
export interface ChartsSeriesConfig {
|
|
9
10
|
bar: {
|
|
10
11
|
/**
|
|
@@ -29,6 +30,7 @@ export interface ChartsSeriesConfig {
|
|
|
29
30
|
valueType: number | null;
|
|
30
31
|
canBeStacked: true;
|
|
31
32
|
axisType: 'cartesian';
|
|
33
|
+
highlightScope: CommonHighlightScope;
|
|
32
34
|
};
|
|
33
35
|
line: {
|
|
34
36
|
seriesInput: DefaultizedProps<LineSeriesType, 'id'> & MakeRequired<SeriesColor<number | null>, 'color'>;
|
|
@@ -40,6 +42,7 @@ export interface ChartsSeriesConfig {
|
|
|
40
42
|
valueType: number | null;
|
|
41
43
|
canBeStacked: true;
|
|
42
44
|
axisType: 'cartesian';
|
|
45
|
+
highlightScope: CommonHighlightScope;
|
|
43
46
|
};
|
|
44
47
|
scatter: {
|
|
45
48
|
seriesInput: DefaultizedProps<ScatterSeriesType, 'id'> & MakeRequired<SeriesColor<ScatterValueType | null>, 'color'>;
|
|
@@ -50,6 +53,7 @@ export interface ChartsSeriesConfig {
|
|
|
50
53
|
itemIdentifier: ScatterItemIdentifier;
|
|
51
54
|
itemIdentifierWithData: ScatterItemIdentifier;
|
|
52
55
|
axisType: 'cartesian';
|
|
56
|
+
highlightScope: CommonHighlightScope;
|
|
53
57
|
};
|
|
54
58
|
pie: {
|
|
55
59
|
seriesInput: Omit<DefaultizedProps<PieSeriesType, 'id'>, 'data'> & {
|
|
@@ -61,6 +65,7 @@ export interface ChartsSeriesConfig {
|
|
|
61
65
|
itemIdentifier: PieItemIdentifier;
|
|
62
66
|
itemIdentifierWithData: PieItemIdentifier;
|
|
63
67
|
valueType: DefaultizedPieValueType;
|
|
68
|
+
highlightScope: CommonHighlightScope;
|
|
64
69
|
};
|
|
65
70
|
radar: {
|
|
66
71
|
seriesInput: DefaultizedProps<RadarSeriesType, 'id'> & MakeRequired<SeriesColor<number>, 'color'>;
|
|
@@ -71,6 +76,7 @@ export interface ChartsSeriesConfig {
|
|
|
71
76
|
itemIdentifierWithData: RadarItemIdentifier;
|
|
72
77
|
valueType: number;
|
|
73
78
|
axisType: 'polar';
|
|
79
|
+
highlightScope: CommonHighlightScope;
|
|
74
80
|
};
|
|
75
81
|
}
|
|
76
82
|
export type ChartSeriesType = keyof ChartsSeriesConfig;
|
|
@@ -94,4 +100,5 @@ export type ChartSeriesLayout<T extends ChartSeriesType> = ChartsSeriesConfig[T]
|
|
|
94
100
|
export type DatasetElementType<T> = {
|
|
95
101
|
[key: string]: T;
|
|
96
102
|
};
|
|
97
|
-
export type DatasetType<T = unknown> = DatasetElementType<T>[];
|
|
103
|
+
export type DatasetType<T = unknown> = DatasetElementType<T>[];
|
|
104
|
+
export type HighlightScope<T extends ChartSeriesType> = ChartsSeriesConfig[T] extends any ? ChartsSeriesConfig[T]['highlightScope'] : never;
|
|
@@ -1,40 +1,15 @@
|
|
|
1
1
|
import type { DefaultizedProps } from '@mui/x-internals/types';
|
|
2
|
-
import type
|
|
3
|
-
import { type CartesianChartSeriesType, type ChartSeriesType, type ChartsSeriesConfig, type StackableChartSeriesType } from "./config.js";
|
|
2
|
+
import { type ChartSeriesType, type ChartsSeriesConfig } from "./config.js";
|
|
4
3
|
type AllSeriesType<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['seriesProp'];
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why.
|
|
7
|
-
* Otherwise, it will be removed in next major.
|
|
8
|
-
*/
|
|
9
|
-
type CartesianSeriesType = AllSeriesType<CartesianChartSeriesType>;
|
|
10
4
|
type DefaultizedSeriesType<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['series'];
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* Otherwise, it will be removed in next major.
|
|
14
|
-
*/
|
|
15
|
-
type DefaultizedCartesianSeriesType = DefaultizedSeriesType<CartesianChartSeriesType>;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why.
|
|
18
|
-
* Otherwise, it will be removed in next major.
|
|
19
|
-
*/
|
|
20
|
-
type StackableSeriesType = DefaultizedSeriesType<StackableChartSeriesType>;
|
|
21
|
-
export type SeriesItemIdentifier<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['itemIdentifier'];
|
|
22
|
-
export type SeriesItemIdentifierWithData<T extends ChartSeriesType = ChartSeriesType> = ChartsSeriesConfig[T]['itemIdentifierWithData'];
|
|
5
|
+
export type SeriesItemIdentifier<T extends ChartSeriesType> = T extends ChartSeriesType ? ChartsSeriesConfig[T]['itemIdentifier'] : never;
|
|
6
|
+
export type SeriesItemIdentifierWithData<T extends ChartSeriesType> = T extends ChartSeriesType ? ChartsSeriesConfig[T]['itemIdentifierWithData'] : never;
|
|
23
7
|
export type FocusedItemIdentifier<T extends ChartSeriesType = ChartSeriesType> = T extends 'line' | 'radar' ? DefaultizedProps<ChartsSeriesConfig[T]['itemIdentifier'], 'dataIndex'> : T extends 'heatmap' ? DefaultizedProps<ChartsSeriesConfig[T]['itemIdentifier'], 'xIndex' | 'yIndex'> : ChartsSeriesConfig[T]['itemIdentifier'];
|
|
24
8
|
export { type SeriesId } from "./common.js";
|
|
9
|
+
export type { CartesianChartSeriesType, StackableChartSeriesType } from "./config.js";
|
|
25
10
|
export * from "./line.js";
|
|
26
11
|
export * from "./bar.js";
|
|
27
12
|
export * from "./scatter.js";
|
|
28
13
|
export * from "./pie.js";
|
|
29
14
|
export * from "./radar.js";
|
|
30
|
-
export type { AllSeriesType, DefaultizedSeriesType
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why.
|
|
33
|
-
* Otherwise, it will be removed in next major.
|
|
34
|
-
*/
|
|
35
|
-
export declare function isDefaultizedBarSeries(series: DefaultizedSeriesType): series is DefaultizedBarSeriesType;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why.
|
|
38
|
-
* Otherwise, it will be removed in next major.
|
|
39
|
-
*/
|
|
40
|
-
export declare function isBarSeries(series: AllSeriesType): series is BarSeriesType;
|
|
15
|
+
export type { AllSeriesType, DefaultizedSeriesType };
|
|
@@ -3,16 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
isDefaultizedBarSeries: true,
|
|
8
|
-
isBarSeries: true
|
|
9
|
-
};
|
|
10
|
-
exports.isBarSeries = isBarSeries;
|
|
11
|
-
exports.isDefaultizedBarSeries = isDefaultizedBarSeries;
|
|
12
6
|
var _line = require("./line");
|
|
13
7
|
Object.keys(_line).forEach(function (key) {
|
|
14
8
|
if (key === "default" || key === "__esModule") return;
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
16
9
|
if (key in exports && exports[key] === _line[key]) return;
|
|
17
10
|
Object.defineProperty(exports, key, {
|
|
18
11
|
enumerable: true,
|
|
@@ -24,7 +17,6 @@ Object.keys(_line).forEach(function (key) {
|
|
|
24
17
|
var _bar = require("./bar");
|
|
25
18
|
Object.keys(_bar).forEach(function (key) {
|
|
26
19
|
if (key === "default" || key === "__esModule") return;
|
|
27
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
28
20
|
if (key in exports && exports[key] === _bar[key]) return;
|
|
29
21
|
Object.defineProperty(exports, key, {
|
|
30
22
|
enumerable: true,
|
|
@@ -36,7 +28,6 @@ Object.keys(_bar).forEach(function (key) {
|
|
|
36
28
|
var _scatter = require("./scatter");
|
|
37
29
|
Object.keys(_scatter).forEach(function (key) {
|
|
38
30
|
if (key === "default" || key === "__esModule") return;
|
|
39
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
31
|
if (key in exports && exports[key] === _scatter[key]) return;
|
|
41
32
|
Object.defineProperty(exports, key, {
|
|
42
33
|
enumerable: true,
|
|
@@ -48,7 +39,6 @@ Object.keys(_scatter).forEach(function (key) {
|
|
|
48
39
|
var _pie = require("./pie");
|
|
49
40
|
Object.keys(_pie).forEach(function (key) {
|
|
50
41
|
if (key === "default" || key === "__esModule") return;
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
52
42
|
if (key in exports && exports[key] === _pie[key]) return;
|
|
53
43
|
Object.defineProperty(exports, key, {
|
|
54
44
|
enumerable: true,
|
|
@@ -60,7 +50,6 @@ Object.keys(_pie).forEach(function (key) {
|
|
|
60
50
|
var _radar = require("./radar");
|
|
61
51
|
Object.keys(_radar).forEach(function (key) {
|
|
62
52
|
if (key === "default" || key === "__esModule") return;
|
|
63
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
64
53
|
if (key in exports && exports[key] === _radar[key]) return;
|
|
65
54
|
Object.defineProperty(exports, key, {
|
|
66
55
|
enumerable: true,
|
|
@@ -68,40 +57,4 @@ Object.keys(_radar).forEach(function (key) {
|
|
|
68
57
|
return _radar[key];
|
|
69
58
|
}
|
|
70
59
|
});
|
|
71
|
-
});
|
|
72
|
-
// Series definition
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why.
|
|
76
|
-
* Otherwise, it will be removed in next major.
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why.
|
|
81
|
-
* Otherwise, it will be removed in next major.
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @deprecated We do not use this type in v8. If it's useful for you use case, please open an issue explaining why.
|
|
86
|
-
* Otherwise, it will be removed in next major.
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
// item identifier
|
|
90
|
-
|
|
91
|
-
// Helpers
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why.
|
|
95
|
-
* Otherwise, it will be removed in next major.
|
|
96
|
-
*/
|
|
97
|
-
function isDefaultizedBarSeries(series) {
|
|
98
|
-
return series.type === 'bar';
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @deprecated We do not use this function in v8. If it's useful for you use case, please open an issue explaining why.
|
|
103
|
-
* Otherwise, it will be removed in next major.
|
|
104
|
-
*/
|
|
105
|
-
function isBarSeries(series) {
|
|
106
|
-
return series.type === 'bar';
|
|
107
|
-
}
|
|
60
|
+
});
|
|
@@ -24,7 +24,7 @@ export interface ShowMarkParams<AxisValue = number | Date> {
|
|
|
24
24
|
*/
|
|
25
25
|
value: number;
|
|
26
26
|
}
|
|
27
|
-
export interface LineSeriesType extends CommonSeriesType<number | null>, CartesianSeriesType, StackableSeriesType {
|
|
27
|
+
export interface LineSeriesType extends CommonSeriesType<number | null, 'line'>, CartesianSeriesType, StackableSeriesType {
|
|
28
28
|
type: 'line';
|
|
29
29
|
/**
|
|
30
30
|
* Data associated to the line.
|
|
@@ -26,7 +26,7 @@ export type DefaultizedPieValueType = PieValueType & Omit<D3PieArcDatum<any>, 'd
|
|
|
26
26
|
hidden: boolean;
|
|
27
27
|
};
|
|
28
28
|
export type ChartsPieSorting = 'none' | 'asc' | 'desc' | ((a: number, b: number) => number);
|
|
29
|
-
export interface PieSeriesType<TData = PieValueType> extends CommonSeriesType<TData> {
|
|
29
|
+
export interface PieSeriesType<TData = PieValueType> extends CommonSeriesType<TData, 'pie'> {
|
|
30
30
|
type: 'pie';
|
|
31
31
|
data: Readonly<TData[]>;
|
|
32
32
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DefaultizedProps } from '@mui/x-internals/types';
|
|
2
2
|
import { type CommonDefaultizedProps, type CommonSeriesType, type SeriesId } from "./common.js";
|
|
3
|
-
export interface RadarSeriesType extends CommonSeriesType<number> {
|
|
3
|
+
export interface RadarSeriesType extends CommonSeriesType<number, 'radar'> {
|
|
4
4
|
type: 'radar';
|
|
5
5
|
data: number[];
|
|
6
6
|
/**
|
|
@@ -9,7 +9,7 @@ export type ScatterValueType = {
|
|
|
9
9
|
*/
|
|
10
10
|
id?: string | number;
|
|
11
11
|
};
|
|
12
|
-
export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | null>, CartesianSeriesType {
|
|
12
|
+
export interface ScatterSeriesType extends CommonSeriesType<ScatterValueType | null, 'scatter'>, CartesianSeriesType {
|
|
13
13
|
type: 'scatter';
|
|
14
14
|
data?: readonly ScatterValueType[];
|
|
15
15
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-alpha.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The community edition of MUI X Charts components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"directory": "packages/x-charts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@babel/runtime": "^7.28.
|
|
31
|
-
"@mui/utils": "^7.3.
|
|
30
|
+
"@babel/runtime": "^7.28.6",
|
|
31
|
+
"@mui/utils": "^7.3.7",
|
|
32
32
|
"bezier-easing": "^2.1.0",
|
|
33
33
|
"clsx": "^2.1.1",
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"reselect": "^5.1.1",
|
|
36
36
|
"use-sync-external-store": "^1.6.0",
|
|
37
|
-
"@mui/x-charts-vendor": "
|
|
37
|
+
"@mui/x-charts-vendor": "9.0.0-alpha.0",
|
|
38
38
|
"@mui/x-internal-gestures": "0.4.0",
|
|
39
|
-
"@mui/x-internals": "
|
|
39
|
+
"@mui/x-internals": "9.0.0-alpha.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@emotion/react": "^11.9.0",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { type SeriesId } from "../models/seriesType/common.js";
|
|
2
|
-
import { type CartesianChartSeriesType, type ChartsSeriesConfig, type PolarChartSeriesType } from "../models/seriesType/config.js";
|
|
3
|
-
import { type ComputedAxis, type PolarAxisDefaultized, type AxisId } from "../models/axis.js";
|
|
4
|
-
import { type ChartsLabelMarkProps } from "../ChartsLabel/index.js";
|
|
5
|
-
export interface UseAxisTooltipReturnValue<SeriesT extends CartesianChartSeriesType | PolarChartSeriesType = CartesianChartSeriesType | PolarChartSeriesType, AxisValueT extends string | number | Date = string | number | Date> {
|
|
6
|
-
axisDirection: SeriesT extends CartesianChartSeriesType ? 'x' | 'y' : 'rotation' | 'radius';
|
|
7
|
-
mainAxis: SeriesT extends CartesianChartSeriesType ? ComputedAxis : PolarAxisDefaultized;
|
|
8
|
-
axisId: AxisId;
|
|
9
|
-
axisValue: AxisValueT;
|
|
10
|
-
axisFormattedValue: string;
|
|
11
|
-
dataIndex: number;
|
|
12
|
-
seriesItems: SeriesItem<SeriesT>[];
|
|
13
|
-
}
|
|
14
|
-
export interface UseAxisTooltipParams {
|
|
15
|
-
/**
|
|
16
|
-
* If `true`, the hook returns an array with an object per active axis.
|
|
17
|
-
*/
|
|
18
|
-
multipleAxes?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The axis directions to consider.
|
|
21
|
-
* If not defined, all directions are considered
|
|
22
|
-
*/
|
|
23
|
-
directions?: ('x' | 'y' | 'rotation')[];
|
|
24
|
-
}
|
|
25
|
-
interface SeriesItem<T extends CartesianChartSeriesType | PolarChartSeriesType> {
|
|
26
|
-
seriesId: SeriesId;
|
|
27
|
-
color: string;
|
|
28
|
-
value: ChartsSeriesConfig[T]['valueType'];
|
|
29
|
-
formattedValue: string;
|
|
30
|
-
formattedLabel: string | null;
|
|
31
|
-
markType: ChartsLabelMarkProps['type'];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use `useAxesTooltip` instead.
|
|
35
|
-
*/
|
|
36
|
-
export declare function useAxisTooltip(params: UseAxisTooltipParams & {
|
|
37
|
-
multipleAxes: true;
|
|
38
|
-
}): UseAxisTooltipReturnValue[] | null;
|
|
39
|
-
export declare function useAxisTooltip(params?: UseAxisTooltipParams & {
|
|
40
|
-
multipleAxes?: false;
|
|
41
|
-
}): UseAxisTooltipReturnValue | null;
|
|
42
|
-
export {};
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.useAxisTooltip = useAxisTooltip;
|
|
8
|
-
var _useSeries = require("../hooks/useSeries");
|
|
9
|
-
var _useColorProcessor = require("../internals/plugins/corePlugins/useChartSeries/useColorProcessor");
|
|
10
|
-
var _useStore = require("../internals/store/useStore");
|
|
11
|
-
var _getLabel = require("../internals/getLabel");
|
|
12
|
-
var _isCartesian = require("../internals/isCartesian");
|
|
13
|
-
var _utils = require("./utils");
|
|
14
|
-
var _useAxis = require("../hooks/useAxis");
|
|
15
|
-
var _useZAxis = require("../hooks/useZAxis");
|
|
16
|
-
var _useChartCartesianAxis = require("../internals/plugins/featurePlugins/useChartCartesianAxis");
|
|
17
|
-
var _useChartPolarInteraction = require("../internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors");
|
|
18
|
-
var _isPolar = require("../internals/isPolar");
|
|
19
|
-
function defaultAxisTooltipConfig(axis, dataIndex, axisDirection) {
|
|
20
|
-
const axisValue = axis.data?.[dataIndex] ?? null;
|
|
21
|
-
const axisFormatter = axis.valueFormatter ?? (v => axis.scaleType === 'utc' ? (0, _utils.utcFormatter)(v) : v.toLocaleString());
|
|
22
|
-
const axisFormattedValue = axisFormatter(axisValue, {
|
|
23
|
-
location: 'tooltip',
|
|
24
|
-
scale: axis.scale
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
axisDirection,
|
|
28
|
-
axisId: axis.id,
|
|
29
|
-
mainAxis: axis,
|
|
30
|
-
dataIndex,
|
|
31
|
-
axisValue,
|
|
32
|
-
axisFormattedValue,
|
|
33
|
-
seriesItems: []
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated Use `useAxesTooltip` instead.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
function useAxisTooltip(params = {}) {
|
|
42
|
-
const {
|
|
43
|
-
multipleAxes,
|
|
44
|
-
directions
|
|
45
|
-
} = params;
|
|
46
|
-
const defaultXAxis = (0, _useAxis.useXAxis)();
|
|
47
|
-
const defaultYAxis = (0, _useAxis.useYAxis)();
|
|
48
|
-
const defaultRotationAxis = (0, _useAxis.useRotationAxis)();
|
|
49
|
-
const store = (0, _useStore.useStore)();
|
|
50
|
-
const tooltipXAxes = store.use(_useChartCartesianAxis.selectorChartsInteractionTooltipXAxes);
|
|
51
|
-
const tooltipYAxes = store.use(_useChartCartesianAxis.selectorChartsInteractionTooltipYAxes);
|
|
52
|
-
const tooltipRotationAxes = store.use(_useChartPolarInteraction.selectorChartsInteractionTooltipRotationAxes);
|
|
53
|
-
const series = (0, _useSeries.useSeries)();
|
|
54
|
-
const {
|
|
55
|
-
xAxis
|
|
56
|
-
} = (0, _useAxis.useXAxes)();
|
|
57
|
-
const {
|
|
58
|
-
yAxis
|
|
59
|
-
} = (0, _useAxis.useYAxes)();
|
|
60
|
-
const {
|
|
61
|
-
zAxis,
|
|
62
|
-
zAxisIds
|
|
63
|
-
} = (0, _useZAxis.useZAxes)();
|
|
64
|
-
const {
|
|
65
|
-
rotationAxis
|
|
66
|
-
} = (0, _useAxis.useRotationAxes)();
|
|
67
|
-
const colorProcessors = (0, _useColorProcessor.useColorProcessor)();
|
|
68
|
-
if (tooltipXAxes.length === 0 && tooltipYAxes.length === 0 && tooltipRotationAxes.length === 0) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
const tooltipAxes = [];
|
|
72
|
-
if (directions === undefined || directions.includes('x')) {
|
|
73
|
-
tooltipXAxes.forEach(({
|
|
74
|
-
axisId,
|
|
75
|
-
dataIndex
|
|
76
|
-
}) => {
|
|
77
|
-
if (!multipleAxes && tooltipAxes.length > 1) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
tooltipAxes.push(defaultAxisTooltipConfig(xAxis[axisId], dataIndex, 'x'));
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
if (directions === undefined || directions.includes('y')) {
|
|
84
|
-
tooltipYAxes.forEach(({
|
|
85
|
-
axisId,
|
|
86
|
-
dataIndex
|
|
87
|
-
}) => {
|
|
88
|
-
if (!multipleAxes && tooltipAxes.length > 1) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
tooltipAxes.push(defaultAxisTooltipConfig(yAxis[axisId], dataIndex, 'y'));
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
if (directions === undefined || directions.includes('rotation')) {
|
|
95
|
-
tooltipRotationAxes.forEach(({
|
|
96
|
-
axisId,
|
|
97
|
-
dataIndex
|
|
98
|
-
}) => {
|
|
99
|
-
if (!multipleAxes && tooltipAxes.length > 1) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
tooltipAxes.push(defaultAxisTooltipConfig(rotationAxis[axisId], dataIndex, 'rotation'));
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
Object.keys(series).filter(_isCartesian.isCartesianSeriesType).forEach(seriesType => {
|
|
106
|
-
const seriesOfType = series[seriesType];
|
|
107
|
-
if (!seriesOfType) {
|
|
108
|
-
return [];
|
|
109
|
-
}
|
|
110
|
-
return seriesOfType.seriesOrder.forEach(seriesId => {
|
|
111
|
-
const seriesToAdd = seriesOfType.series[seriesId];
|
|
112
|
-
const providedXAxisId = seriesToAdd.xAxisId ?? defaultXAxis.id;
|
|
113
|
-
const providedYAxisId = seriesToAdd.yAxisId ?? defaultYAxis.id;
|
|
114
|
-
const tooltipItemIndex = tooltipAxes.findIndex(({
|
|
115
|
-
axisDirection,
|
|
116
|
-
axisId
|
|
117
|
-
}) => axisDirection === 'x' && axisId === providedXAxisId || axisDirection === 'y' && axisId === providedYAxisId);
|
|
118
|
-
// Test if the series uses the default axis
|
|
119
|
-
if (tooltipItemIndex >= 0) {
|
|
120
|
-
const zAxisId = 'zAxisId' in seriesToAdd ? seriesToAdd.zAxisId : zAxisIds[0];
|
|
121
|
-
const {
|
|
122
|
-
dataIndex
|
|
123
|
-
} = tooltipAxes[tooltipItemIndex];
|
|
124
|
-
const color = colorProcessors[seriesType]?.(seriesToAdd, xAxis[providedXAxisId], yAxis[providedYAxisId], zAxisId ? zAxis[zAxisId] : undefined)(dataIndex) ?? '';
|
|
125
|
-
const value = seriesToAdd.data[dataIndex] ?? null;
|
|
126
|
-
const formattedValue = seriesToAdd.valueFormatter(value, {
|
|
127
|
-
dataIndex
|
|
128
|
-
});
|
|
129
|
-
const formattedLabel = (0, _getLabel.getLabel)(seriesToAdd.label, 'tooltip') ?? null;
|
|
130
|
-
tooltipAxes[tooltipItemIndex].seriesItems.push({
|
|
131
|
-
seriesId,
|
|
132
|
-
color,
|
|
133
|
-
value,
|
|
134
|
-
formattedValue,
|
|
135
|
-
formattedLabel,
|
|
136
|
-
markType: seriesToAdd.labelMarkType
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
Object.keys(series).filter(_isPolar.isPolarSeriesType).forEach(seriesType => {
|
|
142
|
-
const seriesOfType = series[seriesType];
|
|
143
|
-
if (!seriesOfType) {
|
|
144
|
-
return [];
|
|
145
|
-
}
|
|
146
|
-
return seriesOfType.seriesOrder.forEach(seriesId => {
|
|
147
|
-
const seriesToAdd = seriesOfType.series[seriesId];
|
|
148
|
-
const providedRotationAxisId =
|
|
149
|
-
// @ts-expect-error Should be fixed when we introduce a polar series with a rotationAxisId
|
|
150
|
-
seriesToAdd.rotationAxisId ?? defaultRotationAxis?.id;
|
|
151
|
-
const tooltipItemIndex = tooltipAxes.findIndex(({
|
|
152
|
-
axisDirection,
|
|
153
|
-
axisId
|
|
154
|
-
}) => axisDirection === 'rotation' && axisId === providedRotationAxisId);
|
|
155
|
-
// Test if the series uses the default axis
|
|
156
|
-
if (tooltipItemIndex >= 0) {
|
|
157
|
-
const {
|
|
158
|
-
dataIndex
|
|
159
|
-
} = tooltipAxes[tooltipItemIndex];
|
|
160
|
-
const color = colorProcessors[seriesType]?.(seriesToAdd)(dataIndex) ?? '';
|
|
161
|
-
const value = seriesToAdd.data[dataIndex] ?? null;
|
|
162
|
-
const formattedValue = seriesToAdd.valueFormatter(value, {
|
|
163
|
-
dataIndex
|
|
164
|
-
});
|
|
165
|
-
const formattedLabel = (0, _getLabel.getLabel)(seriesToAdd.label, 'tooltip') ?? null;
|
|
166
|
-
tooltipAxes[tooltipItemIndex].seriesItems.push({
|
|
167
|
-
seriesId,
|
|
168
|
-
color,
|
|
169
|
-
value,
|
|
170
|
-
formattedValue,
|
|
171
|
-
formattedLabel,
|
|
172
|
-
markType: seriesToAdd.labelMarkType
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
if (!multipleAxes) {
|
|
178
|
-
return tooltipAxes.length === 0 ? tooltipAxes[0] : null;
|
|
179
|
-
}
|
|
180
|
-
return tooltipAxes;
|
|
181
|
-
}
|