@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.selectorChartSeriesConfigState = exports.selectorChartSeriesConfig = void 0;
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
8
|
+
const selectorChartSeriesConfigState = state => state.seriesConfig;
|
|
9
|
+
exports.selectorChartSeriesConfigState = selectorChartSeriesConfigState;
|
|
10
|
+
const selectorChartSeriesConfig = exports.selectorChartSeriesConfig = (0, _store.createSelector)(selectorChartSeriesConfigState, seriesConfigState => seriesConfigState.config);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ChartPluginSignature } from "../../models/index.js";
|
|
2
|
+
import { type ChartSeriesConfig } from "./types/seriesConfig.types.js";
|
|
3
|
+
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
4
|
+
import { type SeriesItemIdentifier } from "../../../../models/seriesType/index.js";
|
|
5
|
+
export interface UseChartSeriesConfigParameters<T extends ChartSeriesType = ChartSeriesType> {
|
|
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<T>;
|
|
11
|
+
}
|
|
12
|
+
export type UseChartSeriesConfigDefaultizedParameters<T extends ChartSeriesType = ChartSeriesType> = UseChartSeriesConfigParameters<T> & {
|
|
13
|
+
seriesConfig: ChartSeriesConfig<T>;
|
|
14
|
+
};
|
|
15
|
+
export interface UseChartSeriesConfigState<T extends ChartSeriesType = ChartSeriesType> {
|
|
16
|
+
seriesConfig: {
|
|
17
|
+
config: ChartSeriesConfig<T>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export type SerializeIdentifierFunction = <T extends {
|
|
21
|
+
type: ChartSeriesType;
|
|
22
|
+
}>(identifier: T) => string;
|
|
23
|
+
export type CleanIdentifierFunction = <T extends {
|
|
24
|
+
type: ChartSeriesType;
|
|
25
|
+
}>(identifier: T) => SeriesItemIdentifier<T['type']>;
|
|
26
|
+
export interface UseChartSeriesConfigInstance {
|
|
27
|
+
/**
|
|
28
|
+
* Function to serialize a series item identifier into a unique string.
|
|
29
|
+
*
|
|
30
|
+
* @param identifier The identifier to serialize.
|
|
31
|
+
* @returns A unique string representing the identifier.
|
|
32
|
+
*/
|
|
33
|
+
serializeIdentifier: SerializeIdentifierFunction;
|
|
34
|
+
/**
|
|
35
|
+
* Function to clean a series item identifier, returning only the properties
|
|
36
|
+
* relevant to the series type.
|
|
37
|
+
*
|
|
38
|
+
* @param identifier The partial identifier to clean.
|
|
39
|
+
* @returns A cleaned identifier with only the relevant properties.
|
|
40
|
+
*/
|
|
41
|
+
cleanIdentifier: CleanIdentifierFunction;
|
|
42
|
+
}
|
|
43
|
+
export type UseChartSeriesConfigSignature<T extends ChartSeriesType = ChartSeriesType> = ChartPluginSignature<{
|
|
44
|
+
params: UseChartSeriesConfigParameters<T>;
|
|
45
|
+
defaultizedParams: UseChartSeriesConfigDefaultizedParameters<T>;
|
|
46
|
+
state: UseChartSeriesConfigState<T>;
|
|
47
|
+
instance: UseChartSeriesConfigInstance;
|
|
48
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SeriesItemIdentifier } from "../../../../../models/index.js";
|
|
2
|
+
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
3
|
+
import type { ChartSeriesConfig } from "../types/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Cleans a series item identifier by extracting only the relevant properties
|
|
6
|
+
* using the appropriate cleaner from the provided series configuration.
|
|
7
|
+
*
|
|
8
|
+
* @param {ChartSeriesConfig<ChartSeriesType>} seriesConfig - The configuration object for chart series.
|
|
9
|
+
* @param {object} identifier - The series item identifier to clean.
|
|
10
|
+
* @returns {object} A cleaned identifier object with only the properties relevant to the series type.
|
|
11
|
+
* @throws Will throw an error if no cleaner is found for the given series type.
|
|
12
|
+
*/
|
|
13
|
+
export declare const cleanIdentifier: <T extends ChartSeriesType, U extends {
|
|
14
|
+
type: T;
|
|
15
|
+
}>(seriesConfig: ChartSeriesConfig<T>, identifier: U) => SeriesItemIdentifier<T>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cleanIdentifier = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Cleans a series item identifier by extracting only the relevant properties
|
|
9
|
+
* using the appropriate cleaner from the provided series configuration.
|
|
10
|
+
*
|
|
11
|
+
* @param {ChartSeriesConfig<ChartSeriesType>} seriesConfig - The configuration object for chart series.
|
|
12
|
+
* @param {object} identifier - The series item identifier to clean.
|
|
13
|
+
* @returns {object} A cleaned identifier object with only the properties relevant to the series type.
|
|
14
|
+
* @throws Will throw an error if no cleaner is found for the given series type.
|
|
15
|
+
*/
|
|
16
|
+
const cleanIdentifier = (seriesConfig, identifier) => {
|
|
17
|
+
const cleaner = seriesConfig[identifier.type]?.identifierCleaner;
|
|
18
|
+
if (!cleaner) {
|
|
19
|
+
throw new Error(`MUI X Charts: No identifier cleaner found for series type "${identifier.type}".`);
|
|
20
|
+
}
|
|
21
|
+
// @ts-expect-error identifierCleaner expects the full object,
|
|
22
|
+
// but this function accepts a partial one in order to be able to clean all identifiers.
|
|
23
|
+
return cleaner(identifier);
|
|
24
|
+
};
|
|
25
|
+
exports.cleanIdentifier = cleanIdentifier;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ChartSeriesType } from "
|
|
2
|
-
import type { ChartSeriesConfig } from "
|
|
1
|
+
import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
|
|
2
|
+
import type { ChartSeriesConfig } from "../types/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Serializes a series item identifier into a unique string using the appropriate serializer
|
|
5
5
|
* from the provided series configuration.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { type SeriesItemIdentifier } from "../../../../models/seriesType/index.js";
|
|
2
|
+
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
3
|
import { type UseChartHighlightSignature } from "../useChartHighlight/index.js";
|
|
3
4
|
import { type UseChartCartesianAxisSignature } from "../useChartCartesianAxis/index.js";
|
|
4
5
|
import { type ChartState } from "../../models/index.js";
|
|
5
6
|
/**
|
|
6
7
|
* Hook to get pointer interaction props for chart items.
|
|
7
8
|
*/
|
|
8
|
-
export declare function useRegisterPointerInteractions(getItemAtPosition: (state: ChartState<[UseChartCartesianAxisSignature, UseChartHighlightSignature]>, point: {
|
|
9
|
+
export declare function useRegisterPointerInteractions<SeriesType extends ChartSeriesType>(getItemAtPosition: (state: ChartState<[UseChartCartesianAxisSignature, UseChartHighlightSignature]>, point: {
|
|
9
10
|
x: number;
|
|
10
11
|
y: number;
|
|
11
|
-
}) => SeriesItemIdentifier | undefined, onItemEnter?: () => void, onItemLeave?: () => void): void;
|
|
12
|
+
}) => SeriesItemIdentifier<SeriesType> | undefined, onItemEnter?: () => void, onItemLeave?: () => void): void;
|
|
@@ -12,7 +12,7 @@ var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallb
|
|
|
12
12
|
var _hooks = require("../../../../hooks");
|
|
13
13
|
var _useStore = require("../../../store/useStore");
|
|
14
14
|
var _ChartProvider = require("../../../../context/ChartProvider");
|
|
15
|
-
var
|
|
15
|
+
var _getChartPoint = require("../../../getChartPoint");
|
|
16
16
|
/**
|
|
17
17
|
* Hook to get pointer interaction props for chart items.
|
|
18
18
|
*/
|
|
@@ -48,7 +48,7 @@ function useRegisterPointerInteractions(getItemAtPosition, onItemEnter, onItemLe
|
|
|
48
48
|
reset();
|
|
49
49
|
}
|
|
50
50
|
const onPointerMove = function onPointerMove(event) {
|
|
51
|
-
const svgPoint = (0,
|
|
51
|
+
const svgPoint = (0, _getChartPoint.getChartPoint)(svg, event);
|
|
52
52
|
if (!instance.isPointInside(svgPoint.x, svgPoint.y)) {
|
|
53
53
|
reset();
|
|
54
54
|
return;
|
|
@@ -11,14 +11,16 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
14
|
-
var
|
|
14
|
+
var _getChartPoint = require("../../../getChartPoint");
|
|
15
15
|
var _useChartBrush = require("./useChartBrush.selectors");
|
|
16
16
|
const useChartBrush = ({
|
|
17
17
|
store,
|
|
18
|
-
svgRef,
|
|
19
18
|
instance,
|
|
20
19
|
params
|
|
21
20
|
}) => {
|
|
21
|
+
const {
|
|
22
|
+
svgRef
|
|
23
|
+
} = instance;
|
|
22
24
|
const isEnabled = store.use(_useChartBrush.selectorIsBrushEnabled);
|
|
23
25
|
(0, _useEnhancedEffect.default)(() => {
|
|
24
26
|
store.set('brush', (0, _extends2.default)({}, store.state.brush, {
|
|
@@ -56,14 +58,14 @@ const useChartBrush = ({
|
|
|
56
58
|
if (event.detail.target?.closest('[data-charts-zoom-slider]')) {
|
|
57
59
|
return;
|
|
58
60
|
}
|
|
59
|
-
const point = (0,
|
|
61
|
+
const point = (0, _getChartPoint.getChartPoint)(element, {
|
|
60
62
|
clientX: event.detail.initialCentroid.x,
|
|
61
63
|
clientY: event.detail.initialCentroid.y
|
|
62
64
|
});
|
|
63
65
|
setBrushCoordinates(point);
|
|
64
66
|
};
|
|
65
67
|
const handleBrush = event => {
|
|
66
|
-
const currentPoint = (0,
|
|
68
|
+
const currentPoint = (0, _getChartPoint.getChartPoint)(element, {
|
|
67
69
|
clientX: event.detail.centroid.x,
|
|
68
70
|
clientY: event.detail.centroid.y
|
|
69
71
|
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import type { ChartOptionalRootSelector } from "../../utils/selectors.js";
|
|
2
2
|
import type { UseChartBrushSignature } from "./useChartBrush.types.js";
|
|
3
3
|
export declare const selectorBrush: ChartOptionalRootSelector<UseChartBrushSignature>;
|
|
4
|
-
export declare const selectorBrushStart: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
4
|
+
export declare const selectorBrushStart: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
6
|
}) => import("./useChartBrush.types.js").Point | null | undefined;
|
|
7
|
-
export declare const selectorBrushCurrent: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
7
|
+
export declare const selectorBrushCurrent: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
8
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
9
9
|
}) => import("./useChartBrush.types.js").Point | null | undefined;
|
|
10
|
-
export declare const selectorBrushStartX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
10
|
+
export declare const selectorBrushStartX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
11
11
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
12
12
|
}) => number | null;
|
|
13
|
-
export declare const selectorBrushStartY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
13
|
+
export declare const selectorBrushStartY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
14
14
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
15
15
|
}) => number | null;
|
|
16
|
-
export declare const selectorBrushCurrentX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
16
|
+
export declare const selectorBrushCurrentX: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
17
17
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
18
18
|
}) => number | null;
|
|
19
|
-
export declare const selectorBrushCurrentY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
19
|
+
export declare const selectorBrushCurrentY: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
20
20
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
21
21
|
}) => number | null;
|
|
22
|
-
export declare const selectorBrushState: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
22
|
+
export declare const selectorBrushState: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
23
23
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
24
24
|
}) => {
|
|
25
25
|
start: {
|
|
@@ -31,24 +31,24 @@ export declare const selectorBrushState: (args_0: import("../../corePlugins/useC
|
|
|
31
31
|
y: number;
|
|
32
32
|
};
|
|
33
33
|
} | null;
|
|
34
|
-
export declare const selectorBrushConfigNoZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
34
|
+
export declare const selectorBrushConfigNoZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
35
35
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
36
36
|
}) => "x" | "y" | "xy";
|
|
37
|
-
export declare const selectorBrushConfigZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & {
|
|
37
|
+
export declare const selectorBrushConfigZoom: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("../useChartCartesianAxis/index.js").UseChartCartesianAxisState> & {
|
|
38
38
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
39
39
|
}) => "x" | "y" | "xy" | null;
|
|
40
|
-
export declare const selectorBrushConfig: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
40
|
+
export declare const selectorBrushConfig: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
|
|
41
41
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
42
42
|
}) => "x" | "y" | "xy";
|
|
43
|
-
export declare const selectorIsBrushEnabled: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
43
|
+
export declare const selectorIsBrushEnabled: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
44
44
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
45
45
|
}) => boolean | undefined;
|
|
46
|
-
export declare const selectorIsBrushSelectionActive: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
46
|
+
export declare const selectorIsBrushSelectionActive: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
47
47
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
48
48
|
}) => boolean | undefined;
|
|
49
|
-
export declare const selectorBrushShouldPreventAxisHighlight: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
49
|
+
export declare const selectorBrushShouldPreventAxisHighlight: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
50
50
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
51
51
|
}) => boolean | undefined;
|
|
52
|
-
export declare const selectorBrushShouldPreventTooltip: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
52
|
+
export declare const selectorBrushShouldPreventTooltip: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartBrush.types.js").UseChartBrushState> & {
|
|
53
53
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
54
54
|
}) => boolean | undefined;
|
|
@@ -2,7 +2,7 @@ import { type NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
|
2
2
|
import { type ChartsXAxisProps, type ChartsAxisProps, type ChartsYAxisProps, type AxisId, type DefaultedXAxis, type DefaultedYAxis, type D3Scale } from "../../../../models/axis.js";
|
|
3
3
|
import { type ChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
4
4
|
import type { ChartDrawingArea } from "../../../../hooks/index.js";
|
|
5
|
-
import { type ChartSeriesConfig } from "../../
|
|
5
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
6
6
|
import { type ComputedAxisConfig } from "./useChartCartesianAxis.types.js";
|
|
7
7
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
8
8
|
import { type ZoomData } from "./zoom.types.js";
|
|
@@ -5,9 +5,9 @@ import { type DatasetType } from "../../../../models/seriesType/config.js";
|
|
|
5
5
|
type InXAxis = XAxis & {
|
|
6
6
|
zoom?: boolean | ZoomOptions;
|
|
7
7
|
};
|
|
8
|
-
export declare function defaultizeXAxis(inAxes: readonly InXAxis[] | undefined, dataset: Readonly<DatasetType> | undefined): DefaultedXAxis[];
|
|
8
|
+
export declare function defaultizeXAxis(inAxes: readonly InXAxis[] | undefined, dataset: Readonly<DatasetType> | undefined, axesGap: number): DefaultedXAxis[];
|
|
9
9
|
type InYAxis = YAxis & {
|
|
10
10
|
zoom?: boolean | ZoomOptions;
|
|
11
11
|
};
|
|
12
|
-
export declare function defaultizeYAxis(inAxes: readonly InYAxis[] | undefined, dataset: Readonly<DatasetType> | undefined): DefaultedYAxis[];
|
|
12
|
+
export declare function defaultizeYAxis(inAxes: readonly InYAxis[] | undefined, dataset: Readonly<DatasetType> | undefined, axesGap: number): DefaultedYAxis[];
|
|
13
13
|
export {};
|
|
@@ -9,7 +9,7 @@ exports.defaultizeYAxis = defaultizeYAxis;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defaultizeZoom = require("./defaultizeZoom");
|
|
11
11
|
var _constants = require("../../../../constants");
|
|
12
|
-
function defaultizeXAxis(inAxes, dataset) {
|
|
12
|
+
function defaultizeXAxis(inAxes, dataset, axesGap) {
|
|
13
13
|
const offsets = {
|
|
14
14
|
top: 0,
|
|
15
15
|
bottom: 0,
|
|
@@ -38,7 +38,7 @@ function defaultizeXAxis(inAxes, dataset) {
|
|
|
38
38
|
|
|
39
39
|
// Increment the offset for the next axis
|
|
40
40
|
if (position !== 'none') {
|
|
41
|
-
offsets[position] += sharedConfig.height;
|
|
41
|
+
offsets[position] += sharedConfig.height + axesGap;
|
|
42
42
|
if (sharedConfig.zoom?.slider.enabled) {
|
|
43
43
|
offsets[position] += sharedConfig.zoom.slider.size;
|
|
44
44
|
}
|
|
@@ -59,7 +59,7 @@ function defaultizeXAxis(inAxes, dataset) {
|
|
|
59
59
|
});
|
|
60
60
|
return parsedAxes;
|
|
61
61
|
}
|
|
62
|
-
function defaultizeYAxis(inAxes, dataset) {
|
|
62
|
+
function defaultizeYAxis(inAxes, dataset, axesGap) {
|
|
63
63
|
const offsets = {
|
|
64
64
|
right: 0,
|
|
65
65
|
left: 0,
|
|
@@ -88,7 +88,7 @@ function defaultizeYAxis(inAxes, dataset) {
|
|
|
88
88
|
|
|
89
89
|
// Increment the offset for the next axis
|
|
90
90
|
if (position !== 'none') {
|
|
91
|
-
offsets[position] += sharedConfig.width;
|
|
91
|
+
offsets[position] += sharedConfig.width + axesGap;
|
|
92
92
|
if (sharedConfig.zoom?.slider.enabled) {
|
|
93
93
|
offsets[position] += sharedConfig.zoom.slider.size;
|
|
94
94
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type NumberValue } from '@mui/x-charts-vendor/d3-scale';
|
|
1
2
|
import { type AxisConfig } from "../../../../models/axis.js";
|
|
2
3
|
import { type CartesianChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
4
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/index.js";
|
|
4
|
-
export declare const getAxisDomainLimit: <T extends CartesianChartSeriesType>(axis: Pick<AxisConfig, "id" | "domainLimit">, axisDirection: "x" | "y", axisIndex: number, formattedSeries: ProcessedSeries<T | "line">) => "nice" | "strict" | ((min:
|
|
5
|
-
min:
|
|
6
|
-
max:
|
|
5
|
+
export declare const getAxisDomainLimit: <T extends CartesianChartSeriesType>(axis: Pick<AxisConfig, "id" | "domainLimit">, axisDirection: "x" | "y", axisIndex: number, formattedSeries: ProcessedSeries<T | "line">) => "nice" | "strict" | ((min: NumberValue, max: NumberValue) => {
|
|
6
|
+
min: NumberValue;
|
|
7
|
+
max: NumberValue;
|
|
7
8
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type AxisConfig } from "../../../../models/index.js";
|
|
2
2
|
import { type CartesianChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
3
|
-
import { type ChartSeriesConfig } from "../../
|
|
3
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
4
4
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
5
5
|
import { type GetZoomAxisFilters } from "./zoom.types.js";
|
|
6
6
|
export declare function getAxisExtrema<T extends CartesianChartSeriesType>(axis: AxisConfig, axisDirection: 'x' | 'y', seriesConfig: ChartSeriesConfig<T>, axisIndex: number, formattedSeries: ProcessedSeries<T>, getFilters?: GetZoomAxisFilters): [number, number];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CartesianChartSeriesType } from "../../../../models/seriesType/config.js";
|
|
2
|
-
import { type ChartSeriesConfig } from "../../
|
|
2
|
+
import { type ChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.js";
|
|
3
3
|
import { type ProcessedSeries } from "../../corePlugins/useChartSeries/useChartSeries.types.js";
|
|
4
4
|
import { type AxisId } from "../../../../models/axis.js";
|
|
5
5
|
export declare const getAxisTriggerTooltip: <TSeriesType extends CartesianChartSeriesType>(axisDirection: "x" | "y", seriesConfig: ChartSeriesConfig<TSeriesType>, formattedSeries: ProcessedSeries<TSeriesType>, defaultAxisId: AxisId) => Set<AxisId>;
|
package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export declare const selectorChartLeftAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
1
|
+
export declare const selectorChartLeftAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
2
2
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
3
3
|
}) => number;
|
|
4
|
-
export declare const selectorChartRightAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
4
|
+
export declare const selectorChartRightAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
5
5
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
6
6
|
}) => number;
|
|
7
|
-
export declare const selectorChartTopAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
7
|
+
export declare const selectorChartTopAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
8
8
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
9
9
|
}) => number;
|
|
10
|
-
export declare const selectorChartBottomAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
10
|
+
export declare const selectorChartBottomAxisSize: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
11
11
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
12
12
|
}) => number;
|
|
13
|
-
export declare const selectorChartAxisSizes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
13
|
+
export declare const selectorChartAxisSizes: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
|
|
14
14
|
cacheKey: import("../../models/index.js").ChartStateCacheKey;
|
|
15
15
|
}) => {
|
|
16
16
|
left: number;
|
package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js
CHANGED
|
@@ -6,17 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.selectorChartTopAxisSize = exports.selectorChartRightAxisSize = exports.selectorChartLeftAxisSize = exports.selectorChartBottomAxisSize = exports.selectorChartAxisSizes = void 0;
|
|
7
7
|
var _store = require("@mui/x-internals/store");
|
|
8
8
|
var _useChartCartesianAxisLayout = require("./useChartCartesianAxisLayout.selectors");
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
function selectAxisSize(axes, axesGap, position) {
|
|
10
|
+
let axesSize = 0;
|
|
11
|
+
let nbOfAxes = 0;
|
|
12
|
+
for (const axis of axes ?? []) {
|
|
13
|
+
if (axis.position !== position) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const axisSize = position === 'top' || position === 'bottom' ? axis.height : axis.width;
|
|
17
|
+
axesSize += (axisSize || 0) + (axis.zoom?.slider.enabled ? axis.zoom.slider.size : 0);
|
|
18
|
+
nbOfAxes += 1;
|
|
19
|
+
}
|
|
20
|
+
return axesSize + axesGap * Math.max(0, nbOfAxes - 1);
|
|
21
|
+
}
|
|
22
|
+
const selectorChartLeftAxisSize = exports.selectorChartLeftAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawYAxis, _useChartCartesianAxisLayout.selectorChartCartesianAxesGap, function selectorChartLeftAxisSize(yAxis, axesGap) {
|
|
23
|
+
return selectAxisSize(yAxis, axesGap, 'left');
|
|
11
24
|
});
|
|
12
|
-
const selectorChartRightAxisSize = exports.selectorChartRightAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawYAxis, function selectorChartRightAxisSize(yAxis) {
|
|
13
|
-
return (yAxis
|
|
25
|
+
const selectorChartRightAxisSize = exports.selectorChartRightAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawYAxis, _useChartCartesianAxisLayout.selectorChartCartesianAxesGap, function selectorChartRightAxisSize(yAxis, axesGap) {
|
|
26
|
+
return selectAxisSize(yAxis, axesGap, 'right');
|
|
14
27
|
});
|
|
15
|
-
const selectorChartTopAxisSize = exports.selectorChartTopAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawXAxis, function selectorChartTopAxisSize(xAxis) {
|
|
16
|
-
return (xAxis
|
|
28
|
+
const selectorChartTopAxisSize = exports.selectorChartTopAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartCartesianAxesGap, function selectorChartTopAxisSize(xAxis, axesGap) {
|
|
29
|
+
return selectAxisSize(xAxis, axesGap, 'top');
|
|
17
30
|
});
|
|
18
|
-
const selectorChartBottomAxisSize = exports.selectorChartBottomAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawXAxis, function selectorChartBottomAxisSize(xAxis) {
|
|
19
|
-
return (xAxis
|
|
31
|
+
const selectorChartBottomAxisSize = exports.selectorChartBottomAxisSize = (0, _store.createSelector)(_useChartCartesianAxisLayout.selectorChartRawXAxis, _useChartCartesianAxisLayout.selectorChartCartesianAxesGap, function selectorChartBottomAxisSize(xAxis, axesGap) {
|
|
32
|
+
return selectAxisSize(xAxis, axesGap, 'bottom');
|
|
20
33
|
});
|
|
21
34
|
const selectorChartAxisSizes = exports.selectorChartAxisSizes = (0, _store.createSelectorMemoized)(selectorChartLeftAxisSize, selectorChartRightAxisSize, selectorChartTopAxisSize, selectorChartBottomAxisSize, function selectorChartAxisSizes(left, right, top, bottom) {
|
|
22
35
|
return {
|
|
@@ -19,7 +19,7 @@ var _useChartSeries = require("../../corePlugins/useChartSeries/useChartSeries.s
|
|
|
19
19
|
var _defaultizeAxis = require("./defaultizeAxis");
|
|
20
20
|
var _useChartCartesianAxisRendering = require("./useChartCartesianAxisRendering.selectors");
|
|
21
21
|
var _getAxisValue = require("./getAxisValue");
|
|
22
|
-
var
|
|
22
|
+
var _getChartPoint = require("../../../getChartPoint");
|
|
23
23
|
var _useChartInteraction = require("../useChartInteraction");
|
|
24
24
|
var _useChartCartesianInteraction = require("./useChartCartesianInteraction.selectors");
|
|
25
25
|
var _checkHasInteractionPlugin = require("../useChartInteraction/checkHasInteractionPlugin");
|
|
@@ -27,15 +27,17 @@ const AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);
|
|
|
27
27
|
const useChartCartesianAxis = ({
|
|
28
28
|
params,
|
|
29
29
|
store,
|
|
30
|
-
seriesConfig,
|
|
31
|
-
svgRef,
|
|
32
30
|
instance
|
|
33
31
|
}) => {
|
|
32
|
+
const {
|
|
33
|
+
svgRef
|
|
34
|
+
} = instance;
|
|
34
35
|
const {
|
|
35
36
|
xAxis,
|
|
36
37
|
yAxis,
|
|
37
38
|
dataset,
|
|
38
|
-
onHighlightedAxisChange
|
|
39
|
+
onHighlightedAxisChange,
|
|
40
|
+
axesGap
|
|
39
41
|
} = params;
|
|
40
42
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
43
|
const ids = [...(xAxis ?? []), ...(yAxis ?? [])].filter(axis => axis.id).map(axis => axis.id);
|
|
@@ -77,10 +79,11 @@ const useChartCartesianAxis = ({
|
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
81
|
store.set('cartesianAxis', {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
axesGap,
|
|
83
|
+
x: (0, _defaultizeAxis.defaultizeXAxis)(xAxis, dataset, axesGap),
|
|
84
|
+
y: (0, _defaultizeAxis.defaultizeYAxis)(yAxis, dataset, axesGap)
|
|
82
85
|
});
|
|
83
|
-
}, [
|
|
86
|
+
}, [drawingArea, xAxis, yAxis, dataset, axesGap, store]);
|
|
84
87
|
const usedXAxis = xAxisIds[0];
|
|
85
88
|
const usedYAxis = yAxisIds[0];
|
|
86
89
|
(0, _store.useStoreEffect)(store, _useChartCartesianInteraction.selectorChartAxisInteraction, (prevAxisInteraction, nextAxisInteraction) => {
|
|
@@ -127,7 +130,7 @@ const useChartCartesianAxis = ({
|
|
|
127
130
|
const gestureHandler = event => {
|
|
128
131
|
const srvEvent = event.detail.srcEvent;
|
|
129
132
|
const target = event.detail.target;
|
|
130
|
-
const svgPoint = (0,
|
|
133
|
+
const svgPoint = (0, _getChartPoint.getChartPoint)(element, srvEvent);
|
|
131
134
|
|
|
132
135
|
// Release the pointer capture if we are panning, as this would cause the tooltip to
|
|
133
136
|
// be locked to the first "section" it touches.
|
|
@@ -161,7 +164,7 @@ const useChartCartesianAxis = ({
|
|
|
161
164
|
const axisClickHandler = instance.addInteractionListener('tap', event => {
|
|
162
165
|
let dataIndex = null;
|
|
163
166
|
let isXAxis = false;
|
|
164
|
-
const svgPoint = (0,
|
|
167
|
+
const svgPoint = (0, _getChartPoint.getChartPoint)(element, event.detail.srcEvent);
|
|
165
168
|
const xIndex = (0, _getAxisValue.getAxisIndex)(xAxisWithScale[usedXAxis], svgPoint.x);
|
|
166
169
|
isXAxis = xIndex !== -1;
|
|
167
170
|
dataIndex = isXAxis ? xIndex : (0, _getAxisValue.getAxisIndex)(yAxisWithScale[usedYAxis], svgPoint.y);
|
|
@@ -210,20 +213,23 @@ useChartCartesianAxis.params = {
|
|
|
210
213
|
onAxisClick: true,
|
|
211
214
|
disableAxisListener: true,
|
|
212
215
|
onHighlightedAxisChange: true,
|
|
213
|
-
highlightedAxis: true
|
|
216
|
+
highlightedAxis: true,
|
|
217
|
+
axesGap: true
|
|
214
218
|
};
|
|
215
219
|
useChartCartesianAxis.getDefaultizedParams = ({
|
|
216
220
|
params
|
|
217
221
|
}) => {
|
|
218
222
|
return (0, _extends2.default)({}, params, {
|
|
223
|
+
axesGap: params.axesGap ?? 0,
|
|
219
224
|
colors: params.colors ?? _colorPalettes.rainbowSurgePalette,
|
|
220
225
|
theme: params.theme ?? 'light',
|
|
221
|
-
defaultizedXAxis: (0, _defaultizeAxis.defaultizeXAxis)(params.xAxis, params.dataset),
|
|
222
|
-
defaultizedYAxis: (0, _defaultizeAxis.defaultizeYAxis)(params.yAxis, params.dataset)
|
|
226
|
+
defaultizedXAxis: (0, _defaultizeAxis.defaultizeXAxis)(params.xAxis, params.dataset, params.axesGap ?? 0),
|
|
227
|
+
defaultizedYAxis: (0, _defaultizeAxis.defaultizeYAxis)(params.yAxis, params.dataset, params.axesGap ?? 0)
|
|
223
228
|
});
|
|
224
229
|
};
|
|
225
230
|
useChartCartesianAxis.getInitialState = params => (0, _extends2.default)({
|
|
226
231
|
cartesianAxis: {
|
|
232
|
+
axesGap: params.axesGap,
|
|
227
233
|
x: params.defaultizedXAxis,
|
|
228
234
|
y: params.defaultizedYAxis
|
|
229
235
|
}
|
package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts
CHANGED
|
@@ -56,8 +56,13 @@ export interface UseChartCartesianAxisParameters<S extends ScaleName = ScaleName
|
|
|
56
56
|
* @default false
|
|
57
57
|
*/
|
|
58
58
|
disableAxisListener?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* A gap added between axes when multiple axes are rendered on the same side of the chart.
|
|
61
|
+
* @default 0
|
|
62
|
+
*/
|
|
63
|
+
axesGap?: number;
|
|
59
64
|
}
|
|
60
|
-
export type UseChartCartesianAxisDefaultizedParameters<S extends ScaleName = ScaleName> = UseChartCartesianAxisParameters<S> & {
|
|
65
|
+
export type UseChartCartesianAxisDefaultizedParameters<S extends ScaleName = ScaleName> = UseChartCartesianAxisParameters<S> & Required<Pick<UseChartCartesianAxisParameters<S>, 'axesGap'>> & {
|
|
61
66
|
defaultizedXAxis: DefaultedXAxis<S>[];
|
|
62
67
|
defaultizedYAxis: DefaultedYAxis<S>[];
|
|
63
68
|
};
|
|
@@ -79,6 +84,7 @@ export interface UseChartCartesianAxisState {
|
|
|
79
84
|
zoomData: readonly ZoomData[];
|
|
80
85
|
};
|
|
81
86
|
cartesianAxis: {
|
|
87
|
+
axesGap: number;
|
|
82
88
|
x: DefaultedXAxis[];
|
|
83
89
|
y: DefaultedYAxis[];
|
|
84
90
|
};
|