@mui/x-charts 9.0.0-alpha.4 → 9.0.0-beta.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/BarChart.js +19 -28
- package/BarChart/BarChart.mjs +19 -28
- package/BarChart/BarElement.js +3 -5
- package/BarChart/BarElement.mjs +3 -5
- package/BarChart/BarLabel/BarLabelPlot.d.mts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.d.ts +0 -2
- package/BarChart/BarLabel/BarLabelPlot.js +2 -3
- package/BarChart/BarLabel/BarLabelPlot.mjs +2 -3
- package/BarChart/BarPlot.d.mts +2 -12
- package/BarChart/BarPlot.d.ts +2 -12
- package/BarChart/BarPlot.js +4 -18
- package/BarChart/BarPlot.mjs +4 -18
- package/BarChart/BatchBarPlot/BatchBarPlot.js +0 -27
- package/BarChart/BatchBarPlot/BatchBarPlot.mjs +0 -27
- package/BarChart/IndividualBarPlot.d.mts +1 -2
- package/BarChart/IndividualBarPlot.d.ts +1 -2
- package/BarChart/IndividualBarPlot.js +5 -10
- package/BarChart/IndividualBarPlot.mjs +5 -10
- package/BarChart/seriesConfig/bar/descriptionGetter.d.mts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.d.ts +3 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.js +36 -0
- package/BarChart/seriesConfig/bar/descriptionGetter.mjs +30 -0
- package/BarChart/seriesConfig/index.js +5 -1
- package/BarChart/seriesConfig/index.mjs +5 -1
- package/BarChart/useBarChartProps.js +2 -4
- package/BarChart/useBarChartProps.mjs +2 -4
- package/CHANGELOG.md +107 -1
- package/ChartsContainer/ChartsContainer.js +29 -29
- package/ChartsContainer/ChartsContainer.mjs +29 -29
- package/ChartsLayerContainer/ChartsLayerContainer.js +6 -2
- package/ChartsLayerContainer/ChartsLayerContainer.mjs +7 -2
- package/ChartsSvgLayer/ChartsSvgLayer.js +2 -2
- package/ChartsSvgLayer/ChartsSvgLayer.mjs +2 -2
- package/ChartsXAxis/ChartsGroupedXAxisTicks.js +12 -3
- package/ChartsXAxis/ChartsGroupedXAxisTicks.mjs +12 -3
- package/ChartsXAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsXAxis/useAxisTicksProps.d.ts +89 -89
- package/ChartsYAxis/ChartsGroupedYAxisTicks.js +12 -3
- package/ChartsYAxis/ChartsGroupedYAxisTicks.mjs +12 -3
- package/ChartsYAxis/useAxisTicksProps.d.mts +89 -89
- package/ChartsYAxis/useAxisTicksProps.d.ts +89 -89
- package/Gauge/Gauge.js +0 -4
- package/Gauge/Gauge.mjs +0 -4
- package/Gauge/GaugeContainer.d.mts +1 -1
- package/Gauge/GaugeContainer.d.ts +1 -1
- package/Gauge/GaugeContainer.js +0 -4
- package/Gauge/GaugeContainer.mjs +0 -4
- package/LineChart/AreaElement.js +5 -1
- package/LineChart/AreaElement.mjs +5 -1
- package/LineChart/CircleMarkElement.js +8 -5
- package/LineChart/CircleMarkElement.mjs +8 -5
- package/LineChart/LineChart.js +21 -19
- package/LineChart/LineChart.mjs +21 -19
- package/LineChart/LineElement.js +5 -1
- package/LineChart/LineElement.mjs +5 -1
- package/LineChart/MarkElement.js +7 -4
- package/LineChart/MarkElement.mjs +7 -4
- package/LineChart/seriesConfig/curveEvaluation.d.mts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.d.ts +11 -0
- package/LineChart/seriesConfig/curveEvaluation.js +134 -0
- package/LineChart/seriesConfig/curveEvaluation.mjs +129 -0
- package/LineChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/LineChart/seriesConfig/descriptionGetter.js +37 -0
- package/LineChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.mts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.d.ts +7 -0
- package/LineChart/seriesConfig/getItemAtPosition.js +356 -0
- package/LineChart/seriesConfig/getItemAtPosition.mjs +351 -0
- package/LineChart/seriesConfig/index.js +4 -0
- package/LineChart/seriesConfig/index.mjs +4 -0
- package/PieChart/PieArc.js +2 -3
- package/PieChart/PieArc.mjs +2 -3
- package/PieChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/PieChart/seriesConfig/descriptionGetter.js +26 -0
- package/PieChart/seriesConfig/descriptionGetter.mjs +20 -0
- package/PieChart/seriesConfig/index.js +2 -0
- package/PieChart/seriesConfig/index.mjs +2 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/RadarChart/seriesConfig/descriptionGetter.js +37 -0
- package/RadarChart/seriesConfig/descriptionGetter.mjs +31 -0
- package/RadarChart/seriesConfig/index.js +2 -0
- package/RadarChart/seriesConfig/index.mjs +2 -0
- package/ScatterChart/ScatterChart.js +18 -18
- package/ScatterChart/ScatterChart.mjs +18 -18
- package/ScatterChart/seriesConfig/descriptionGetter.d.mts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.d.ts +3 -0
- package/ScatterChart/seriesConfig/descriptionGetter.js +34 -0
- package/ScatterChart/seriesConfig/descriptionGetter.mjs +28 -0
- package/ScatterChart/seriesConfig/index.js +2 -0
- package/ScatterChart/seriesConfig/index.mjs +2 -0
- package/SparkLineChart/SparkLineChart.js +21 -19
- package/SparkLineChart/SparkLineChart.mjs +21 -19
- package/constants/index.js +0 -2
- package/constants/index.mjs +0 -2
- package/hooks/useInteractionItemProps.d.mts +1 -1
- package/hooks/useInteractionItemProps.d.ts +1 -1
- package/hooks/useInteractionItemProps.js +3 -3
- package/hooks/useInteractionItemProps.mjs +3 -3
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +100 -0
- package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +96 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.mts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.d.ts +1 -0
- package/internals/components/ChartsAccessibilityProxy/index.js +16 -0
- package/internals/components/ChartsAccessibilityProxy/index.mjs +1 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.mts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.d.ts +5 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.js +71 -0
- package/internals/components/ChartsAccessibilityProxy/useDescription.mjs +66 -0
- package/internals/getChartPoint.js +18 -1
- package/internals/getChartPoint.mjs +18 -1
- package/internals/plugins/corePlugins/corePlugins.d.mts +2 -2
- package/internals/plugins/corePlugins/corePlugins.d.ts +2 -2
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +22 -7
- package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +22 -7
- package/internals/plugins/corePlugins/useChartSeries/index.d.mts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.d.ts +2 -1
- package/internals/plugins/corePlugins/useChartSeries/index.js +12 -0
- package/internals/plugins/corePlugins/useChartSeries/index.mjs +2 -1
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -8
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.mjs +1 -11
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.mts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.d.ts +8 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.js +19 -0
- package/internals/plugins/corePlugins/useChartSeries/useChartSeriesLayout.selectors.mjs +14 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.mts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.d.ts +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.js +5 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/descriptionGetter.types.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +2 -0
- package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +2 -0
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.mts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +4 -10
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +28 -19
- package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.mjs +28 -18
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.mts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.d.ts +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.js +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/autoSizeConstants.mjs +5 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.mts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.d.ts +33 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.js +318 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisAutoSize.mjs +311 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +63 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.mjs +62 -8
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.js +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/defaultizeAxis.mjs +12 -4
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.mts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.d.ts +12 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.js +28 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/domain.mjs +27 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.mts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +22 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/index.mjs +3 -1
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.mts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.d.ts +30 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.js +96 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisAutoSize.selectors.mjs +91 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.mts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.d.ts +16 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.js +36 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisDomains.selectors.mjs +31 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.mts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.d.ts +15 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.js +45 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisExtrema.selectors.mjs +39 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.mts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +11 -0
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +53 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.mjs +52 -11
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +4 -9
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +16 -40
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.mjs +19 -43
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.js +20 -2
- package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianTooltip.selectors.mjs +20 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +36 -30
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +8 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +9 -2
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +6 -0
- package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +6 -0
- package/internals/store/useCharts.d.mts +1 -1
- package/internals/store/useCharts.d.ts +1 -1
- package/locales/elGR.d.mts +76 -0
- package/locales/elGR.d.ts +76 -0
- package/locales/elGR.js +89 -0
- package/locales/elGR.mjs +89 -0
- package/locales/enUS.d.mts +76 -0
- package/locales/enUS.d.ts +76 -0
- package/locales/enUS.js +89 -1
- package/locales/enUS.mjs +89 -1
- package/locales/frFR.d.mts +76 -0
- package/locales/frFR.d.ts +76 -0
- package/locales/frFR.js +89 -0
- package/locales/frFR.mjs +89 -0
- package/locales/nbNO.d.mts +76 -0
- package/locales/nbNO.d.ts +76 -0
- package/locales/nbNO.js +89 -0
- package/locales/nbNO.mjs +89 -0
- package/locales/ptBR.d.mts +76 -0
- package/locales/ptBR.d.ts +76 -0
- package/locales/ptBR.js +89 -0
- package/locales/ptBR.mjs +89 -0
- package/locales/ptPT.d.mts +76 -0
- package/locales/ptPT.d.ts +76 -0
- package/locales/ptPT.js +89 -0
- package/locales/ptPT.mjs +89 -0
- package/locales/svSE.d.mts +76 -0
- package/locales/svSE.d.ts +76 -0
- package/locales/svSE.js +89 -0
- package/locales/svSE.mjs +89 -0
- package/locales/utils/chartsLocaleTextApi.d.mts +189 -0
- package/locales/utils/chartsLocaleTextApi.d.ts +189 -0
- package/locales/utils/getChartsLocalization.d.mts +76 -0
- package/locales/utils/getChartsLocalization.d.ts +76 -0
- package/models/axis.d.mts +11 -5
- package/models/axis.d.ts +11 -5
- package/models/seriesType/config.d.mts +29 -0
- package/models/seriesType/config.d.ts +29 -0
- package/package.json +85 -85
package/Gauge/Gauge.js
CHANGED
|
@@ -85,10 +85,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
85
85
|
* @default 360
|
|
86
86
|
*/
|
|
87
87
|
endAngle: _propTypes.default.number,
|
|
88
|
-
/**
|
|
89
|
-
* Options to enable features planned for the next major.
|
|
90
|
-
*/
|
|
91
|
-
experimentalFeatures: _propTypes.default.object,
|
|
92
88
|
/**
|
|
93
89
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
94
90
|
*/
|
package/Gauge/Gauge.mjs
CHANGED
|
@@ -78,10 +78,6 @@ process.env.NODE_ENV !== "production" ? Gauge.propTypes = {
|
|
|
78
78
|
* @default 360
|
|
79
79
|
*/
|
|
80
80
|
endAngle: PropTypes.number,
|
|
81
|
-
/**
|
|
82
|
-
* Options to enable features planned for the next major.
|
|
83
|
-
*/
|
|
84
|
-
experimentalFeatures: PropTypes.object,
|
|
85
81
|
/**
|
|
86
82
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
87
83
|
*/
|
|
@@ -3,7 +3,7 @@ import { type ChartsSurfaceProps } from "../ChartsSurface/index.mjs";
|
|
|
3
3
|
import { type GaugeProviderProps } from "./GaugeProvider.mjs";
|
|
4
4
|
import { type MergeSignaturesProperty } from "../internals/plugins/models/index.mjs";
|
|
5
5
|
import { type ChartCorePluginSignatures } from "../internals/plugins/corePlugins/index.mjs";
|
|
6
|
-
export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme' | 'seriesConfig'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
|
|
6
|
+
export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme' | 'seriesConfig' | 'experimentalFeatures'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
declare const GaugeContainer: React.ForwardRefExoticComponent<Omit<GaugeContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +3,7 @@ import { type ChartsSurfaceProps } from "../ChartsSurface/index.js";
|
|
|
3
3
|
import { type GaugeProviderProps } from "./GaugeProvider.js";
|
|
4
4
|
import { type MergeSignaturesProperty } from "../internals/plugins/models/index.js";
|
|
5
5
|
import { type ChartCorePluginSignatures } from "../internals/plugins/corePlugins/index.js";
|
|
6
|
-
export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme' | 'seriesConfig'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
|
|
6
|
+
export interface GaugeContainerProps extends Omit<ChartsSurfaceProps, 'children'>, Omit<MergeSignaturesProperty<ChartCorePluginSignatures, 'params'>, 'series' | 'dataset' | 'colors' | 'theme' | 'seriesConfig' | 'experimentalFeatures'>, Omit<GaugeProviderProps, 'children'>, Omit<React.SVGProps<SVGSVGElement>, 'width' | 'height'> {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
declare const GaugeContainer: React.ForwardRefExoticComponent<Omit<GaugeContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/Gauge/GaugeContainer.js
CHANGED
|
@@ -126,10 +126,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
126
126
|
* @default 360
|
|
127
127
|
*/
|
|
128
128
|
endAngle: _propTypes.default.number,
|
|
129
|
-
/**
|
|
130
|
-
* Options to enable features planned for the next major.
|
|
131
|
-
*/
|
|
132
|
-
experimentalFeatures: _propTypes.default.object,
|
|
133
129
|
/**
|
|
134
130
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
135
131
|
*/
|
package/Gauge/GaugeContainer.mjs
CHANGED
|
@@ -119,10 +119,6 @@ process.env.NODE_ENV !== "production" ? GaugeContainer.propTypes = {
|
|
|
119
119
|
* @default 360
|
|
120
120
|
*/
|
|
121
121
|
endAngle: PropTypes.number,
|
|
122
|
-
/**
|
|
123
|
-
* Options to enable features planned for the next major.
|
|
124
|
-
*/
|
|
125
|
-
experimentalFeatures: PropTypes.object,
|
|
126
122
|
/**
|
|
127
123
|
* The height of the chart in px. If not defined, it takes the height of the parent element.
|
|
128
124
|
*/
|
package/LineChart/AreaElement.js
CHANGED
|
@@ -14,6 +14,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
15
15
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
16
16
|
var _useItemHighlightState = require("../hooks/useItemHighlightState");
|
|
17
|
+
var _useChartExperimentalFeature = require("../internals/plugins/corePlugins/useChartExperimentalFeature");
|
|
18
|
+
var _useStore = require("../internals/store/useStore");
|
|
17
19
|
var _AnimatedArea = require("./AnimatedArea");
|
|
18
20
|
var _lineClasses = require("./lineClasses");
|
|
19
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -39,6 +41,8 @@ function AreaElement(props) {
|
|
|
39
41
|
onClick
|
|
40
42
|
} = props,
|
|
41
43
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
44
|
+
const store = (0, _useStore.useStore)();
|
|
45
|
+
const enablePositionBasedPointerInteraction = store.use(_useChartExperimentalFeature.selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
42
46
|
const identifier = React.useMemo(() => ({
|
|
43
47
|
type: 'line',
|
|
44
48
|
seriesId
|
|
@@ -60,7 +64,7 @@ function AreaElement(props) {
|
|
|
60
64
|
const areaProps = (0, _useSlotProps.default)({
|
|
61
65
|
elementType: Area,
|
|
62
66
|
externalSlotProps: slotProps?.area,
|
|
63
|
-
additionalProps: (0, _extends2.default)({}, interactionProps, {
|
|
67
|
+
additionalProps: (0, _extends2.default)({}, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
64
68
|
onClick,
|
|
65
69
|
cursor: onClick ? 'pointer' : 'unset',
|
|
66
70
|
'data-highlighted': isHighlighted || undefined,
|
|
@@ -8,6 +8,8 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import useSlotProps from '@mui/utils/useSlotProps';
|
|
9
9
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
10
10
|
import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
|
|
11
|
+
import { selectorChartExperimentalFeaturesState } from "../internals/plugins/corePlugins/useChartExperimentalFeature/index.mjs";
|
|
12
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
11
13
|
import { AnimatedArea } from "./AnimatedArea.mjs";
|
|
12
14
|
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -32,6 +34,8 @@ function AreaElement(props) {
|
|
|
32
34
|
onClick
|
|
33
35
|
} = props,
|
|
34
36
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
37
|
+
const store = useStore();
|
|
38
|
+
const enablePositionBasedPointerInteraction = store.use(selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
35
39
|
const identifier = React.useMemo(() => ({
|
|
36
40
|
type: 'line',
|
|
37
41
|
seriesId
|
|
@@ -53,7 +57,7 @@ function AreaElement(props) {
|
|
|
53
57
|
const areaProps = useSlotProps({
|
|
54
58
|
elementType: Area,
|
|
55
59
|
externalSlotProps: slotProps?.area,
|
|
56
|
-
additionalProps: _extends({}, interactionProps, {
|
|
60
|
+
additionalProps: _extends({}, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
57
61
|
onClick,
|
|
58
62
|
cursor: onClick ? 'pointer' : 'unset',
|
|
59
63
|
'data-highlighted': isHighlighted || undefined,
|
|
@@ -12,8 +12,10 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
|
-
var _animation = require("../internals/animation/animation");
|
|
16
15
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
16
|
+
var _useChartExperimentalFeature = require("../internals/plugins/corePlugins/useChartExperimentalFeature");
|
|
17
|
+
var _useStore = require("../internals/store/useStore");
|
|
18
|
+
var _animation = require("../internals/animation/animation");
|
|
17
19
|
var _lineClasses = require("./lineClasses");
|
|
18
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
21
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "shape", "hidden"];
|
|
@@ -58,17 +60,19 @@ function CircleMarkElement(props) {
|
|
|
58
60
|
hidden
|
|
59
61
|
} = props,
|
|
60
62
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
61
|
-
const
|
|
63
|
+
const store = (0, _useStore.useStore)();
|
|
64
|
+
const enablePositionBasedPointerInteraction = store.use(_useChartExperimentalFeature.selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
62
65
|
const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)({
|
|
63
66
|
type: 'line',
|
|
64
67
|
seriesId,
|
|
65
68
|
dataIndex
|
|
66
69
|
});
|
|
70
|
+
const theme = (0, _styles.useTheme)();
|
|
67
71
|
const classes = (0, _lineClasses.useUtilityClasses)({
|
|
68
72
|
skipAnimation,
|
|
69
73
|
classes: innerClasses
|
|
70
74
|
});
|
|
71
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, (0, _extends2.default)({}, other, {
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Circle, (0, _extends2.default)({}, other, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
72
76
|
cx: x,
|
|
73
77
|
cy: y,
|
|
74
78
|
r: 5,
|
|
@@ -78,8 +82,7 @@ function CircleMarkElement(props) {
|
|
|
78
82
|
className: classes.mark,
|
|
79
83
|
onClick: onClick,
|
|
80
84
|
cursor: onClick ? 'pointer' : 'unset',
|
|
81
|
-
pointerEvents: hidden ? 'none' : undefined
|
|
82
|
-
}, interactionProps, {
|
|
85
|
+
pointerEvents: hidden ? 'none' : undefined,
|
|
83
86
|
"data-highlighted": isHighlighted || undefined,
|
|
84
87
|
"data-faded": isFaded || undefined,
|
|
85
88
|
"data-series-id": seriesId,
|
|
@@ -6,8 +6,10 @@ const _excluded = ["x", "y", "seriesId", "classes", "color", "dataIndex", "onCli
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { styled, useTheme } from '@mui/material/styles';
|
|
9
|
-
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
10
9
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
10
|
+
import { selectorChartExperimentalFeaturesState } from "../internals/plugins/corePlugins/useChartExperimentalFeature/index.mjs";
|
|
11
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
12
|
+
import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.mjs";
|
|
11
13
|
import { lineClasses, useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const Circle = styled('circle', {
|
|
@@ -51,17 +53,19 @@ function CircleMarkElement(props) {
|
|
|
51
53
|
hidden
|
|
52
54
|
} = props,
|
|
53
55
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
54
|
-
const
|
|
56
|
+
const store = useStore();
|
|
57
|
+
const enablePositionBasedPointerInteraction = store.use(selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
55
58
|
const interactionProps = useInteractionItemProps({
|
|
56
59
|
type: 'line',
|
|
57
60
|
seriesId,
|
|
58
61
|
dataIndex
|
|
59
62
|
});
|
|
63
|
+
const theme = useTheme();
|
|
60
64
|
const classes = useLineUtilityClasses({
|
|
61
65
|
skipAnimation,
|
|
62
66
|
classes: innerClasses
|
|
63
67
|
});
|
|
64
|
-
return /*#__PURE__*/_jsx(Circle, _extends({}, other, {
|
|
68
|
+
return /*#__PURE__*/_jsx(Circle, _extends({}, other, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
65
69
|
cx: x,
|
|
66
70
|
cy: y,
|
|
67
71
|
r: 5,
|
|
@@ -71,8 +75,7 @@ function CircleMarkElement(props) {
|
|
|
71
75
|
className: classes.mark,
|
|
72
76
|
onClick: onClick,
|
|
73
77
|
cursor: onClick ? 'pointer' : 'unset',
|
|
74
|
-
pointerEvents: hidden ? 'none' : undefined
|
|
75
|
-
}, interactionProps, {
|
|
78
|
+
pointerEvents: hidden ? 'none' : undefined,
|
|
76
79
|
"data-highlighted": isHighlighted || undefined,
|
|
77
80
|
"data-faded": isFaded || undefined,
|
|
78
81
|
"data-series-id": seriesId,
|
package/LineChart/LineChart.js
CHANGED
|
@@ -144,7 +144,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
144
144
|
/**
|
|
145
145
|
* Options to enable features planned for the next major.
|
|
146
146
|
*/
|
|
147
|
-
experimentalFeatures: _propTypes.default.
|
|
147
|
+
experimentalFeatures: _propTypes.default.shape({
|
|
148
|
+
enablePositionBasedPointerInteraction: _propTypes.default.bool
|
|
149
|
+
}),
|
|
148
150
|
/**
|
|
149
151
|
* Option to display a cartesian grid in the background.
|
|
150
152
|
*/
|
|
@@ -409,7 +411,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
409
411
|
tickLabelStyle: _propTypes.default.object,
|
|
410
412
|
tickSize: _propTypes.default.number
|
|
411
413
|
})),
|
|
412
|
-
height: _propTypes.default.number,
|
|
414
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
413
415
|
hideTooltip: _propTypes.default.bool,
|
|
414
416
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
415
417
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -468,7 +470,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
468
470
|
tickLabelStyle: _propTypes.default.object,
|
|
469
471
|
tickSize: _propTypes.default.number
|
|
470
472
|
})),
|
|
471
|
-
height: _propTypes.default.number,
|
|
473
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
472
474
|
hideTooltip: _propTypes.default.bool,
|
|
473
475
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
474
476
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -517,7 +519,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
517
519
|
disableLine: _propTypes.default.bool,
|
|
518
520
|
disableTicks: _propTypes.default.bool,
|
|
519
521
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
520
|
-
height: _propTypes.default.number,
|
|
522
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
521
523
|
hideTooltip: _propTypes.default.bool,
|
|
522
524
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
523
525
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -564,7 +566,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
564
566
|
disableLine: _propTypes.default.bool,
|
|
565
567
|
disableTicks: _propTypes.default.bool,
|
|
566
568
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
567
|
-
height: _propTypes.default.number,
|
|
569
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
568
570
|
hideTooltip: _propTypes.default.bool,
|
|
569
571
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
570
572
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -610,7 +612,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
610
612
|
disableLine: _propTypes.default.bool,
|
|
611
613
|
disableTicks: _propTypes.default.bool,
|
|
612
614
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
613
|
-
height: _propTypes.default.number,
|
|
615
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
614
616
|
hideTooltip: _propTypes.default.bool,
|
|
615
617
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
616
618
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -656,7 +658,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
656
658
|
disableLine: _propTypes.default.bool,
|
|
657
659
|
disableTicks: _propTypes.default.bool,
|
|
658
660
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
659
|
-
height: _propTypes.default.number,
|
|
661
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
660
662
|
hideTooltip: _propTypes.default.bool,
|
|
661
663
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
662
664
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -702,7 +704,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
702
704
|
disableLine: _propTypes.default.bool,
|
|
703
705
|
disableTicks: _propTypes.default.bool,
|
|
704
706
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
705
|
-
height: _propTypes.default.number,
|
|
707
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
706
708
|
hideTooltip: _propTypes.default.bool,
|
|
707
709
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
708
710
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -752,7 +754,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
752
754
|
disableLine: _propTypes.default.bool,
|
|
753
755
|
disableTicks: _propTypes.default.bool,
|
|
754
756
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
755
|
-
height: _propTypes.default.number,
|
|
757
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
756
758
|
hideTooltip: _propTypes.default.bool,
|
|
757
759
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
758
760
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -802,7 +804,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
802
804
|
disableLine: _propTypes.default.bool,
|
|
803
805
|
disableTicks: _propTypes.default.bool,
|
|
804
806
|
domainLimit: _propTypes.default.oneOfType([_propTypes.default.oneOf(['nice', 'strict']), _propTypes.default.func]),
|
|
805
|
-
height: _propTypes.default.number,
|
|
807
|
+
height: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number]),
|
|
806
808
|
hideTooltip: _propTypes.default.bool,
|
|
807
809
|
id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
808
810
|
ignoreTooltip: _propTypes.default.bool,
|
|
@@ -894,7 +896,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
894
896
|
tickSize: _propTypes.default.number,
|
|
895
897
|
tickSpacing: _propTypes.default.number,
|
|
896
898
|
valueFormatter: _propTypes.default.func,
|
|
897
|
-
width: _propTypes.default.number
|
|
899
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
898
900
|
}), _propTypes.default.shape({
|
|
899
901
|
axis: _propTypes.default.oneOf(['y']),
|
|
900
902
|
classes: _propTypes.default.object,
|
|
@@ -952,7 +954,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
952
954
|
tickSize: _propTypes.default.number,
|
|
953
955
|
tickSpacing: _propTypes.default.number,
|
|
954
956
|
valueFormatter: _propTypes.default.func,
|
|
955
|
-
width: _propTypes.default.number
|
|
957
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
956
958
|
}), _propTypes.default.shape({
|
|
957
959
|
axis: _propTypes.default.oneOf(['y']),
|
|
958
960
|
classes: _propTypes.default.object,
|
|
@@ -997,7 +999,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
997
999
|
tickSize: _propTypes.default.number,
|
|
998
1000
|
tickSpacing: _propTypes.default.number,
|
|
999
1001
|
valueFormatter: _propTypes.default.func,
|
|
1000
|
-
width: _propTypes.default.number
|
|
1002
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1001
1003
|
}), _propTypes.default.shape({
|
|
1002
1004
|
axis: _propTypes.default.oneOf(['y']),
|
|
1003
1005
|
classes: _propTypes.default.object,
|
|
@@ -1043,7 +1045,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1043
1045
|
tickSize: _propTypes.default.number,
|
|
1044
1046
|
tickSpacing: _propTypes.default.number,
|
|
1045
1047
|
valueFormatter: _propTypes.default.func,
|
|
1046
|
-
width: _propTypes.default.number
|
|
1048
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1047
1049
|
}), _propTypes.default.shape({
|
|
1048
1050
|
axis: _propTypes.default.oneOf(['y']),
|
|
1049
1051
|
classes: _propTypes.default.object,
|
|
@@ -1088,7 +1090,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1088
1090
|
tickSize: _propTypes.default.number,
|
|
1089
1091
|
tickSpacing: _propTypes.default.number,
|
|
1090
1092
|
valueFormatter: _propTypes.default.func,
|
|
1091
|
-
width: _propTypes.default.number
|
|
1093
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1092
1094
|
}), _propTypes.default.shape({
|
|
1093
1095
|
axis: _propTypes.default.oneOf(['y']),
|
|
1094
1096
|
classes: _propTypes.default.object,
|
|
@@ -1133,7 +1135,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1133
1135
|
tickSize: _propTypes.default.number,
|
|
1134
1136
|
tickSpacing: _propTypes.default.number,
|
|
1135
1137
|
valueFormatter: _propTypes.default.func,
|
|
1136
|
-
width: _propTypes.default.number
|
|
1138
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1137
1139
|
}), _propTypes.default.shape({
|
|
1138
1140
|
axis: _propTypes.default.oneOf(['y']),
|
|
1139
1141
|
classes: _propTypes.default.object,
|
|
@@ -1182,7 +1184,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1182
1184
|
tickSize: _propTypes.default.number,
|
|
1183
1185
|
tickSpacing: _propTypes.default.number,
|
|
1184
1186
|
valueFormatter: _propTypes.default.func,
|
|
1185
|
-
width: _propTypes.default.number
|
|
1187
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1186
1188
|
}), _propTypes.default.shape({
|
|
1187
1189
|
axis: _propTypes.default.oneOf(['y']),
|
|
1188
1190
|
classes: _propTypes.default.object,
|
|
@@ -1231,7 +1233,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1231
1233
|
tickSize: _propTypes.default.number,
|
|
1232
1234
|
tickSpacing: _propTypes.default.number,
|
|
1233
1235
|
valueFormatter: _propTypes.default.func,
|
|
1234
|
-
width: _propTypes.default.number
|
|
1236
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1235
1237
|
}), _propTypes.default.shape({
|
|
1236
1238
|
axis: _propTypes.default.oneOf(['y']),
|
|
1237
1239
|
classes: _propTypes.default.object,
|
|
@@ -1276,6 +1278,6 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1276
1278
|
tickSize: _propTypes.default.number,
|
|
1277
1279
|
tickSpacing: _propTypes.default.number,
|
|
1278
1280
|
valueFormatter: _propTypes.default.func,
|
|
1279
|
-
width: _propTypes.default.number
|
|
1281
|
+
width: _propTypes.default.oneOfType([_propTypes.default.oneOf(['auto']), _propTypes.default.number])
|
|
1280
1282
|
})]).isRequired)
|
|
1281
1283
|
} : void 0;
|
package/LineChart/LineChart.mjs
CHANGED
|
@@ -137,7 +137,9 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
137
137
|
/**
|
|
138
138
|
* Options to enable features planned for the next major.
|
|
139
139
|
*/
|
|
140
|
-
experimentalFeatures: PropTypes.
|
|
140
|
+
experimentalFeatures: PropTypes.shape({
|
|
141
|
+
enablePositionBasedPointerInteraction: PropTypes.bool
|
|
142
|
+
}),
|
|
141
143
|
/**
|
|
142
144
|
* Option to display a cartesian grid in the background.
|
|
143
145
|
*/
|
|
@@ -402,7 +404,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
402
404
|
tickLabelStyle: PropTypes.object,
|
|
403
405
|
tickSize: PropTypes.number
|
|
404
406
|
})),
|
|
405
|
-
height: PropTypes.number,
|
|
407
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
406
408
|
hideTooltip: PropTypes.bool,
|
|
407
409
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
408
410
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -461,7 +463,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
461
463
|
tickLabelStyle: PropTypes.object,
|
|
462
464
|
tickSize: PropTypes.number
|
|
463
465
|
})),
|
|
464
|
-
height: PropTypes.number,
|
|
466
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
465
467
|
hideTooltip: PropTypes.bool,
|
|
466
468
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
467
469
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -510,7 +512,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
510
512
|
disableLine: PropTypes.bool,
|
|
511
513
|
disableTicks: PropTypes.bool,
|
|
512
514
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
513
|
-
height: PropTypes.number,
|
|
515
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
514
516
|
hideTooltip: PropTypes.bool,
|
|
515
517
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
516
518
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -557,7 +559,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
557
559
|
disableLine: PropTypes.bool,
|
|
558
560
|
disableTicks: PropTypes.bool,
|
|
559
561
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
560
|
-
height: PropTypes.number,
|
|
562
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
561
563
|
hideTooltip: PropTypes.bool,
|
|
562
564
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
563
565
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -603,7 +605,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
603
605
|
disableLine: PropTypes.bool,
|
|
604
606
|
disableTicks: PropTypes.bool,
|
|
605
607
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
606
|
-
height: PropTypes.number,
|
|
608
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
607
609
|
hideTooltip: PropTypes.bool,
|
|
608
610
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
609
611
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -649,7 +651,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
649
651
|
disableLine: PropTypes.bool,
|
|
650
652
|
disableTicks: PropTypes.bool,
|
|
651
653
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
652
|
-
height: PropTypes.number,
|
|
654
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
653
655
|
hideTooltip: PropTypes.bool,
|
|
654
656
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
655
657
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -695,7 +697,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
695
697
|
disableLine: PropTypes.bool,
|
|
696
698
|
disableTicks: PropTypes.bool,
|
|
697
699
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
698
|
-
height: PropTypes.number,
|
|
700
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
699
701
|
hideTooltip: PropTypes.bool,
|
|
700
702
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
701
703
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -745,7 +747,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
745
747
|
disableLine: PropTypes.bool,
|
|
746
748
|
disableTicks: PropTypes.bool,
|
|
747
749
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
748
|
-
height: PropTypes.number,
|
|
750
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
749
751
|
hideTooltip: PropTypes.bool,
|
|
750
752
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
751
753
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -795,7 +797,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
795
797
|
disableLine: PropTypes.bool,
|
|
796
798
|
disableTicks: PropTypes.bool,
|
|
797
799
|
domainLimit: PropTypes.oneOfType([PropTypes.oneOf(['nice', 'strict']), PropTypes.func]),
|
|
798
|
-
height: PropTypes.number,
|
|
800
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
799
801
|
hideTooltip: PropTypes.bool,
|
|
800
802
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
801
803
|
ignoreTooltip: PropTypes.bool,
|
|
@@ -887,7 +889,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
887
889
|
tickSize: PropTypes.number,
|
|
888
890
|
tickSpacing: PropTypes.number,
|
|
889
891
|
valueFormatter: PropTypes.func,
|
|
890
|
-
width: PropTypes.number
|
|
892
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
891
893
|
}), PropTypes.shape({
|
|
892
894
|
axis: PropTypes.oneOf(['y']),
|
|
893
895
|
classes: PropTypes.object,
|
|
@@ -945,7 +947,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
945
947
|
tickSize: PropTypes.number,
|
|
946
948
|
tickSpacing: PropTypes.number,
|
|
947
949
|
valueFormatter: PropTypes.func,
|
|
948
|
-
width: PropTypes.number
|
|
950
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
949
951
|
}), PropTypes.shape({
|
|
950
952
|
axis: PropTypes.oneOf(['y']),
|
|
951
953
|
classes: PropTypes.object,
|
|
@@ -990,7 +992,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
990
992
|
tickSize: PropTypes.number,
|
|
991
993
|
tickSpacing: PropTypes.number,
|
|
992
994
|
valueFormatter: PropTypes.func,
|
|
993
|
-
width: PropTypes.number
|
|
995
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
994
996
|
}), PropTypes.shape({
|
|
995
997
|
axis: PropTypes.oneOf(['y']),
|
|
996
998
|
classes: PropTypes.object,
|
|
@@ -1036,7 +1038,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1036
1038
|
tickSize: PropTypes.number,
|
|
1037
1039
|
tickSpacing: PropTypes.number,
|
|
1038
1040
|
valueFormatter: PropTypes.func,
|
|
1039
|
-
width: PropTypes.number
|
|
1041
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1040
1042
|
}), PropTypes.shape({
|
|
1041
1043
|
axis: PropTypes.oneOf(['y']),
|
|
1042
1044
|
classes: PropTypes.object,
|
|
@@ -1081,7 +1083,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1081
1083
|
tickSize: PropTypes.number,
|
|
1082
1084
|
tickSpacing: PropTypes.number,
|
|
1083
1085
|
valueFormatter: PropTypes.func,
|
|
1084
|
-
width: PropTypes.number
|
|
1086
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1085
1087
|
}), PropTypes.shape({
|
|
1086
1088
|
axis: PropTypes.oneOf(['y']),
|
|
1087
1089
|
classes: PropTypes.object,
|
|
@@ -1126,7 +1128,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1126
1128
|
tickSize: PropTypes.number,
|
|
1127
1129
|
tickSpacing: PropTypes.number,
|
|
1128
1130
|
valueFormatter: PropTypes.func,
|
|
1129
|
-
width: PropTypes.number
|
|
1131
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1130
1132
|
}), PropTypes.shape({
|
|
1131
1133
|
axis: PropTypes.oneOf(['y']),
|
|
1132
1134
|
classes: PropTypes.object,
|
|
@@ -1175,7 +1177,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1175
1177
|
tickSize: PropTypes.number,
|
|
1176
1178
|
tickSpacing: PropTypes.number,
|
|
1177
1179
|
valueFormatter: PropTypes.func,
|
|
1178
|
-
width: PropTypes.number
|
|
1180
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1179
1181
|
}), PropTypes.shape({
|
|
1180
1182
|
axis: PropTypes.oneOf(['y']),
|
|
1181
1183
|
classes: PropTypes.object,
|
|
@@ -1224,7 +1226,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1224
1226
|
tickSize: PropTypes.number,
|
|
1225
1227
|
tickSpacing: PropTypes.number,
|
|
1226
1228
|
valueFormatter: PropTypes.func,
|
|
1227
|
-
width: PropTypes.number
|
|
1229
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1228
1230
|
}), PropTypes.shape({
|
|
1229
1231
|
axis: PropTypes.oneOf(['y']),
|
|
1230
1232
|
classes: PropTypes.object,
|
|
@@ -1269,7 +1271,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
1269
1271
|
tickSize: PropTypes.number,
|
|
1270
1272
|
tickSpacing: PropTypes.number,
|
|
1271
1273
|
valueFormatter: PropTypes.func,
|
|
1272
|
-
width: PropTypes.number
|
|
1274
|
+
width: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number])
|
|
1273
1275
|
})]).isRequired)
|
|
1274
1276
|
} : void 0;
|
|
1275
1277
|
export { LineChart };
|
package/LineChart/LineElement.js
CHANGED
|
@@ -15,6 +15,8 @@ var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
|
15
15
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
16
16
|
var _AnimatedLine = require("./AnimatedLine");
|
|
17
17
|
var _useItemHighlightState = require("../hooks/useItemHighlightState");
|
|
18
|
+
var _useChartExperimentalFeature = require("../internals/plugins/corePlugins/useChartExperimentalFeature");
|
|
19
|
+
var _useStore = require("../internals/store/useStore");
|
|
18
20
|
var _lineClasses = require("./lineClasses");
|
|
19
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
22
|
const _excluded = ["seriesId", "classes", "color", "gradientId", "slots", "slotProps", "onClick", "hidden"];
|
|
@@ -40,6 +42,8 @@ function LineElement(props) {
|
|
|
40
42
|
hidden
|
|
41
43
|
} = props,
|
|
42
44
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
45
|
+
const store = (0, _useStore.useStore)();
|
|
46
|
+
const enablePositionBasedPointerInteraction = store.use(_useChartExperimentalFeature.selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
43
47
|
const identifier = React.useMemo(() => ({
|
|
44
48
|
type: 'line',
|
|
45
49
|
seriesId
|
|
@@ -62,7 +66,7 @@ function LineElement(props) {
|
|
|
62
66
|
const lineProps = (0, _useSlotProps.default)({
|
|
63
67
|
elementType: Line,
|
|
64
68
|
externalSlotProps: slotProps?.line,
|
|
65
|
-
additionalProps: (0, _extends2.default)({}, interactionProps, {
|
|
69
|
+
additionalProps: (0, _extends2.default)({}, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
66
70
|
onClick,
|
|
67
71
|
cursor: onClick ? 'pointer' : 'unset',
|
|
68
72
|
'data-highlighted': isHighlighted || undefined,
|
|
@@ -9,6 +9,8 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
9
9
|
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.mjs";
|
|
10
10
|
import { AnimatedLine } from "./AnimatedLine.mjs";
|
|
11
11
|
import { useItemHighlightState } from "../hooks/useItemHighlightState.mjs";
|
|
12
|
+
import { selectorChartExperimentalFeaturesState } from "../internals/plugins/corePlugins/useChartExperimentalFeature/index.mjs";
|
|
13
|
+
import { useStore } from "../internals/store/useStore.mjs";
|
|
12
14
|
import { useUtilityClasses as useLineUtilityClasses } from "./lineClasses.mjs";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
/**
|
|
@@ -33,6 +35,8 @@ function LineElement(props) {
|
|
|
33
35
|
hidden
|
|
34
36
|
} = props,
|
|
35
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
38
|
+
const store = useStore();
|
|
39
|
+
const enablePositionBasedPointerInteraction = store.use(selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
36
40
|
const identifier = React.useMemo(() => ({
|
|
37
41
|
type: 'line',
|
|
38
42
|
seriesId
|
|
@@ -55,7 +59,7 @@ function LineElement(props) {
|
|
|
55
59
|
const lineProps = useSlotProps({
|
|
56
60
|
elementType: Line,
|
|
57
61
|
externalSlotProps: slotProps?.line,
|
|
58
|
-
additionalProps: _extends({}, interactionProps, {
|
|
62
|
+
additionalProps: _extends({}, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
59
63
|
onClick,
|
|
60
64
|
cursor: onClick ? 'pointer' : 'unset',
|
|
61
65
|
'data-highlighted': isHighlighted || undefined,
|
package/LineChart/MarkElement.js
CHANGED
|
@@ -14,8 +14,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
14
14
|
var _styles = require("@mui/material/styles");
|
|
15
15
|
var _d3Shape = require("@mui/x-charts-vendor/d3-shape");
|
|
16
16
|
var _animation = require("../internals/animation/animation");
|
|
17
|
-
var _getSymbol = require("../internals/getSymbol");
|
|
18
17
|
var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
|
|
18
|
+
var _useChartExperimentalFeature = require("../internals/plugins/corePlugins/useChartExperimentalFeature");
|
|
19
|
+
var _useStore = require("../internals/store/useStore");
|
|
20
|
+
var _getSymbol = require("../internals/getSymbol");
|
|
19
21
|
var _lineClasses = require("./lineClasses");
|
|
20
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
23
|
const _excluded = ["x", "y", "seriesId", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "hidden", "style"];
|
|
@@ -59,6 +61,8 @@ function MarkElement(props) {
|
|
|
59
61
|
style
|
|
60
62
|
} = props,
|
|
61
63
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
64
|
+
const store = (0, _useStore.useStore)();
|
|
65
|
+
const enablePositionBasedPointerInteraction = store.use(_useChartExperimentalFeature.selectorChartExperimentalFeaturesState)?.enablePositionBasedPointerInteraction;
|
|
62
66
|
const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)({
|
|
63
67
|
type: 'line',
|
|
64
68
|
seriesId,
|
|
@@ -75,7 +79,7 @@ function MarkElement(props) {
|
|
|
75
79
|
skipAnimation,
|
|
76
80
|
classes: innerClasses
|
|
77
81
|
});
|
|
78
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, {
|
|
82
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, enablePositionBasedPointerInteraction ? {} : interactionProps, {
|
|
79
83
|
style: (0, _extends2.default)({}, style, {
|
|
80
84
|
transform: `translate(${x}px, ${y}px)`,
|
|
81
85
|
transformOrigin: `${x}px ${y}px`
|
|
@@ -85,8 +89,7 @@ function MarkElement(props) {
|
|
|
85
89
|
d: (0, _d3Shape.symbol)(_d3Shape.symbolsFill[(0, _getSymbol.getSymbol)(shape)])(),
|
|
86
90
|
onClick: onClick,
|
|
87
91
|
cursor: onClick ? 'pointer' : 'unset',
|
|
88
|
-
pointerEvents: hidden ? 'none' : undefined
|
|
89
|
-
}, interactionProps, {
|
|
92
|
+
pointerEvents: hidden ? 'none' : undefined,
|
|
90
93
|
"data-highlighted": isHighlighted || undefined,
|
|
91
94
|
"data-faded": isFaded || undefined,
|
|
92
95
|
"data-series-id": seriesId,
|