@mui/x-charts 9.8.0 → 9.9.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.mts +1 -1
- package/BarChart/AnimatedBarElement.d.ts +1 -1
- package/BarChart/BarClipPath.d.mts +1 -1
- package/BarChart/BarClipPath.d.ts +1 -1
- package/BarChart/BarElement.d.mts +1 -1
- package/BarChart/BarElement.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelItem.d.mts +1 -1
- package/BarChart/BarLabel/BarLabelItem.d.ts +1 -1
- package/BarChart/BarLabel/BarLabelPlot.d.mts +2 -1
- package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -1
- package/BarChart/BatchBarPlot/BarGroup.d.mts +1 -1
- package/BarChart/BatchBarPlot/BarGroup.d.ts +1 -1
- package/BarChart/BatchBarPlot/BatchBarPlot.d.mts +2 -1
- package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +2 -1
- package/BarChart/FocusedBar.d.mts +1 -1
- package/BarChart/FocusedBar.d.ts +1 -1
- package/BarChart/IndividualBarPlot.d.mts +2 -1
- package/BarChart/IndividualBarPlot.d.ts +2 -1
- package/BarChart/seriesConfig/bar/tooltipPosition.d.mts +2 -3
- package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +2 -3
- package/BarChart/seriesConfig/bar/tooltipPosition.js +19 -15
- package/BarChart/seriesConfig/bar/tooltipPosition.mjs +18 -14
- package/BarChart/seriesConfig/index.js +2 -2
- package/BarChart/seriesConfig/index.mjs +2 -2
- package/BarChart/useBarPlotData.d.mts +5 -1
- package/BarChart/useBarPlotData.d.ts +5 -1
- package/BarChart/useBarPlotData.js +102 -25
- package/BarChart/useBarPlotData.mjs +102 -26
- package/CHANGELOG.md +119 -0
- package/ChartsAxis/ChartsAxis.d.mts +2 -1
- package/ChartsAxis/ChartsAxis.d.ts +2 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.mts +2 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +2 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.mts +2 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +2 -1
- package/ChartsAxisHighlight/ChartsXAxisHighlight.js +22 -5
- package/ChartsAxisHighlight/ChartsXAxisHighlight.mjs +23 -6
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.mts +2 -1
- package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +2 -1
- package/ChartsAxisHighlight/ChartsYAxisHighlight.js +22 -5
- package/ChartsAxisHighlight/ChartsYAxisHighlight.mjs +23 -6
- package/ChartsAxisHighlight/getSampledBandHighlight.d.mts +27 -0
- package/ChartsAxisHighlight/getSampledBandHighlight.d.ts +27 -0
- package/ChartsAxisHighlight/getSampledBandHighlight.js +35 -0
- package/ChartsAxisHighlight/getSampledBandHighlight.mjs +29 -0
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.mts +1 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValue.d.ts +1 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.mts +2 -1
- package/ChartsAxisHighlightValue/ChartsAxisHighlightValueItem.d.ts +2 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.mts +2 -1
- package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +2 -1
- package/ChartsClipPath/ChartsClipPath.d.mts +1 -1
- package/ChartsClipPath/ChartsClipPath.d.ts +1 -1
- package/ChartsDataProvider/ChartsDataProvider.d.mts +1 -1
- package/ChartsDataProvider/ChartsDataProvider.d.ts +1 -1
- package/ChartsGrid/ChartsGrid.d.mts +1 -1
- package/ChartsGrid/ChartsGrid.d.ts +1 -1
- package/ChartsGrid/ChartsHorizontalGrid.d.mts +2 -1
- package/ChartsGrid/ChartsHorizontalGrid.d.ts +2 -1
- package/ChartsGrid/ChartsVerticalGrid.d.mts +2 -1
- package/ChartsGrid/ChartsVerticalGrid.d.ts +2 -1
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.mts +1 -1
- package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.d.mts +1 -1
- package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.d.mts +1 -1
- package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -1
- package/ChartsOverlay/ChartsOverlay.d.mts +1 -1
- package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.mts +2 -1
- package/ChartsRadialAxisHighlight/ChartsRadialAxisHighlight.d.ts +2 -1
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.mts +2 -1
- package/ChartsRadialAxisHighlight/ChartsRadiusAxisHighlight.d.ts +2 -1
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.mts +2 -1
- package/ChartsRadialAxisHighlight/ChartsRotationAxisHighlight.d.ts +2 -1
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.mts +1 -1
- package/ChartsRadialDataProvider/ChartsRadialDataProvider.d.ts +1 -1
- package/ChartsRadialGrid/ChartsRadialGrid.d.mts +1 -1
- package/ChartsRadialGrid/ChartsRadialGrid.d.ts +1 -1
- package/ChartsRadialGrid/ChartsRadiusGrid.d.mts +2 -1
- package/ChartsRadialGrid/ChartsRadiusGrid.d.ts +2 -1
- package/ChartsRadialGrid/ChartsRotationGrid.d.mts +2 -1
- package/ChartsRadialGrid/ChartsRotationGrid.d.ts +2 -1
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.mts +1 -1
- package/ChartsRadiusAxis/ChartsRadiusAxis.d.ts +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.d.mts +1 -1
- package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.mts +1 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.mts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/ChartsRotationAxis/ChartsRotationAxis.d.mts +1 -1
- package/ChartsRotationAxis/ChartsRotationAxis.d.ts +1 -1
- package/ChartsText/ChartsText.d.mts +1 -1
- package/ChartsText/ChartsText.d.ts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.mts +1 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -1
- package/ChartsTooltip/ChartsItemTooltipContent.d.mts +2 -1
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +2 -1
- package/ChartsTooltip/ChartsTooltip.d.mts +1 -1
- package/ChartsTooltip/ChartsTooltip.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.d.mts +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
- package/ChartsTooltip/ChartsTooltipContainer.js +1 -5
- package/ChartsTooltip/ChartsTooltipContainer.mjs +2 -6
- package/ChartsXAxis/ChartsGroupedXAxisTicks.d.mts +2 -1
- package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +2 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.d.mts +2 -1
- package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +2 -1
- package/ChartsXAxis/ChartsXAxis.d.mts +1 -1
- package/ChartsXAxis/ChartsXAxis.d.ts +1 -1
- package/ChartsXAxis/ChartsXAxisImpl.d.mts +2 -1
- package/ChartsXAxis/ChartsXAxisImpl.d.ts +2 -1
- package/ChartsYAxis/ChartsGroupedYAxisTicks.d.mts +2 -1
- package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +2 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.d.mts +2 -1
- package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +2 -1
- package/ChartsYAxis/ChartsYAxis.d.mts +1 -1
- package/ChartsYAxis/ChartsYAxis.d.ts +1 -1
- package/ChartsYAxis/ChartsYAxisImpl.d.mts +2 -1
- package/ChartsYAxis/ChartsYAxisImpl.d.ts +2 -1
- package/Gauge/GaugeProvider.d.mts +1 -1
- package/Gauge/GaugeProvider.d.ts +1 -1
- package/Gauge/GaugeReferenceArc.d.mts +1 -1
- package/Gauge/GaugeReferenceArc.d.ts +1 -1
- package/Gauge/GaugeValueArc.d.mts +1 -1
- package/Gauge/GaugeValueArc.d.ts +1 -1
- package/Gauge/GaugeValueText.d.mts +1 -1
- package/Gauge/GaugeValueText.d.ts +1 -1
- package/LineChart/AnimatedArea.d.mts +1 -1
- package/LineChart/AnimatedArea.d.ts +1 -1
- package/LineChart/AppearingMask.d.mts +1 -1
- package/LineChart/AppearingMask.d.ts +1 -1
- package/LineChart/AreaElement.d.mts +1 -1
- package/LineChart/AreaElement.d.ts +1 -1
- package/LineChart/AreaPlot.d.mts +1 -1
- package/LineChart/AreaPlot.d.ts +1 -1
- package/LineChart/CircleMarkElement.d.mts +1 -1
- package/LineChart/CircleMarkElement.d.ts +1 -1
- package/LineChart/FocusedLineMark.d.mts +1 -1
- package/LineChart/FocusedLineMark.d.ts +1 -1
- package/LineChart/LineElement.d.mts +1 -1
- package/LineChart/LineElement.d.ts +1 -1
- package/LineChart/LineHighlightElement.d.mts +1 -1
- package/LineChart/LineHighlightElement.d.ts +1 -1
- package/LineChart/LineHighlightPlot.d.mts +1 -1
- package/LineChart/LineHighlightPlot.d.ts +1 -1
- package/LineChart/LinePlot.d.mts +1 -1
- package/LineChart/LinePlot.d.ts +1 -1
- package/LineChart/LinePlot.js +3 -2
- package/LineChart/LinePlot.mjs +3 -2
- package/LineChart/MarkElement.d.mts +1 -1
- package/LineChart/MarkElement.d.ts +1 -1
- package/LineChart/MarkPlot.d.mts +1 -1
- package/LineChart/MarkPlot.d.ts +1 -1
- package/LineChart/seriesConfig/index.js +2 -2
- package/LineChart/seriesConfig/index.mjs +2 -2
- package/LineChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/LineChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/LineChart/seriesConfig/tooltipPosition.js +14 -14
- package/LineChart/seriesConfig/tooltipPosition.mjs +13 -13
- package/LineChart/useLinePlotData.d.mts +13 -1
- package/LineChart/useLinePlotData.d.ts +13 -1
- package/LineChart/useLinePlotData.js +90 -33
- package/LineChart/useLinePlotData.mjs +92 -34
- package/PieChart/FocusedPieArc.d.mts +1 -1
- package/PieChart/FocusedPieArc.d.ts +1 -1
- package/PieChart/PieArcLabelPlot.d.mts +1 -1
- package/PieChart/PieArcLabelPlot.d.ts +1 -1
- package/PieChart/PieArcPlot.d.mts +1 -1
- package/PieChart/PieArcPlot.d.ts +1 -1
- package/PieChart/PiePlot.d.mts +1 -1
- package/PieChart/PiePlot.d.ts +1 -1
- package/PieChart/seriesConfig/index.js +2 -2
- package/PieChart/seriesConfig/index.mjs +2 -2
- package/PieChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/PieChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/PieChart/seriesConfig/tooltipPosition.js +7 -11
- package/PieChart/seriesConfig/tooltipPosition.mjs +6 -10
- package/RadarChart/FocusedRadarMark.d.mts +1 -1
- package/RadarChart/FocusedRadarMark.d.ts +1 -1
- package/RadarChart/RadarAxis/RadarAxis.d.mts +1 -1
- package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.mts +1 -1
- package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.mts +2 -1
- package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +2 -1
- package/RadarChart/RadarGrid/CircularRadarGrid.d.mts +2 -1
- package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +2 -1
- package/RadarChart/RadarGrid/CircularRadarStripes.d.mts +2 -1
- package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +2 -1
- package/RadarChart/RadarGrid/RadarGrid.d.mts +2 -1
- package/RadarChart/RadarGrid/RadarGrid.d.ts +2 -1
- package/RadarChart/RadarGrid/SharpRadarGrid.d.mts +2 -1
- package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +2 -1
- package/RadarChart/RadarGrid/SharpRadarStripes.d.mts +2 -1
- package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +2 -1
- package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.mts +2 -1
- package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.mts +1 -1
- package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -1
- package/RadarChart/seriesConfig/index.js +2 -2
- package/RadarChart/seriesConfig/index.mjs +2 -2
- package/RadarChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/RadarChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/RadarChart/seriesConfig/tooltipPosition.js +9 -16
- package/RadarChart/seriesConfig/tooltipPosition.mjs +8 -15
- package/ScatterChart/BatchScatter.d.mts +2 -1
- package/ScatterChart/BatchScatter.d.ts +2 -1
- package/ScatterChart/FocusedScatterMark.d.mts +1 -1
- package/ScatterChart/FocusedScatterMark.d.ts +1 -1
- package/ScatterChart/HighlightedScatterMark.d.mts +1 -1
- package/ScatterChart/HighlightedScatterMark.d.ts +1 -1
- package/ScatterChart/Scatter.d.mts +1 -1
- package/ScatterChart/Scatter.d.ts +1 -1
- package/ScatterChart/ScatterMarker.d.mts +1 -1
- package/ScatterChart/ScatterMarker.d.ts +1 -1
- package/ScatterChart/ScatterPlot.d.mts +1 -1
- package/ScatterChart/ScatterPlot.d.ts +1 -1
- package/ScatterChart/async/ScatterAsync.d.mts +2 -1
- package/ScatterChart/async/ScatterAsync.d.ts +2 -1
- package/ScatterChart/async/ScatterAsyncBatch.d.mts +1 -1
- package/ScatterChart/async/ScatterAsyncBatch.d.ts +1 -1
- package/ScatterChart/seriesConfig/index.js +2 -2
- package/ScatterChart/seriesConfig/index.mjs +2 -2
- package/ScatterChart/seriesConfig/tooltipPosition.d.mts +2 -3
- package/ScatterChart/seriesConfig/tooltipPosition.d.ts +2 -3
- package/ScatterChart/seriesConfig/tooltipPosition.js +13 -13
- package/ScatterChart/seriesConfig/tooltipPosition.mjs +12 -12
- package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
- package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
- package/context/ChartsSlotsContext.d.mts +1 -1
- package/context/ChartsSlotsContext.d.ts +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +2 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +2 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.mts +2 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +2 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.mts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.mts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -1
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.mts +2 -1
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +2 -1
- package/internals/createGetBarDimensions.d.mts +14 -1
- package/internals/createGetBarDimensions.d.ts +14 -1
- package/internals/createGetBarDimensions.js +45 -0
- package/internals/createGetBarDimensions.mjs +45 -0
- package/internals/geometry.js +1 -1
- package/internals/geometry.mjs +1 -1
- package/internals/index.d.mts +1 -2
- package/internals/index.d.ts +1 -2
- package/internals/index.js +12 -8
- package/internals/index.mjs +1 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +2 -2
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +4 -4
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -1
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +11 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +11 -6
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.mts +18 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionSelector.types.d.ts +18 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +2 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +1 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.mts +26 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.d.ts +26 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.js +89 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.selectors.mjs +81 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.mts +93 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/sampling.types.d.ts +93 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +3 -8
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +3 -8
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.js +2 -53
- package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs +2 -53
- package/models/seriesType/config.d.mts +6 -2
- package/models/seriesType/config.d.ts +6 -2
- package/package.json +5 -5
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +0 -45
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +0 -45
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.mts +0 -48
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.d.ts +0 -48
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js +0 -124
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs +0 -117
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.mts +0 -73
- package/internals/plugins/featurePlugins/useGeoProjection/useGeoProjection.types.d.ts +0 -73
- /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.js → tooltipItemPositionSelector.types.js} +0 -0
- /package/internals/plugins/corePlugins/useChartSeriesConfig/types/{tooltipItemPositionGetter.types.mjs → tooltipItemPositionSelector.types.mjs} +0 -0
- /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.js → useChartCartesianAxis/sampling.types.js} +0 -0
- /package/internals/plugins/featurePlugins/{useGeoProjection/useGeoProjection.types.mjs → useChartCartesianAxis/sampling.types.mjs} +0 -0
|
@@ -39,7 +39,7 @@ export interface ScatterMarkerProps {
|
|
|
39
39
|
*/
|
|
40
40
|
onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
|
|
41
41
|
}
|
|
42
|
-
declare function ScatterMarker(props: ScatterMarkerProps):
|
|
42
|
+
declare function ScatterMarker(props: ScatterMarkerProps): React.JSX.Element;
|
|
43
43
|
declare namespace ScatterMarker {
|
|
44
44
|
var propTypes: any;
|
|
45
45
|
}
|
|
@@ -49,7 +49,7 @@ export interface ScatterPlotProps extends Pick<ScatterProps, 'classes'> {
|
|
|
49
49
|
*
|
|
50
50
|
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
51
51
|
*/
|
|
52
|
-
declare function ScatterPlot(props: ScatterPlotProps):
|
|
52
|
+
declare function ScatterPlot(props: ScatterPlotProps): React.JSX.Element | null;
|
|
53
53
|
declare namespace ScatterPlot {
|
|
54
54
|
var propTypes: any;
|
|
55
55
|
}
|
|
@@ -49,7 +49,7 @@ export interface ScatterPlotProps extends Pick<ScatterProps, 'classes'> {
|
|
|
49
49
|
*
|
|
50
50
|
* - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
|
|
51
51
|
*/
|
|
52
|
-
declare function ScatterPlot(props: ScatterPlotProps):
|
|
52
|
+
declare function ScatterPlot(props: ScatterPlotProps): React.JSX.Element | null;
|
|
53
53
|
declare namespace ScatterPlot {
|
|
54
54
|
var propTypes: any;
|
|
55
55
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ScatterProps } from "../Scatter.mjs";
|
|
2
3
|
/**
|
|
3
4
|
* Interacting sample stride. Multiple of `nBatches` (batch 0's stride) so the
|
|
@@ -8,7 +9,7 @@ export declare function getInteractionStep(count: number, nBatches: number, budg
|
|
|
8
9
|
/**
|
|
9
10
|
* @ignore - internal component.
|
|
10
11
|
*/
|
|
11
|
-
declare function ScatterAsync(props: ScatterProps):
|
|
12
|
+
declare function ScatterAsync(props: ScatterProps): React.JSX.Element;
|
|
12
13
|
declare namespace ScatterAsync {
|
|
13
14
|
var propTypes: any;
|
|
14
15
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { ScatterProps } from "../Scatter.js";
|
|
2
3
|
/**
|
|
3
4
|
* Interacting sample stride. Multiple of `nBatches` (batch 0's stride) so the
|
|
@@ -8,7 +9,7 @@ export declare function getInteractionStep(count: number, nBatches: number, budg
|
|
|
8
9
|
/**
|
|
9
10
|
* @ignore - internal component.
|
|
10
11
|
*/
|
|
11
|
-
declare function ScatterAsync(props: ScatterProps):
|
|
12
|
+
declare function ScatterAsync(props: ScatterProps): React.JSX.Element;
|
|
12
13
|
declare namespace ScatterAsync {
|
|
13
14
|
var propTypes: any;
|
|
14
15
|
}
|
|
@@ -24,6 +24,6 @@ export interface ScatterAsyncBatchProps extends Pick<ScatterProps, 'series' | 'c
|
|
|
24
24
|
/**
|
|
25
25
|
* @ignore - internal component.
|
|
26
26
|
*/
|
|
27
|
-
declare function ScatterAsyncBatchComponent(props: ScatterAsyncBatchProps):
|
|
27
|
+
declare function ScatterAsyncBatchComponent(props: ScatterAsyncBatchProps): React.JSX.Element;
|
|
28
28
|
declare const ScatterAsyncBatch: React.MemoExoticComponent<typeof ScatterAsyncBatchComponent>;
|
|
29
29
|
export { ScatterAsyncBatch };
|
|
@@ -24,6 +24,6 @@ export interface ScatterAsyncBatchProps extends Pick<ScatterProps, 'series' | 'c
|
|
|
24
24
|
/**
|
|
25
25
|
* @ignore - internal component.
|
|
26
26
|
*/
|
|
27
|
-
declare function ScatterAsyncBatchComponent(props: ScatterAsyncBatchProps):
|
|
27
|
+
declare function ScatterAsyncBatchComponent(props: ScatterAsyncBatchProps): React.JSX.Element;
|
|
28
28
|
declare const ScatterAsyncBatch: React.MemoExoticComponent<typeof ScatterAsyncBatchComponent>;
|
|
29
29
|
export { ScatterAsyncBatch };
|
|
@@ -11,7 +11,7 @@ var _getColor = _interopRequireDefault(require("./getColor"));
|
|
|
11
11
|
var _legend = _interopRequireDefault(require("./legend"));
|
|
12
12
|
var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
13
13
|
var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
|
|
14
|
-
var _tooltipPosition =
|
|
14
|
+
var _tooltipPosition = require("./tooltipPosition");
|
|
15
15
|
var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
|
|
16
16
|
var _identifierSerializer = require("../../internals/identifierSerializer");
|
|
17
17
|
var _identifierCleaner = require("../../internals/identifierCleaner");
|
|
@@ -22,7 +22,7 @@ const scatterSeriesConfig = exports.scatterSeriesConfig = {
|
|
|
22
22
|
colorProcessor: _getColor.default,
|
|
23
23
|
legendGetter: _legend.default,
|
|
24
24
|
tooltipGetter: _tooltip.default,
|
|
25
|
-
|
|
25
|
+
selectorTooltipItemPosition: _tooltipPosition.selectorTooltipItemPosition,
|
|
26
26
|
xExtremumGetter: _extremums.getExtremumX,
|
|
27
27
|
yExtremumGetter: _extremums.getExtremumY,
|
|
28
28
|
getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
|
|
@@ -4,7 +4,7 @@ import getColor from "./getColor.mjs";
|
|
|
4
4
|
import legendGetter from "./legend.mjs";
|
|
5
5
|
import tooltipGetter from "./tooltip.mjs";
|
|
6
6
|
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.mjs";
|
|
7
|
-
import
|
|
7
|
+
import { selectorTooltipItemPosition } from "./tooltipPosition.mjs";
|
|
8
8
|
import keyboardFocusHandler from "./keyboardFocusHandler.mjs";
|
|
9
9
|
import { identifierSerializerSeriesIdDataIndex } from "../../internals/identifierSerializer.mjs";
|
|
10
10
|
import { identifierCleanerSeriesIdDataIndex } from "../../internals/identifierCleaner.mjs";
|
|
@@ -15,7 +15,7 @@ export const scatterSeriesConfig = {
|
|
|
15
15
|
colorProcessor: getColor,
|
|
16
16
|
legendGetter,
|
|
17
17
|
tooltipGetter,
|
|
18
|
-
|
|
18
|
+
selectorTooltipItemPosition,
|
|
19
19
|
xExtremumGetter: getExtremumX,
|
|
20
20
|
yExtremumGetter: getExtremumY,
|
|
21
21
|
getSeriesWithDefaultValues,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
export default tooltipItemPositionGetter;
|
|
1
|
+
import type { TooltipItemPositionSelector } from "../../internals/plugins/corePlugins/useChartSeriesConfig/index.mjs";
|
|
2
|
+
export declare const selectorTooltipItemPosition: TooltipItemPositionSelector<'scatter'>;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const
|
|
3
|
-
export default tooltipItemPositionGetter;
|
|
1
|
+
import type { TooltipItemPositionSelector } from "../../internals/plugins/corePlugins/useChartSeriesConfig/index.js";
|
|
2
|
+
export declare const selectorTooltipItemPosition: TooltipItemPositionSelector<'scatter'>;
|
|
@@ -3,21 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
6
|
+
exports.selectorTooltipItemPosition = void 0;
|
|
7
|
+
var _store = require("@mui/x-internals/store");
|
|
8
|
+
var _useChartTooltip = require("../../internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors");
|
|
9
|
+
var _useChartSeries = require("../../internals/plugins/corePlugins/useChartSeries");
|
|
10
|
+
var _useChartCartesianAxisRendering = require("../../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors");
|
|
11
|
+
const selectorTooltipItemPosition = exports.selectorTooltipItemPosition = (0, _store.createSelectorMemoized)(_useChartTooltip.selectorChartsTooltipItem, _useChartSeries.selectorChartSeriesProcessed, _useChartCartesianAxisRendering.selectorChartXAxis, _useChartCartesianAxisRendering.selectorChartYAxis, function selectorTooltipItemPosition(identifier, series, xAxes, yAxes) {
|
|
12
|
+
if (!identifier || identifier.type !== 'scatter' || identifier.dataIndex === undefined) {
|
|
14
13
|
return null;
|
|
15
14
|
}
|
|
16
15
|
const itemSeries = series.scatter?.series[identifier.seriesId];
|
|
17
16
|
if (itemSeries == null) {
|
|
18
17
|
return null;
|
|
19
18
|
}
|
|
20
|
-
|
|
19
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
20
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
21
|
+
if (xAxis === undefined || yAxis === undefined) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
24
|
const xValue = itemSeries.data?.[identifier.dataIndex].x;
|
|
@@ -26,8 +27,7 @@ const tooltipItemPositionGetter = params => {
|
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
29
|
return {
|
|
29
|
-
x:
|
|
30
|
-
y:
|
|
30
|
+
x: xAxis.scale(xValue),
|
|
31
|
+
y: yAxis.scale(yValue)
|
|
31
32
|
};
|
|
32
|
-
};
|
|
33
|
-
var _default = exports.default = tooltipItemPositionGetter;
|
|
33
|
+
});
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
1
|
+
import { createSelectorMemoized } from '@mui/x-internals/store';
|
|
2
|
+
import { selectorChartsTooltipItem } from "../../internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.mjs";
|
|
3
|
+
import { selectorChartSeriesProcessed } from "../../internals/plugins/corePlugins/useChartSeries/index.mjs";
|
|
4
|
+
import { selectorChartXAxis, selectorChartYAxis } from "../../internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs";
|
|
5
|
+
export const selectorTooltipItemPosition = createSelectorMemoized(selectorChartsTooltipItem, selectorChartSeriesProcessed, selectorChartXAxis, selectorChartYAxis, function selectorTooltipItemPosition(identifier, series, xAxes, yAxes) {
|
|
6
|
+
if (!identifier || identifier.type !== 'scatter' || identifier.dataIndex === undefined) {
|
|
8
7
|
return null;
|
|
9
8
|
}
|
|
10
9
|
const itemSeries = series.scatter?.series[identifier.seriesId];
|
|
11
10
|
if (itemSeries == null) {
|
|
12
11
|
return null;
|
|
13
12
|
}
|
|
14
|
-
|
|
13
|
+
const xAxis = xAxes.axis[itemSeries.xAxisId ?? xAxes.axisIds[0]];
|
|
14
|
+
const yAxis = yAxes.axis[itemSeries.yAxisId ?? yAxes.axisIds[0]];
|
|
15
|
+
if (xAxis === undefined || yAxis === undefined) {
|
|
15
16
|
return null;
|
|
16
17
|
}
|
|
17
18
|
const xValue = itemSeries.data?.[identifier.dataIndex].x;
|
|
@@ -20,8 +21,7 @@ const tooltipItemPositionGetter = params => {
|
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
23
|
return {
|
|
23
|
-
x:
|
|
24
|
-
y:
|
|
24
|
+
x: xAxis.scale(xValue),
|
|
25
|
+
y: yAxis.scale(yValue)
|
|
25
26
|
};
|
|
26
|
-
};
|
|
27
|
-
export default tooltipItemPositionGetter;
|
|
27
|
+
});
|
|
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.mjs";
|
|
|
3
3
|
import type { ChartAnyPluginSignature } from "../../internals/plugins/models/index.mjs";
|
|
4
4
|
import type { ChartSeriesType } from "../../models/seriesType/config.mjs";
|
|
5
5
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.mjs";
|
|
6
|
-
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>):
|
|
6
|
+
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): React.JSX.Element;
|
|
7
7
|
export { ChartsProvider };
|
|
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.js";
|
|
|
3
3
|
import type { ChartAnyPluginSignature } from "../../internals/plugins/models/index.js";
|
|
4
4
|
import type { ChartSeriesType } from "../../models/seriesType/config.js";
|
|
5
5
|
import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
|
|
6
|
-
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>):
|
|
6
|
+
declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): React.JSX.Element;
|
|
7
7
|
export { ChartsProvider };
|
|
@@ -16,5 +16,5 @@ interface ChartsSlotsProviderProps {
|
|
|
16
16
|
slotProps?: Partial<ChartsSlotProps>;
|
|
17
17
|
defaultSlots: ChartsSlots;
|
|
18
18
|
}
|
|
19
|
-
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>):
|
|
19
|
+
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>): React.JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -16,5 +16,5 @@ interface ChartsSlotsProviderProps {
|
|
|
16
16
|
slotProps?: Partial<ChartsSlotProps>;
|
|
17
17
|
defaultSlots: ChartsSlots;
|
|
18
18
|
}
|
|
19
|
-
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>):
|
|
19
|
+
export declare function ChartsSlotsProvider(props: React.PropsWithChildren<ChartsSlotsProviderProps>): React.JSX.Element;
|
|
20
20
|
export {};
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* This component provides an accessibility proxy for charts.
|
|
3
4
|
* It uses two divs to let screen readers announce the focused content when it changes.
|
|
4
5
|
*/
|
|
5
|
-
export declare function ChartsAccessibilityProxy():
|
|
6
|
+
export declare function ChartsAccessibilityProxy(): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* This component provides an accessibility proxy for charts.
|
|
3
4
|
* It uses two divs to let screen readers announce the focused content when it changes.
|
|
4
5
|
*/
|
|
5
|
-
export declare function ChartsAccessibilityProxy():
|
|
6
|
+
export declare function ChartsAccessibilityProxy(): React.JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function ChartsAxesGradients(): React.JSX.Element | null;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function ChartsAxesGradients(): React.JSX.Element | null;
|
|
@@ -14,5 +14,5 @@ type ChartsContinuousGradientProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
gradientUnits?: 'objectBoundingBox' | 'userSpaceOnUse';
|
|
16
16
|
};
|
|
17
|
-
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps): import("react
|
|
17
|
+
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps): import("react").JSX.Element | null;
|
|
18
18
|
export {};
|
|
@@ -14,5 +14,5 @@ type ChartsContinuousGradientProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
gradientUnits?: 'objectBoundingBox' | 'userSpaceOnUse';
|
|
16
16
|
};
|
|
17
|
-
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps): import("react
|
|
17
|
+
export default function ChartsContinuousGradient(props: ChartsContinuousGradientProps): import("react").JSX.Element | null;
|
|
18
18
|
export {};
|
|
@@ -8,5 +8,5 @@ type ChartsContinuousGradientObjectBoundProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* Generates gradients to be used in tooltips and legends.
|
|
10
10
|
*/
|
|
11
|
-
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps): import("react
|
|
11
|
+
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps): import("react").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -8,5 +8,5 @@ type ChartsContinuousGradientObjectBoundProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* Generates gradients to be used in tooltips and legends.
|
|
10
10
|
*/
|
|
11
|
-
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps): import("react
|
|
11
|
+
export default function ChartsContinuousGradientObjectBound(props: ChartsContinuousGradientObjectBoundProps): import("react").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PiecewiseColorConfig } from "../../../models/colorMapping.mjs";
|
|
2
3
|
type ChartsPiecewiseGradientProps = {
|
|
3
4
|
isReversed?: boolean;
|
|
@@ -7,5 +8,5 @@ type ChartsPiecewiseGradientProps = {
|
|
|
7
8
|
scale: (value: any) => number | undefined;
|
|
8
9
|
colorMap: PiecewiseColorConfig;
|
|
9
10
|
};
|
|
10
|
-
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps):
|
|
11
|
+
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps): React.JSX.Element | null;
|
|
11
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PiecewiseColorConfig } from "../../../models/colorMapping.js";
|
|
2
3
|
type ChartsPiecewiseGradientProps = {
|
|
3
4
|
isReversed?: boolean;
|
|
@@ -7,5 +8,5 @@ type ChartsPiecewiseGradientProps = {
|
|
|
7
8
|
scale: (value: any) => number | undefined;
|
|
8
9
|
colorMap: PiecewiseColorConfig;
|
|
9
10
|
};
|
|
10
|
-
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps):
|
|
11
|
+
export default function ChartsPiecewiseGradient(props: ChartsPiecewiseGradientProps): React.JSX.Element | null;
|
|
11
12
|
export {};
|
|
@@ -11,4 +11,17 @@ export declare function createGetBarDimensions(params: {
|
|
|
11
11
|
y: number;
|
|
12
12
|
height: number;
|
|
13
13
|
width: number;
|
|
14
|
-
} | null;
|
|
14
|
+
} | null;
|
|
15
|
+
/** Like {@link createGetBarDimensions}, but for a sampled bucket spanning several categories. */
|
|
16
|
+
export declare function createGetBucketBarDimensions(params: {
|
|
17
|
+
verticalLayout: boolean;
|
|
18
|
+
xAxisConfig: ComputedAxis<ScaleName, any, ChartsXAxisProps>;
|
|
19
|
+
yAxisConfig: ComputedAxis<ScaleName, any, ChartsYAxisProps>;
|
|
20
|
+
series: ChartSeriesDefaultized<'bar'>;
|
|
21
|
+
numberOfGroups: number;
|
|
22
|
+
}): (startIndex: number, endIndex: number, min: number, max: number, groupIndex: number) => {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
@@ -11,4 +11,17 @@ export declare function createGetBarDimensions(params: {
|
|
|
11
11
|
y: number;
|
|
12
12
|
height: number;
|
|
13
13
|
width: number;
|
|
14
|
-
} | null;
|
|
14
|
+
} | null;
|
|
15
|
+
/** Like {@link createGetBarDimensions}, but for a sampled bucket spanning several categories. */
|
|
16
|
+
export declare function createGetBucketBarDimensions(params: {
|
|
17
|
+
verticalLayout: boolean;
|
|
18
|
+
xAxisConfig: ComputedAxis<ScaleName, any, ChartsXAxisProps>;
|
|
19
|
+
yAxisConfig: ComputedAxis<ScaleName, any, ChartsYAxisProps>;
|
|
20
|
+
series: ChartSeriesDefaultized<'bar'>;
|
|
21
|
+
numberOfGroups: number;
|
|
22
|
+
}): (startIndex: number, endIndex: number, min: number, max: number, groupIndex: number) => {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
height: number;
|
|
26
|
+
width: number;
|
|
27
|
+
};
|
|
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createGetBarDimensions = createGetBarDimensions;
|
|
7
|
+
exports.createGetBucketBarDimensions = createGetBucketBarDimensions;
|
|
7
8
|
var _findMinMax = require("./findMinMax");
|
|
8
9
|
var _getBandSize = require("./getBandSize");
|
|
10
|
+
/** Minimum on-screen gap (px) kept between merged (sampled) bars so they stay distinguishable. */
|
|
11
|
+
const MIN_SAMPLED_BAR_GAP_PX = 2;
|
|
9
12
|
function shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {
|
|
10
13
|
const isVerticalAndPositive = verticalLayout && baseValue > 0;
|
|
11
14
|
const isHorizontalAndNegative = !verticalLayout && baseValue < 0;
|
|
@@ -58,4 +61,46 @@ function createGetBarDimensions(params) {
|
|
|
58
61
|
width: verticalLayout ? barWidth : barSize
|
|
59
62
|
};
|
|
60
63
|
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Like {@link createGetBarDimensions}, but for a sampled bucket spanning several categories. */
|
|
67
|
+
function createGetBucketBarDimensions(params) {
|
|
68
|
+
const {
|
|
69
|
+
verticalLayout,
|
|
70
|
+
xAxisConfig,
|
|
71
|
+
yAxisConfig,
|
|
72
|
+
series,
|
|
73
|
+
numberOfGroups
|
|
74
|
+
} = params;
|
|
75
|
+
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
76
|
+
const baseScale = baseScaleConfig.scale;
|
|
77
|
+
const bandwidth = baseScale.bandwidth();
|
|
78
|
+
const step = baseScale.step();
|
|
79
|
+
const valueScale = verticalLayout ? yAxisConfig.scale : xAxisConfig.scale;
|
|
80
|
+
return function getBucketBarDimensions(startIndex, endIndex, min, max, groupIndex) {
|
|
81
|
+
const spanStart = baseScale(baseScaleConfig.data[startIndex]);
|
|
82
|
+
const bucketCount = endIndex - startIndex + 1;
|
|
83
|
+
const bucketStride = bucketCount * step;
|
|
84
|
+
|
|
85
|
+
// Keep the gap between buckets proportional to the bucket (same ratio as an unsampled chart),
|
|
86
|
+
// but never thinner than MIN_SAMPLED_BAR_GAP_PX so it stays visible at every level and zoom.
|
|
87
|
+
const gap = Math.min(bucketStride / 2, Math.max(bucketCount * (step - bandwidth), MIN_SAMPLED_BAR_GAP_PX));
|
|
88
|
+
const {
|
|
89
|
+
barWidth,
|
|
90
|
+
offset
|
|
91
|
+
} = (0, _getBandSize.getBandSize)(bucketStride - gap, numberOfGroups, baseScaleConfig.barGapRatio);
|
|
92
|
+
const barOffset = groupIndex * (barWidth + offset);
|
|
93
|
+
const valueCoordinates = [valueScale(min), valueScale(max)];
|
|
94
|
+
const [minValueCoord, maxValueCoord] = (0, _findMinMax.findMinMax)(valueCoordinates).map(v => Math.round(v));
|
|
95
|
+
let barSize = maxValueCoord - minValueCoord;
|
|
96
|
+
if (!series.hidden && barSize > 0) {
|
|
97
|
+
barSize = Math.max(series.minBarSize, barSize);
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
x: verticalLayout ? spanStart + barOffset : minValueCoord,
|
|
101
|
+
y: verticalLayout ? minValueCoord : spanStart + barOffset,
|
|
102
|
+
height: verticalLayout ? barSize : barWidth,
|
|
103
|
+
width: verticalLayout ? barWidth : barSize
|
|
104
|
+
};
|
|
105
|
+
};
|
|
61
106
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { findMinMax } from "./findMinMax.mjs";
|
|
2
2
|
import { getBandSize } from "./getBandSize.mjs";
|
|
3
|
+
|
|
4
|
+
/** Minimum on-screen gap (px) kept between merged (sampled) bars so they stay distinguishable. */
|
|
5
|
+
const MIN_SAMPLED_BAR_GAP_PX = 2;
|
|
3
6
|
function shouldInvertStartCoordinate(verticalLayout, baseValue, reverse) {
|
|
4
7
|
const isVerticalAndPositive = verticalLayout && baseValue > 0;
|
|
5
8
|
const isHorizontalAndNegative = !verticalLayout && baseValue < 0;
|
|
@@ -52,4 +55,46 @@ export function createGetBarDimensions(params) {
|
|
|
52
55
|
width: verticalLayout ? barWidth : barSize
|
|
53
56
|
};
|
|
54
57
|
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Like {@link createGetBarDimensions}, but for a sampled bucket spanning several categories. */
|
|
61
|
+
export function createGetBucketBarDimensions(params) {
|
|
62
|
+
const {
|
|
63
|
+
verticalLayout,
|
|
64
|
+
xAxisConfig,
|
|
65
|
+
yAxisConfig,
|
|
66
|
+
series,
|
|
67
|
+
numberOfGroups
|
|
68
|
+
} = params;
|
|
69
|
+
const baseScaleConfig = verticalLayout ? xAxisConfig : yAxisConfig;
|
|
70
|
+
const baseScale = baseScaleConfig.scale;
|
|
71
|
+
const bandwidth = baseScale.bandwidth();
|
|
72
|
+
const step = baseScale.step();
|
|
73
|
+
const valueScale = verticalLayout ? yAxisConfig.scale : xAxisConfig.scale;
|
|
74
|
+
return function getBucketBarDimensions(startIndex, endIndex, min, max, groupIndex) {
|
|
75
|
+
const spanStart = baseScale(baseScaleConfig.data[startIndex]);
|
|
76
|
+
const bucketCount = endIndex - startIndex + 1;
|
|
77
|
+
const bucketStride = bucketCount * step;
|
|
78
|
+
|
|
79
|
+
// Keep the gap between buckets proportional to the bucket (same ratio as an unsampled chart),
|
|
80
|
+
// but never thinner than MIN_SAMPLED_BAR_GAP_PX so it stays visible at every level and zoom.
|
|
81
|
+
const gap = Math.min(bucketStride / 2, Math.max(bucketCount * (step - bandwidth), MIN_SAMPLED_BAR_GAP_PX));
|
|
82
|
+
const {
|
|
83
|
+
barWidth,
|
|
84
|
+
offset
|
|
85
|
+
} = getBandSize(bucketStride - gap, numberOfGroups, baseScaleConfig.barGapRatio);
|
|
86
|
+
const barOffset = groupIndex * (barWidth + offset);
|
|
87
|
+
const valueCoordinates = [valueScale(min), valueScale(max)];
|
|
88
|
+
const [minValueCoord, maxValueCoord] = findMinMax(valueCoordinates).map(v => Math.round(v));
|
|
89
|
+
let barSize = maxValueCoord - minValueCoord;
|
|
90
|
+
if (!series.hidden && barSize > 0) {
|
|
91
|
+
barSize = Math.max(series.minBarSize, barSize);
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
x: verticalLayout ? spanStart + barOffset : minValueCoord,
|
|
95
|
+
y: verticalLayout ? minValueCoord : spanStart + barOffset,
|
|
96
|
+
height: verticalLayout ? barSize : barWidth,
|
|
97
|
+
width: verticalLayout ? barWidth : barSize
|
|
98
|
+
};
|
|
99
|
+
};
|
|
55
100
|
}
|
package/internals/geometry.js
CHANGED
|
@@ -18,7 +18,7 @@ const ANGLE_APPROX = 5; // Angle (in deg) for which we approximate the rectangle
|
|
|
18
18
|
*/
|
|
19
19
|
function getMinXTranslation(width, height, angle = 0) {
|
|
20
20
|
if (process.env.NODE_ENV !== 'production') {
|
|
21
|
-
if (angle > 90
|
|
21
|
+
if (angle > 90 || angle < -90) {
|
|
22
22
|
(0, _warning.warnOnce)([`MUI X Charts: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, `This could cause some text overlapping.`, `If you encounter a use case where it's needed, please open an issue.`]);
|
|
23
23
|
}
|
|
24
24
|
}
|
package/internals/geometry.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const ANGLE_APPROX = 5; // Angle (in deg) for which we approximate the rectangle
|
|
|
12
12
|
*/
|
|
13
13
|
export function getMinXTranslation(width, height, angle = 0) {
|
|
14
14
|
if (process.env.NODE_ENV !== 'production') {
|
|
15
|
-
if (angle > 90
|
|
15
|
+
if (angle > 90 || angle < -90) {
|
|
16
16
|
warnOnce([`MUI X Charts: It seems you applied an angle larger than 90° or smaller than -90° to an axis text.`, `This could cause some text overlapping.`, `If you encounter a use case where it's needed, please open an issue.`]);
|
|
17
17
|
}
|
|
18
18
|
}
|
package/internals/index.d.mts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "../ChartsContainer/useChartsContainerProps.mjs";
|
|
|
20
20
|
export * from "../ChartsDataProvider/useChartsDataProviderProps.mjs";
|
|
21
21
|
export * from "../ChartsRadialDataProvider/useChartsRadialDataProviderProps.mjs";
|
|
22
22
|
export * from "./seriesSelectorOfType.mjs";
|
|
23
|
+
export * from "./createGetBarDimensions.mjs";
|
|
23
24
|
export { useSkipAnimation } from "../hooks/useSkipAnimation.mjs";
|
|
24
25
|
export { useRegisterPointerInteractions } from "./plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs";
|
|
25
26
|
export * from "./plugins/corePlugins/useChartId/index.mjs";
|
|
@@ -37,8 +38,6 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.mjs";
|
|
|
37
38
|
export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.mjs";
|
|
38
39
|
export * from "./plugins/featurePlugins/useChartClosestPoint/index.mjs";
|
|
39
40
|
export * from "./plugins/featurePlugins/useChartBrush/index.mjs";
|
|
40
|
-
export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.mjs";
|
|
41
|
-
export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.mjs";
|
|
42
41
|
export * from "./plugins/featurePlugins/useChartItemClick/index.mjs";
|
|
43
42
|
export * from "./plugins/featurePlugins/useProgressiveRendering/index.mjs";
|
|
44
43
|
export * from "./plugins/utils/selectors.mjs";
|
package/internals/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from "../ChartsContainer/useChartsContainerProps.js";
|
|
|
20
20
|
export * from "../ChartsDataProvider/useChartsDataProviderProps.js";
|
|
21
21
|
export * from "../ChartsRadialDataProvider/useChartsRadialDataProviderProps.js";
|
|
22
22
|
export * from "./seriesSelectorOfType.js";
|
|
23
|
+
export * from "./createGetBarDimensions.js";
|
|
23
24
|
export { useSkipAnimation } from "../hooks/useSkipAnimation.js";
|
|
24
25
|
export { useRegisterPointerInteractions } from "./plugins/featurePlugins/shared/useRegisterPointerInteractions.js";
|
|
25
26
|
export * from "./plugins/corePlugins/useChartId/index.js";
|
|
@@ -37,8 +38,6 @@ export * from "./plugins/featurePlugins/useChartVisibilityManager/index.js";
|
|
|
37
38
|
export * from "./plugins/featurePlugins/useChartKeyboardNavigation/index.js";
|
|
38
39
|
export * from "./plugins/featurePlugins/useChartClosestPoint/index.js";
|
|
39
40
|
export * from "./plugins/featurePlugins/useChartBrush/index.js";
|
|
40
|
-
export * as useGeoProjectionSelectors from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors.js";
|
|
41
|
-
export * as useGeoProjectionTypes from "./plugins/featurePlugins/useGeoProjection/useGeoProjection.types.js";
|
|
42
41
|
export * from "./plugins/featurePlugins/useChartItemClick/index.js";
|
|
43
42
|
export * from "./plugins/featurePlugins/useProgressiveRendering/index.js";
|
|
44
43
|
export * from "./plugins/utils/selectors.js";
|
package/internals/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -20,8 +19,6 @@ var _exportNames = {
|
|
|
20
19
|
useRadarChartProps: true,
|
|
21
20
|
useSkipAnimation: true,
|
|
22
21
|
useRegisterPointerInteractions: true,
|
|
23
|
-
useGeoProjectionSelectors: true,
|
|
24
|
-
useGeoProjectionTypes: true,
|
|
25
22
|
getCartesianAxisTriggerTooltip: true,
|
|
26
23
|
getCartesianAxisIndex: true,
|
|
27
24
|
getRotationAxisIndex: true,
|
|
@@ -165,7 +162,6 @@ Object.defineProperty(exports, "useDrawingArea", {
|
|
|
165
162
|
return _useDrawingArea.useDrawingArea;
|
|
166
163
|
}
|
|
167
164
|
});
|
|
168
|
-
exports.useGeoProjectionTypes = exports.useGeoProjectionSelectors = void 0;
|
|
169
165
|
Object.defineProperty(exports, "useInteractionItemProps", {
|
|
170
166
|
enumerable: true,
|
|
171
167
|
get: function () {
|
|
@@ -351,6 +347,18 @@ Object.keys(_seriesSelectorOfType).forEach(function (key) {
|
|
|
351
347
|
}
|
|
352
348
|
});
|
|
353
349
|
});
|
|
350
|
+
var _createGetBarDimensions = require("./createGetBarDimensions");
|
|
351
|
+
Object.keys(_createGetBarDimensions).forEach(function (key) {
|
|
352
|
+
if (key === "default" || key === "__esModule") return;
|
|
353
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
354
|
+
if (key in exports && exports[key] === _createGetBarDimensions[key]) return;
|
|
355
|
+
Object.defineProperty(exports, key, {
|
|
356
|
+
enumerable: true,
|
|
357
|
+
get: function () {
|
|
358
|
+
return _createGetBarDimensions[key];
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
});
|
|
354
362
|
var _useSkipAnimation = require("../hooks/useSkipAnimation");
|
|
355
363
|
var _useRegisterPointerInteractions = require("./plugins/featurePlugins/shared/useRegisterPointerInteractions");
|
|
356
364
|
var _useChartId = require("./plugins/corePlugins/useChartId");
|
|
@@ -533,10 +541,6 @@ Object.keys(_useChartBrush).forEach(function (key) {
|
|
|
533
541
|
}
|
|
534
542
|
});
|
|
535
543
|
});
|
|
536
|
-
var _useGeoProjectionSelectors = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.selectors"));
|
|
537
|
-
exports.useGeoProjectionSelectors = _useGeoProjectionSelectors;
|
|
538
|
-
var _useGeoProjectionTypes = _interopRequireWildcard(require("./plugins/featurePlugins/useGeoProjection/useGeoProjection.types"));
|
|
539
|
-
exports.useGeoProjectionTypes = _useGeoProjectionTypes;
|
|
540
544
|
var _useChartItemClick = require("./plugins/featurePlugins/useChartItemClick");
|
|
541
545
|
Object.keys(_useChartItemClick).forEach(function (key) {
|
|
542
546
|
if (key === "default" || key === "__esModule") return;
|