@mui/x-charts 8.27.0 → 9.0.0-alpha.1
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.d.ts +1 -1
- package/BarChart/BarChart.js +30 -8
- 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 +2 -15
- 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 +373 -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 +10 -12
- package/ChartContainer/useChartContainerProps.js +10 -95
- 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/ChartsAxisHighlight/ChartsXAxisHighlight.js +2 -2
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +2 -2
- package/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/ChartsContainer/ChartsContainer.js +1715 -0
- package/ChartsContainer/index.d.ts +1 -0
- package/ChartsContainer/index.js +16 -0
- package/ChartsContainer/useChartsContainerProps.d.ts +12 -0
- package/ChartsContainer/useChartsContainerProps.js +109 -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 +14 -14
- package/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/ChartsLegend/legendContext.types.d.ts +10 -6
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +3 -15
- package/ChartsOverlay/ChartsNoDataOverlay.js +3 -15
- package/ChartsOverlay/common.d.ts +1 -0
- package/ChartsOverlay/common.js +22 -0
- package/ChartsSurface/ChartsSurface.js +2 -4
- package/ChartsTooltip/ChartTooltip.types.d.ts +5 -4
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +7 -0
- package/ChartsTooltip/ChartsAxisTooltipContent.js +22 -2
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/ChartsTooltip/ChartsTooltip.d.ts +10 -2
- package/ChartsTooltip/ChartsTooltip.js +18 -5
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +17 -2
- package/ChartsTooltip/ChartsTooltipContainer.js +20 -4
- 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/ChartsWrapper/ChartsWrapper.d.ts +1 -4
- package/ChartsWrapper/ChartsWrapper.js +7 -4
- 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.d.ts +1 -1
- package/LineChart/LineChart.js +30 -8
- package/LineChart/LineElement.d.ts +2 -2
- package/LineChart/LineElement.js +8 -8
- package/LineChart/LineHighlightElement.d.ts +4 -4
- package/LineChart/LineHighlightElement.js +4 -4
- package/LineChart/LineHighlightPlot.js +3 -3
- 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 +2 -15
- 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/LineChart/useMarkPlotData.js +2 -2
- 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.d.ts +3 -3
- package/PieChart/PieChart.js +9 -8
- 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/keyboardFocusHandler.js +2 -15
- 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.d.ts +1 -1
- package/RadarChart/RadarChart.js +8 -8
- 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/index.d.ts +1 -1
- 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/keyboardFocusHandler.js +2 -15
- 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/BatchScatter.js +7 -7
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/ScatterChart.d.ts +1 -1
- package/ScatterChart/ScatterChart.js +30 -8
- 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 +2 -15
- 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 +47 -31
- 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.d.ts +1 -1
- package/esm/BarChart/BarChart.js +30 -8
- 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 +3 -16
- 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 +10 -12
- package/esm/ChartContainer/useChartContainerProps.js +11 -94
- 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/ChartsAxisHighlight/ChartsXAxisHighlight.js +1 -1
- package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +1 -1
- package/esm/ChartsContainer/ChartsContainer.d.ts +37 -0
- package/esm/ChartsContainer/ChartsContainer.js +1709 -0
- package/esm/ChartsContainer/index.d.ts +1 -0
- package/esm/ChartsContainer/index.js +1 -0
- package/esm/ChartsContainer/useChartsContainerProps.d.ts +12 -0
- package/esm/ChartsContainer/useChartsContainerProps.js +102 -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 +14 -14
- package/esm/ChartsLegend/chartsLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
- package/esm/ChartsLegend/legendContext.types.d.ts +10 -6
- package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +1 -1
- package/esm/ChartsOverlay/ChartsLoadingOverlay.js +2 -14
- package/esm/ChartsOverlay/ChartsNoDataOverlay.js +2 -14
- package/esm/ChartsOverlay/common.d.ts +1 -0
- package/esm/ChartsOverlay/common.js +16 -0
- package/esm/ChartsSurface/ChartsSurface.js +3 -5
- package/esm/ChartsTooltip/ChartTooltip.types.d.ts +5 -4
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +7 -0
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +22 -2
- package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -0
- package/esm/ChartsTooltip/ChartsTooltip.d.ts +10 -2
- package/esm/ChartsTooltip/ChartsTooltip.js +18 -5
- package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +17 -2
- package/esm/ChartsTooltip/ChartsTooltipContainer.js +19 -3
- 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/ChartsWrapper/ChartsWrapper.d.ts +1 -4
- package/esm/ChartsWrapper/ChartsWrapper.js +6 -3
- 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.d.ts +1 -1
- package/esm/LineChart/LineChart.js +30 -8
- package/esm/LineChart/LineElement.d.ts +2 -2
- package/esm/LineChart/LineElement.js +8 -8
- package/esm/LineChart/LineHighlightElement.d.ts +4 -4
- package/esm/LineChart/LineHighlightElement.js +4 -4
- package/esm/LineChart/LineHighlightPlot.js +2 -2
- 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 +3 -16
- 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/LineChart/useMarkPlotData.js +2 -2
- 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.d.ts +3 -3
- package/esm/PieChart/PieChart.js +9 -8
- 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/keyboardFocusHandler.js +2 -15
- 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.d.ts +1 -1
- package/esm/RadarChart/RadarChart.js +8 -8
- 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/index.d.ts +1 -1
- 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/keyboardFocusHandler.js +2 -15
- 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/BatchScatter.js +1 -1
- package/esm/ScatterChart/Scatter.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.d.ts +1 -1
- package/esm/ScatterChart/ScatterChart.js +30 -8
- 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 +3 -16
- 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 +47 -31
- 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/getValueToPositionMapper.d.ts +12 -0
- package/esm/hooks/getValueToPositionMapper.js +21 -0
- package/esm/hooks/index.d.ts +5 -1
- package/esm/hooks/index.js +4 -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 +3 -3
- package/esm/hooks/useLegend.d.ts +2 -2
- package/esm/hooks/useLegend.js +1 -1
- package/esm/hooks/useScale.d.ts +1 -12
- package/esm/hooks/useScale.js +0 -20
- 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/createCommonKeyboardFocusHandler.d.ts +25 -0
- package/esm/internals/createCommonKeyboardFocusHandler.js +22 -0
- 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/getGraphemeCount.js +3 -1
- 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 +8 -2
- package/esm/internals/index.js +8 -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/index.d.ts +1 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -3
- package/esm/internals/plugins/corePlugins/useChartSeries/processSeries.js +9 -1
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +12 -2
- package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +41 -19
- 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 +19 -14
- 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 +7 -7
- 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 +7 -7
- 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 +4 -3
- 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/index.d.ts +1 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
- 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 +38 -15
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +24 -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 +6 -24
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +2 -53
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.ts +25 -0
- package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +149 -0
- 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 +5 -4
- package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +2 -2
- 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.js +14 -7
- 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/useChartTooltip/useChartTooltip.types.d.ts +4 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +9 -8
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -6
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +6 -3
- package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +3 -3
- 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/sliceUntil.js +3 -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 +8 -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/getValueToPositionMapper.d.ts +12 -0
- package/hooks/getValueToPositionMapper.js +26 -0
- package/hooks/index.d.ts +5 -1
- package/hooks/index.js +40 -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 +3 -3
- package/hooks/useLegend.d.ts +2 -2
- package/hooks/useLegend.js +2 -2
- package/hooks/useScale.d.ts +1 -12
- package/hooks/useScale.js +0 -21
- 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/createCommonKeyboardFocusHandler.d.ts +25 -0
- package/internals/createCommonKeyboardFocusHandler.js +27 -0
- 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/getGraphemeCount.js +3 -1
- 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 +8 -2
- package/internals/index.js +72 -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/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -3
- package/internals/plugins/corePlugins/useChartSeries/processSeries.js +9 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.d.ts +12 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +42 -19
- 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 +19 -14
- 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 +7 -7
- 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 +7 -7
- 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 +4 -3
- 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/index.d.ts +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
- 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 +38 -15
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +24 -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 +6 -24
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +2 -53
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.d.ts +25 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +155 -0
- 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 +5 -4
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +2 -2
- 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.js +14 -7
- 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/useChartTooltip/useChartTooltip.types.d.ts +4 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +9 -8
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +3 -6
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +9 -4
- package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +6 -3
- package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +3 -3
- 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/sliceUntil.js +3 -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 +8 -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 +20 -8
- 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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getXAxisCoordinates = getXAxisCoordinates;
|
|
8
|
+
exports.getYAxisCoordinates = getYAxisCoordinates;
|
|
9
|
+
exports.useXAxisCoordinates = useXAxisCoordinates;
|
|
10
|
+
exports.useYAxisCoordinates = useYAxisCoordinates;
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
13
|
+
var _useDrawingArea = require("./useDrawingArea");
|
|
14
|
+
var _useAxis = require("./useAxis");
|
|
15
|
+
var _utilities = require("../ChartsXAxis/utilities");
|
|
16
|
+
function getXAxisCoordinates(drawingArea, computedAxis) {
|
|
17
|
+
const {
|
|
18
|
+
position,
|
|
19
|
+
offset,
|
|
20
|
+
height: axisHeight
|
|
21
|
+
} = computedAxis;
|
|
22
|
+
if (position === 'none') {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
let top;
|
|
26
|
+
if (position === 'top') {
|
|
27
|
+
top = drawingArea.top - axisHeight - offset;
|
|
28
|
+
} else {
|
|
29
|
+
top = drawingArea.top + drawingArea.height + offset;
|
|
30
|
+
}
|
|
31
|
+
const left = drawingArea.left;
|
|
32
|
+
const bottom = top + axisHeight;
|
|
33
|
+
const right = drawingArea.left + drawingArea.width;
|
|
34
|
+
return {
|
|
35
|
+
left,
|
|
36
|
+
top,
|
|
37
|
+
right,
|
|
38
|
+
bottom
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Get the coordinates of the given X axis. The coordinates are relative to the SVG's origin.
|
|
44
|
+
* @param axisId The id of the X axis.
|
|
45
|
+
* @returns {AxisCoordinates | null} The coordinates of the X axis or null if the axis does not exist or has position: 'none'.
|
|
46
|
+
*/
|
|
47
|
+
function useXAxisCoordinates(axisId) {
|
|
48
|
+
const {
|
|
49
|
+
xAxis: xAxes
|
|
50
|
+
} = (0, _useAxis.useXAxes)();
|
|
51
|
+
const drawingArea = (0, _useDrawingArea.useDrawingArea)();
|
|
52
|
+
const axis = xAxes[axisId];
|
|
53
|
+
|
|
54
|
+
// FIXME(v9): Remove
|
|
55
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
56
|
+
const themedProps = (0, _styles.useThemeProps)({
|
|
57
|
+
props: axis,
|
|
58
|
+
name: 'MuiChartsXAxis'
|
|
59
|
+
});
|
|
60
|
+
if (!axis) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
const defaultizedProps = (0, _extends2.default)({}, _utilities.defaultProps, themedProps);
|
|
64
|
+
return getXAxisCoordinates(drawingArea, defaultizedProps);
|
|
65
|
+
}
|
|
66
|
+
function getYAxisCoordinates(drawingArea, computedAxis) {
|
|
67
|
+
const {
|
|
68
|
+
position,
|
|
69
|
+
offset,
|
|
70
|
+
width: axisWidth
|
|
71
|
+
} = computedAxis;
|
|
72
|
+
if (position === 'none') {
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
let left;
|
|
76
|
+
if (position === 'right') {
|
|
77
|
+
left = drawingArea.left + drawingArea.width + offset;
|
|
78
|
+
} else {
|
|
79
|
+
left = drawingArea.left - axisWidth - offset;
|
|
80
|
+
}
|
|
81
|
+
const top = drawingArea.top;
|
|
82
|
+
const bottom = drawingArea.top + drawingArea.height;
|
|
83
|
+
const right = left + axisWidth;
|
|
84
|
+
return {
|
|
85
|
+
left,
|
|
86
|
+
top,
|
|
87
|
+
right,
|
|
88
|
+
bottom
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Returns the coordinates of the given Y axis. The coordinates are relative to the SVG's origin.
|
|
94
|
+
* @param axisId The id of the Y axis.
|
|
95
|
+
* @returns {AxisCoordinates | null} The coordinates of the Y axis or null if the axis does not exist or has position: 'none'.
|
|
96
|
+
*/
|
|
97
|
+
function useYAxisCoordinates(axisId) {
|
|
98
|
+
const {
|
|
99
|
+
yAxis: yAxes
|
|
100
|
+
} = (0, _useAxis.useYAxes)();
|
|
101
|
+
const drawingArea = (0, _useDrawingArea.useDrawingArea)();
|
|
102
|
+
const axis = yAxes[axisId];
|
|
103
|
+
|
|
104
|
+
// FIXME(v9): Remove
|
|
105
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
106
|
+
const themedProps = (0, _styles.useThemeProps)({
|
|
107
|
+
props: axis,
|
|
108
|
+
name: 'MuiChartsYAxis'
|
|
109
|
+
});
|
|
110
|
+
if (!axis) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const defaultizedProps = (0, _extends2.default)({}, _utilities.defaultProps, themedProps);
|
|
114
|
+
return getYAxisCoordinates(drawingArea, defaultizedProps);
|
|
115
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type TickItem } from "./useTicks.js";
|
|
2
|
+
import { type AxisId } from "../models/axis.js";
|
|
3
|
+
/**
|
|
4
|
+
* Returns the ticks for the given X axis. Ticks outside the drawing area are not included.
|
|
5
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
6
|
+
* @param axisId The id of the X axis.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useXAxisTicks(axisId: AxisId): TickItem[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns the ticks for the given Y axis. Ticks outside the drawing area are not included.
|
|
11
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
12
|
+
* @param axisId The id of the Y axis.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useYAxisTicks(axisId: AxisId): TickItem[];
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useXAxisTicks = useXAxisTicks;
|
|
8
|
+
exports.useYAxisTicks = useYAxisTicks;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
11
|
+
var _useAxis = require("./useAxis");
|
|
12
|
+
var _useTicks = require("./useTicks");
|
|
13
|
+
var _utilities = require("../ChartsXAxis/utilities");
|
|
14
|
+
/**
|
|
15
|
+
* Returns the ticks for the given X axis. Ticks outside the drawing area are not included.
|
|
16
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
17
|
+
* @param axisId The id of the X axis.
|
|
18
|
+
*/
|
|
19
|
+
function useXAxisTicks(axisId) {
|
|
20
|
+
const {
|
|
21
|
+
xAxis: xAxes
|
|
22
|
+
} = (0, _useAxis.useXAxes)();
|
|
23
|
+
const axis = xAxes[axisId];
|
|
24
|
+
|
|
25
|
+
// FIXME: `useAxisTicksProps` does this, but should we do it here?
|
|
26
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
27
|
+
const themedProps = (0, _styles.useThemeProps)({
|
|
28
|
+
props: axis,
|
|
29
|
+
name: 'MuiChartsXAxis'
|
|
30
|
+
});
|
|
31
|
+
const defaultizedProps = (0, _extends2.default)({}, _utilities.defaultProps, themedProps);
|
|
32
|
+
return (0, _useTicks.useTicks)({
|
|
33
|
+
scale: axis.scale,
|
|
34
|
+
tickNumber: axis.tickNumber,
|
|
35
|
+
valueFormatter: defaultizedProps.valueFormatter,
|
|
36
|
+
tickInterval: defaultizedProps.tickInterval,
|
|
37
|
+
tickPlacement: defaultizedProps.tickPlacement,
|
|
38
|
+
tickLabelPlacement: defaultizedProps.tickLabelPlacement,
|
|
39
|
+
tickSpacing: defaultizedProps.tickSpacing,
|
|
40
|
+
direction: 'x',
|
|
41
|
+
ordinalTimeTicks: 'ordinalTimeTicks' in defaultizedProps ? defaultizedProps.ordinalTimeTicks : undefined
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Returns the ticks for the given Y axis. Ticks outside the drawing area are not included.
|
|
47
|
+
* The ticks returned from this hook are not grouped, i.e., they don't follow the `groups` prop of the axis.
|
|
48
|
+
* @param axisId The id of the Y axis.
|
|
49
|
+
*/
|
|
50
|
+
function useYAxisTicks(axisId) {
|
|
51
|
+
const {
|
|
52
|
+
yAxis: yAxes
|
|
53
|
+
} = (0, _useAxis.useYAxes)();
|
|
54
|
+
const axis = yAxes[axisId];
|
|
55
|
+
|
|
56
|
+
// FIXME: `useAxisTicksProps` does this, but should we do it here?
|
|
57
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
58
|
+
const themedProps = (0, _styles.useThemeProps)({
|
|
59
|
+
props: axis,
|
|
60
|
+
name: 'MuiChartsYAxis'
|
|
61
|
+
});
|
|
62
|
+
const defaultizedProps = (0, _extends2.default)({}, _utilities.defaultProps, themedProps);
|
|
63
|
+
return (0, _useTicks.useTicks)({
|
|
64
|
+
scale: axis.scale,
|
|
65
|
+
tickNumber: axis.tickNumber,
|
|
66
|
+
valueFormatter: defaultizedProps.valueFormatter,
|
|
67
|
+
tickInterval: defaultizedProps.tickInterval,
|
|
68
|
+
tickPlacement: defaultizedProps.tickPlacement,
|
|
69
|
+
tickLabelPlacement: defaultizedProps.tickLabelPlacement,
|
|
70
|
+
tickSpacing: defaultizedProps.tickSpacing,
|
|
71
|
+
direction: 'y',
|
|
72
|
+
// @ts-expect-error
|
|
73
|
+
ordinalTimeTicks: defaultizedProps.ordinalTimeTicks
|
|
74
|
+
});
|
|
75
|
+
}
|
|
@@ -3,4 +3,4 @@ import type * as React from 'react';
|
|
|
3
3
|
* Get the ref for the root chart element.
|
|
4
4
|
* @returns The root chart element ref.
|
|
5
5
|
*/
|
|
6
|
-
export declare function useChartRootRef(): React.RefObject<
|
|
6
|
+
export declare function useChartRootRef<T extends Element = HTMLDivElement>(): React.RefObject<T | null>;
|
package/hooks/useChartRootRef.js
CHANGED
|
@@ -11,6 +11,8 @@ var _ChartProvider = require("../context/ChartProvider");
|
|
|
11
11
|
* @returns The root chart element ref.
|
|
12
12
|
*/
|
|
13
13
|
function useChartRootRef() {
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const {
|
|
15
|
+
instance
|
|
16
|
+
} = (0, _ChartProvider.useChartContext)();
|
|
17
|
+
return instance.chartRootRef;
|
|
16
18
|
}
|
|
@@ -3,15 +3,15 @@ import { type SeriesItemIdentifierWithData } from "../models/index.js";
|
|
|
3
3
|
import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
|
|
4
4
|
import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
|
|
5
5
|
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.js";
|
|
7
7
|
import type { ChartInstance } from "../internals/plugins/models/index.js";
|
|
8
8
|
import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
|
|
9
|
-
export declare const useInteractionItemProps: (data: SeriesItemIdentifierWithData
|
|
9
|
+
export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithData<SeriesType>, skip?: boolean) => {
|
|
10
10
|
onPointerEnter?: () => void;
|
|
11
11
|
onPointerLeave?: () => void;
|
|
12
12
|
onPointerDown?: (event: React.PointerEvent) => void;
|
|
13
13
|
};
|
|
14
|
-
export declare function getInteractionItemProps(instance: ChartInstance<[UseChartInteractionSignature, UseChartHighlightSignature, UseChartTooltipSignature]>, item:
|
|
14
|
+
export declare function getInteractionItemProps(instance: ChartInstance<[UseChartInteractionSignature, UseChartHighlightSignature, UseChartTooltipSignature]>, item: SeriesItemIdentifierWithType<ChartSeriesType>): {
|
|
15
15
|
onPointerEnter?: () => void;
|
|
16
16
|
onPointerLeave?: () => void;
|
|
17
17
|
onPointerDown?: (event: React.PointerEvent) => void;
|
package/hooks/useLegend.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SeriesLegendItemParams } from "../ChartsLegend/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Get the legend items to display.
|
|
4
4
|
*
|
|
@@ -9,5 +9,5 @@ import type { LegendItemParams } from "../ChartsLegend/index.js";
|
|
|
9
9
|
* @returns legend data
|
|
10
10
|
*/
|
|
11
11
|
export declare function useLegend(): {
|
|
12
|
-
items:
|
|
12
|
+
items: SeriesLegendItemParams[];
|
|
13
13
|
};
|
package/hooks/useLegend.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.useLegend = useLegend;
|
|
8
|
-
var
|
|
8
|
+
var _useChartSeriesConfig = require("../internals/plugins/corePlugins/useChartSeriesConfig");
|
|
9
9
|
var _useSeries = require("./useSeries");
|
|
10
10
|
var _useStore = require("../internals/store/useStore");
|
|
11
11
|
function getSeriesToDisplay(series, seriesConfig) {
|
|
@@ -27,7 +27,7 @@ function getSeriesToDisplay(series, seriesConfig) {
|
|
|
27
27
|
function useLegend() {
|
|
28
28
|
const series = (0, _useSeries.useSeries)();
|
|
29
29
|
const store = (0, _useStore.useStore)();
|
|
30
|
-
const seriesConfig = store.use(
|
|
30
|
+
const seriesConfig = store.use(_useChartSeriesConfig.selectorChartSeriesConfig);
|
|
31
31
|
return {
|
|
32
32
|
items: getSeriesToDisplay(series, seriesConfig)
|
|
33
33
|
};
|
package/hooks/useScale.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
* For a given scale return a function that map value to their position.
|
|
4
|
-
* Useful when dealing with specific scale such as band.
|
|
5
|
-
* @param {D3Scale} scale The scale to use
|
|
6
|
-
* @returns {(value: any) => number} A function that map value to their position
|
|
7
|
-
*/
|
|
8
|
-
export declare function getValueToPositionMapper<Domain extends {
|
|
9
|
-
toString(): string;
|
|
10
|
-
} = {
|
|
11
|
-
toString(): string;
|
|
12
|
-
}, Range = number>(scale: D3Scale<Domain, Range>): (value: any) => number;
|
|
1
|
+
import type { AxisId, AxisScaleConfig, ScaleName } from "../models/axis.js";
|
|
13
2
|
/**
|
|
14
3
|
* Get the X scale.
|
|
15
4
|
*
|
package/hooks/useScale.js
CHANGED
|
@@ -4,32 +4,11 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.getValueToPositionMapper = getValueToPositionMapper;
|
|
8
7
|
exports.useRadiusScale = useRadiusScale;
|
|
9
8
|
exports.useRotationScale = useRotationScale;
|
|
10
9
|
exports.useXScale = useXScale;
|
|
11
10
|
exports.useYScale = useYScale;
|
|
12
|
-
var _scaleGuards = require("../internals/scaleGuards");
|
|
13
11
|
var _useAxis = require("./useAxis");
|
|
14
|
-
/**
|
|
15
|
-
* For a given scale return a function that map value to their position.
|
|
16
|
-
* Useful when dealing with specific scale such as band.
|
|
17
|
-
* @param {D3Scale} scale The scale to use
|
|
18
|
-
* @returns {(value: any) => number} A function that map value to their position
|
|
19
|
-
*/
|
|
20
|
-
function getValueToPositionMapper(scale) {
|
|
21
|
-
if ((0, _scaleGuards.isOrdinalScale)(scale)) {
|
|
22
|
-
return value => (scale(value) ?? 0) + scale.bandwidth() / 2;
|
|
23
|
-
}
|
|
24
|
-
const domain = scale.domain();
|
|
25
|
-
|
|
26
|
-
// Fixes https://github.com/mui/mui-x/issues/18999#issuecomment-3173787401
|
|
27
|
-
if (domain[0] === domain[1]) {
|
|
28
|
-
return value => value === domain[0] ? scale(value) : NaN;
|
|
29
|
-
}
|
|
30
|
-
return value => scale(value);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
12
|
/**
|
|
34
13
|
* Get the X scale.
|
|
35
14
|
*
|
package/hooks/useSvgRef.js
CHANGED
|
@@ -11,9 +11,8 @@ var _ChartProvider = require("../context/ChartProvider");
|
|
|
11
11
|
* @returns The SVG ref.
|
|
12
12
|
*/
|
|
13
13
|
function useSvgRef() {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return context.svgRef;
|
|
14
|
+
const {
|
|
15
|
+
instance
|
|
16
|
+
} = (0, _ChartProvider.useChartContext)();
|
|
17
|
+
return instance.svgRef;
|
|
19
18
|
}
|
package/hooks/useTicks.d.ts
CHANGED
|
@@ -46,13 +46,28 @@ export interface TickParams {
|
|
|
46
46
|
*/
|
|
47
47
|
tickSpacing?: number;
|
|
48
48
|
}
|
|
49
|
-
export type
|
|
49
|
+
export type TickItem = {
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* The value of the tick.
|
|
52
|
+
* It is only `undefined` if it's the tick closing the last band.
|
|
52
53
|
*/
|
|
53
54
|
value?: any;
|
|
55
|
+
/**
|
|
56
|
+
* The formatted value of the tick.
|
|
57
|
+
* It is only `undefined` if it's the tick closing the last band.
|
|
58
|
+
*/
|
|
54
59
|
formattedValue?: string;
|
|
60
|
+
/**
|
|
61
|
+
* The offset in pixels relative to the SVG origin.
|
|
62
|
+
* For an x-axis, it is relative to the left side of the SVG.
|
|
63
|
+
* For a y-axis, it is relative to the top side of the SVG.
|
|
64
|
+
*/
|
|
55
65
|
offset: number;
|
|
66
|
+
/**
|
|
67
|
+
* The offset in pixels relative to the tick position.
|
|
68
|
+
* For an x-axis, a positive value means the label is shifted to the right of the tick.
|
|
69
|
+
* For a y-axis, a positive value means the label is shifted downwards from the tick.
|
|
70
|
+
*/
|
|
56
71
|
labelOffset: number;
|
|
57
72
|
};
|
|
58
73
|
/**
|
|
@@ -69,8 +84,8 @@ interface GetTicksOptions extends Pick<TickParams, 'tickInterval' | 'tickPlaceme
|
|
|
69
84
|
isInside: (offset: number) => boolean;
|
|
70
85
|
ordinalTimeTicks?: OrdinalTimeTicks;
|
|
71
86
|
}
|
|
72
|
-
export declare function getTicks(options: GetTicksOptions):
|
|
87
|
+
export declare function getTicks(options: GetTicksOptions): TickItem[];
|
|
73
88
|
export declare function useTicks(options: Omit<GetTicksOptions, 'isInside'> & {
|
|
74
89
|
direction: 'x' | 'y';
|
|
75
|
-
}):
|
|
90
|
+
}): TickItem[];
|
|
76
91
|
export {};
|
package/index.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ export * from "./SparkLineChart/index.js";
|
|
|
24
24
|
export * from "./Gauge/index.js";
|
|
25
25
|
export * from "./RadarChart/index.js";
|
|
26
26
|
export * from "./ChartsSurface/index.js";
|
|
27
|
+
export { ChartsContainer } from "./ChartsContainer/index.js";
|
|
28
|
+
export type { ChartsContainerProps, ChartsContainerSlots, ChartsContainerSlotProps } from "./ChartsContainer/index.js";
|
|
27
29
|
export { ChartContainer } from "./ChartContainer/index.js";
|
|
28
|
-
export type { ChartContainerProps } from "./ChartContainer/index.js";
|
|
30
|
+
export type { ChartContainerProps, ChartContainerSlots, ChartContainerSlotProps } from "./ChartContainer/index.js";
|
|
29
31
|
export * from "./ChartDataProvider/index.js";
|
|
30
32
|
export * from "./Toolbar/index.js";
|
|
31
33
|
export * from "./ChartsWrapper/index.js";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-charts
|
|
2
|
+
* @mui/x-charts v9.0.0-alpha.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
11
11
|
value: true
|
|
12
12
|
});
|
|
13
13
|
var _exportNames = {
|
|
14
|
+
ChartsContainer: true,
|
|
14
15
|
ChartContainer: true
|
|
15
16
|
};
|
|
16
17
|
Object.defineProperty(exports, "ChartContainer", {
|
|
@@ -19,6 +20,12 @@ Object.defineProperty(exports, "ChartContainer", {
|
|
|
19
20
|
return _ChartContainer.ChartContainer;
|
|
20
21
|
}
|
|
21
22
|
});
|
|
23
|
+
Object.defineProperty(exports, "ChartsContainer", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return _ChartsContainer.ChartsContainer;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
22
29
|
var _constants = require("./constants");
|
|
23
30
|
Object.keys(_constants).forEach(function (key) {
|
|
24
31
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -331,6 +338,7 @@ Object.keys(_ChartsSurface).forEach(function (key) {
|
|
|
331
338
|
}
|
|
332
339
|
});
|
|
333
340
|
});
|
|
341
|
+
var _ChartsContainer = require("./ChartsContainer");
|
|
334
342
|
var _ChartContainer = require("./ChartContainer");
|
|
335
343
|
var _ChartDataProvider = require("./ChartDataProvider");
|
|
336
344
|
Object.keys(_ChartDataProvider).forEach(function (key) {
|
|
@@ -36,4 +36,6 @@ export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends
|
|
|
36
36
|
* The set of series types compatible with this navigation action.
|
|
37
37
|
*/
|
|
38
38
|
compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: SeriesItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
|
|
39
|
+
export type ComposableCartesianChartSeriesType = 'bar' | 'line' | 'scatter' | ('rangeBar' extends ChartSeriesType ? 'rangeBar' : never);
|
|
40
|
+
export declare const composableCartesianSeriesTypes: Set<ComposableCartesianChartSeriesType>;
|
|
39
41
|
export {};
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.composableCartesianSeriesTypes = void 0;
|
|
6
7
|
exports.createGetNextIndexFocusedItem = createGetNextIndexFocusedItem;
|
|
7
8
|
exports.createGetNextSeriesFocusedItem = createGetNextSeriesFocusedItem;
|
|
8
9
|
exports.createGetPreviousIndexFocusedItem = createGetPreviousIndexFocusedItem;
|
|
9
10
|
exports.createGetPreviousSeriesFocusedItem = createGetPreviousSeriesFocusedItem;
|
|
10
11
|
var _getPreviousNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries");
|
|
11
12
|
var _getMaxSeriesLength = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength");
|
|
12
|
-
var _useChartSeries = require("./plugins/corePlugins/useChartSeries");
|
|
13
13
|
var _getNextNonEmptySeries = require("./plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries");
|
|
14
14
|
var _seriesHasData = require("./seriesHasData");
|
|
15
|
+
var _useChartSeries = require("./plugins/corePlugins/useChartSeries/useChartSeries.selectors");
|
|
15
16
|
function createGetNextIndexFocusedItem(
|
|
16
17
|
/**
|
|
17
18
|
* The set of series types compatible with this navigation action.
|
|
@@ -128,4 +129,5 @@ compatibleSeriesTypes) {
|
|
|
128
129
|
dataIndex
|
|
129
130
|
};
|
|
130
131
|
};
|
|
131
|
-
}
|
|
132
|
+
}
|
|
133
|
+
const composableCartesianSeriesTypes = exports.composableCartesianSeriesTypes = new Set(['bar', 'line', 'scatter', 'rangeBar']);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function useWebGLContext(): WebGL2RenderingContext | null;
|
|
3
|
+
export declare const WebGLProvider: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>>, "ref"> & React.RefAttributes<HTMLCanvasElement>>;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.WebGLProvider = void 0;
|
|
10
|
+
exports.useWebGLContext = useWebGLContext;
|
|
11
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
13
|
+
var React = _interopRequireWildcard(require("react"));
|
|
14
|
+
var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
15
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
16
|
+
var _hooks = require("../../hooks");
|
|
17
|
+
var _useChartDimensions = require("../plugins/corePlugins/useChartDimensions");
|
|
18
|
+
var _useStore = require("../store/useStore");
|
|
19
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
+
const _excluded = ["children"];
|
|
21
|
+
const WebGLContext = /*#__PURE__*/React.createContext(null);
|
|
22
|
+
if (process.env.NODE_ENV !== "production") WebGLContext.displayName = "WebGLContext";
|
|
23
|
+
function useWebGLContext() {
|
|
24
|
+
return React.useContext(WebGLContext);
|
|
25
|
+
}
|
|
26
|
+
const WebGLProvider = exports.WebGLProvider = /*#__PURE__*/React.forwardRef(function WebGLProvider(_ref, ref) {
|
|
27
|
+
let {
|
|
28
|
+
children
|
|
29
|
+
} = _ref,
|
|
30
|
+
props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
31
|
+
const canvasRef = React.useRef(null);
|
|
32
|
+
const [context, setContext] = React.useState(null);
|
|
33
|
+
const handleRef = (0, _useForkRef.default)(canvasRef, ref);
|
|
34
|
+
const chartRoot = (0, _hooks.useChartRootRef)().current;
|
|
35
|
+
const drawingArea = (0, _hooks.useDrawingArea)();
|
|
36
|
+
const [, rerender] = React.useReducer(s => s + 1, 0);
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
/* The chart root isn't available on first render because the ref is only set after mounting the root component. */
|
|
39
|
+
if (!chartRoot) {
|
|
40
|
+
rerender();
|
|
41
|
+
}
|
|
42
|
+
}, [chartRoot]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
const canvas = canvasRef.current;
|
|
45
|
+
if (!canvas) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const handleContextLost = event => {
|
|
49
|
+
// Must prevent default otherwise the context won't be marked as restorable
|
|
50
|
+
// https://registry.khronos.org/webgl/extensions/WEBGL_lose_context/
|
|
51
|
+
event.preventDefault();
|
|
52
|
+
setContext(null);
|
|
53
|
+
};
|
|
54
|
+
const initializeContext = () => {
|
|
55
|
+
const ctx = canvas.getContext('webgl2', {
|
|
56
|
+
/* Fixes blurry lines when drawing sharp edges */
|
|
57
|
+
antialias: false,
|
|
58
|
+
/* Required so we can export the WebGL plot */
|
|
59
|
+
preserveDrawingBuffer: true
|
|
60
|
+
});
|
|
61
|
+
if (!ctx) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
setContext(ctx);
|
|
65
|
+
};
|
|
66
|
+
canvas.addEventListener('webglcontextlost', handleContextLost);
|
|
67
|
+
canvas.addEventListener('webglcontextrestored', initializeContext);
|
|
68
|
+
initializeContext();
|
|
69
|
+
return () => {
|
|
70
|
+
canvas.removeEventListener('webglcontextlost', handleContextLost);
|
|
71
|
+
canvas.removeEventListener('webglcontextrestored', initializeContext);
|
|
72
|
+
};
|
|
73
|
+
}, [chartRoot]);
|
|
74
|
+
if (!chartRoot) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(WebGLContext.Provider, {
|
|
78
|
+
value: context,
|
|
79
|
+
children: [/*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/(0, _jsxRuntime.jsx)(CanvasPositioner, {
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("canvas", (0, _extends2.default)({
|
|
81
|
+
ref: handleRef
|
|
82
|
+
}, props, {
|
|
83
|
+
style: {
|
|
84
|
+
position: 'relative',
|
|
85
|
+
left: drawingArea.left,
|
|
86
|
+
top: drawingArea.top,
|
|
87
|
+
width: drawingArea.width,
|
|
88
|
+
height: drawingArea.height
|
|
89
|
+
}
|
|
90
|
+
}))
|
|
91
|
+
}), chartRoot), children]
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
if (process.env.NODE_ENV !== "production") WebGLProvider.displayName = "WebGLProvider";
|
|
95
|
+
function CanvasPositioner({
|
|
96
|
+
children
|
|
97
|
+
}) {
|
|
98
|
+
const store = (0, _useStore.useStore)();
|
|
99
|
+
const svgWidth = store.use(_useChartDimensions.selectorChartSvgWidth);
|
|
100
|
+
const svgHeight = store.use(_useChartDimensions.selectorChartSvgHeight);
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
102
|
+
style: {
|
|
103
|
+
position: 'relative',
|
|
104
|
+
pointerEvents: 'none',
|
|
105
|
+
/* Ensures the canvas occupies the same space as the SVG */
|
|
106
|
+
gridArea: 'chart',
|
|
107
|
+
/* This property ensures the canvas renders below the SVG */
|
|
108
|
+
order: -1,
|
|
109
|
+
maxWidth: svgWidth,
|
|
110
|
+
maxHeight: svgHeight,
|
|
111
|
+
width: '100%',
|
|
112
|
+
height: '100%'
|
|
113
|
+
},
|
|
114
|
+
children: children
|
|
115
|
+
});
|
|
116
|
+
}
|
|
@@ -61,7 +61,7 @@ const consumeSlots = (name, slotPropName, options, InComponent) => {
|
|
|
61
61
|
function ConsumeSlotsInternal(props, ref) {
|
|
62
62
|
const themedProps = (0, _styles.useThemeProps)({
|
|
63
63
|
props,
|
|
64
|
-
// eslint-disable-next-line material-ui
|
|
64
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
65
65
|
name
|
|
66
66
|
});
|
|
67
67
|
const defaultProps = typeof options.defaultProps === 'function' ? options.defaultProps(themedProps) : options.defaultProps ?? {};
|
|
@@ -60,7 +60,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
60
60
|
const consumeThemeProps = (name, options, InComponent) => /*#__PURE__*/React.forwardRef(function ConsumeThemeInternal(props, ref) {
|
|
61
61
|
const themedProps = (0, _styles.useThemeProps)({
|
|
62
62
|
props,
|
|
63
|
-
// eslint-disable-next-line material-ui
|
|
63
|
+
// eslint-disable-next-line mui/material-ui-name-matches-component-name
|
|
64
64
|
name
|
|
65
65
|
});
|
|
66
66
|
const defaultProps = typeof options.defaultProps === 'function' ? options.defaultProps(themedProps) : options.defaultProps ?? {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ChartSeriesType } from "../models/seriesType/config.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createCommonKeyboardFocusHandler<TSeriesType extends Exclude<ChartSeriesType, 'sankey'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey'> = TSeriesType>(outSeriesTypes: Set<TSeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
|
|
6
|
+
series: {
|
|
7
|
+
defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.js").DefaultizedSeriesGroups<TInputSeriesType>;
|
|
8
|
+
idToType: import("./index.js").SeriesIdToType;
|
|
9
|
+
dataset?: Readonly<import("./index.js").DatasetType>;
|
|
10
|
+
};
|
|
11
|
+
}) => {
|
|
12
|
+
type: TSeriesType;
|
|
13
|
+
seriesId: import("../index.js").SeriesId;
|
|
14
|
+
dataIndex: number;
|
|
15
|
+
} | null) | ((currentItem: import("../index.js").SeriesItemIdentifier<TInputSeriesType> | null, state: {
|
|
16
|
+
series: {
|
|
17
|
+
defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.js").DefaultizedSeriesGroups<TInputSeriesType>;
|
|
18
|
+
idToType: import("./index.js").SeriesIdToType;
|
|
19
|
+
dataset?: Readonly<import("./index.js").DatasetType>;
|
|
20
|
+
};
|
|
21
|
+
}) => {
|
|
22
|
+
type: TSeriesType;
|
|
23
|
+
seriesId: import("../index.js").SeriesId;
|
|
24
|
+
dataIndex: number;
|
|
25
|
+
} | null) | null;
|