@mui/x-charts 9.10.0 → 9.11.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.
Files changed (207) hide show
  1. package/BarChart/BarChart.js +4 -2
  2. package/BarChart/BarChart.mjs +4 -2
  3. package/BarChart/BarPlot.d.mts +3 -3
  4. package/BarChart/BarPlot.d.ts +3 -3
  5. package/BarChart/BarPlot.js +1 -1
  6. package/BarChart/BarPlot.mjs +1 -1
  7. package/BarChart/BatchBarPlot/BatchBarPlot.d.mts +2 -2
  8. package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +2 -2
  9. package/BarChart/IndividualBarPlot.d.mts +2 -2
  10. package/BarChart/IndividualBarPlot.d.ts +2 -2
  11. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.mts +4 -4
  12. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +4 -4
  13. package/BarChart/seriesConfig/bar/keyboardFocusHandler.js +3 -1
  14. package/BarChart/seriesConfig/bar/keyboardFocusHandler.mjs +3 -1
  15. package/BarChart/useRegisterItemClickHandlers.d.mts +2 -1
  16. package/BarChart/useRegisterItemClickHandlers.d.ts +2 -1
  17. package/BarChart/useRegisterItemClickHandlers.js +8 -0
  18. package/BarChart/useRegisterItemClickHandlers.mjs +8 -1
  19. package/CHANGELOG.md +224 -0
  20. package/ChartsAxisHighlight/getSampledBandHighlight.d.mts +1 -1
  21. package/ChartsAxisHighlight/getSampledBandHighlight.d.ts +1 -1
  22. package/ChartsAxisHighlight/getSampledBandHighlight.js +15 -3
  23. package/ChartsAxisHighlight/getSampledBandHighlight.mjs +15 -3
  24. package/ChartsContainer/ChartsContainer.js +4 -2
  25. package/ChartsContainer/ChartsContainer.mjs +4 -2
  26. package/ChartsDataProvider/ChartsDataProvider.js +3 -1
  27. package/ChartsDataProvider/ChartsDataProvider.mjs +3 -1
  28. package/ChartsRadialDataProvider/ChartsRadialDataProvider.js +3 -1
  29. package/ChartsRadialDataProvider/ChartsRadialDataProvider.mjs +3 -1
  30. package/ChartsXAxis/useAxisTicksProps.d.mts +101 -101
  31. package/ChartsXAxis/useAxisTicksProps.d.ts +101 -101
  32. package/ChartsYAxis/useAxisTicksProps.d.mts +101 -101
  33. package/ChartsYAxis/useAxisTicksProps.d.ts +101 -101
  34. package/LineChart/AreaPlot.d.mts +3 -2
  35. package/LineChart/AreaPlot.d.ts +3 -2
  36. package/LineChart/AreaPlot.js +8 -2
  37. package/LineChart/AreaPlot.mjs +9 -3
  38. package/LineChart/LineChart.js +2 -1
  39. package/LineChart/LineChart.mjs +2 -1
  40. package/LineChart/LinePlot.d.mts +3 -2
  41. package/LineChart/LinePlot.d.ts +3 -2
  42. package/LineChart/LinePlot.js +2 -2
  43. package/LineChart/LinePlot.mjs +3 -3
  44. package/LineChart/MarkPlot.d.mts +5 -4
  45. package/LineChart/MarkPlot.d.ts +5 -4
  46. package/LineChart/MarkPlot.js +17 -8
  47. package/LineChart/MarkPlot.mjs +17 -8
  48. package/LineChart/seriesConfig/keyboardFocusHandler.js +3 -1
  49. package/LineChart/seriesConfig/keyboardFocusHandler.mjs +3 -1
  50. package/LineChart/useLineItemClickHandler.d.mts +25 -1
  51. package/LineChart/useLineItemClickHandler.d.ts +25 -1
  52. package/LineChart/useLineItemClickHandler.js +48 -1
  53. package/LineChart/useLineItemClickHandler.mjs +47 -1
  54. package/PieChart/PieArcPlot.d.mts +3 -2
  55. package/PieChart/PieArcPlot.d.ts +3 -2
  56. package/PieChart/PieArcPlot.js +16 -1
  57. package/PieChart/PieArcPlot.mjs +16 -1
  58. package/PieChart/PieChart.js +3 -1
  59. package/PieChart/PieChart.mjs +3 -1
  60. package/PieChart/PiePlot.js +1 -1
  61. package/PieChart/PiePlot.mjs +1 -1
  62. package/README.md +1 -11
  63. package/RadarChart/RadarChart.js +3 -1
  64. package/RadarChart/RadarChart.mjs +3 -1
  65. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +3 -1
  66. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +3 -1
  67. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +4 -1
  68. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +4 -1
  69. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.mts +5 -4
  70. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.types.d.ts +5 -4
  71. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.d.mts +15 -0
  72. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.d.ts +15 -0
  73. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.js +32 -0
  74. package/RadarChart/RadarSeriesPlot/useRegisterRadarItemActivation.mjs +26 -0
  75. package/RadarChart/seriesConfig/keyboardFocusHandler.js +3 -1
  76. package/RadarChart/seriesConfig/keyboardFocusHandler.mjs +3 -1
  77. package/RadarChart/useRadarChartProps.js +5 -1
  78. package/RadarChart/useRadarChartProps.mjs +5 -1
  79. package/ScatterChart/Scatter.d.mts +3 -2
  80. package/ScatterChart/Scatter.d.ts +3 -2
  81. package/ScatterChart/Scatter.js +10 -1
  82. package/ScatterChart/Scatter.mjs +10 -1
  83. package/ScatterChart/ScatterChart.js +1 -0
  84. package/ScatterChart/ScatterChart.mjs +1 -0
  85. package/ScatterChart/async/ScatterAsync.js +9 -0
  86. package/ScatterChart/async/ScatterAsync.mjs +9 -0
  87. package/SparkLineChart/SparkLineChart.js +2 -1
  88. package/SparkLineChart/SparkLineChart.mjs +2 -1
  89. package/Toolbar/ToolbarButton.js +1 -1
  90. package/Toolbar/ToolbarButton.mjs +1 -1
  91. package/hooks/animation/useAnimatePieArc.js +2 -1
  92. package/hooks/animation/useAnimatePieArc.mjs +2 -1
  93. package/hooks/useFocusedItem.d.mts +1 -1
  94. package/hooks/useFocusedItem.d.ts +1 -1
  95. package/hooks/useItemHighlightStateGetter.d.mts +1 -1
  96. package/hooks/useItemHighlightStateGetter.d.ts +1 -1
  97. package/index.js +1 -1
  98. package/index.mjs +1 -1
  99. package/internals/commonNextFocusItem.d.mts +2 -2
  100. package/internals/commonNextFocusItem.d.ts +2 -2
  101. package/internals/commonNextFocusItem.js +4 -4
  102. package/internals/commonNextFocusItem.mjs +4 -4
  103. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.js +1 -0
  104. package/internals/components/ChartsAccessibilityProxy/ChartsAccessibilityProxy.mjs +1 -0
  105. package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
  106. package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
  107. package/internals/createGetBarDimensions.js +10 -5
  108. package/internals/createGetBarDimensions.mjs +10 -5
  109. package/internals/getSampledBucketRegion.d.mts +12 -0
  110. package/internals/getSampledBucketRegion.d.ts +12 -0
  111. package/internals/getSampledBucketRegion.js +23 -0
  112. package/internals/getSampledBucketRegion.mjs +17 -0
  113. package/internals/index.d.mts +1 -0
  114. package/internals/index.d.ts +1 -0
  115. package/internals/index.js +8 -0
  116. package/internals/index.mjs +1 -0
  117. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.mts +8 -1
  118. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.d.ts +8 -1
  119. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +11 -3
  120. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.mjs +11 -3
  121. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.mts +1 -0
  122. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +1 -0
  123. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.d.mts +12 -0
  124. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.d.ts +12 -0
  125. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.js +5 -0
  126. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemWithData.types.mjs +1 -0
  127. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.mts +1 -0
  128. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.d.ts +1 -0
  129. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.js +11 -0
  130. package/internals/plugins/corePlugins/useChartSeriesConfig/types/index.mjs +1 -0
  131. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +6 -0
  132. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +6 -0
  133. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.d.mts +21 -0
  134. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.d.ts +21 -0
  135. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.js +46 -0
  136. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisClickPayload.mjs +40 -0
  137. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +13 -31
  138. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.mjs +13 -31
  139. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.mts +2 -2
  140. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +2 -2
  141. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +11 -11
  142. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +11 -11
  143. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.mts +4 -4
  144. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +4 -4
  145. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +19 -0
  146. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.mjs +19 -0
  147. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.mts +5 -3
  148. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.types.d.ts +5 -3
  149. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.js +15 -0
  150. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.mjs +14 -0
  151. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.mts +5 -2
  152. package/internals/plugins/featurePlugins/useChartItemClick/useChartItemClick.types.d.ts +5 -2
  153. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.mts +2 -1
  154. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.d.ts +2 -1
  155. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js +10 -2
  156. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/index.mjs +2 -1
  157. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.d.mts +13 -0
  158. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.d.ts +13 -0
  159. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.js +39 -0
  160. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/itemActivation.mjs +32 -0
  161. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -7
  162. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +47 -7
  163. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.mts +3 -0
  164. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +3 -0
  165. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +3 -1
  166. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +2 -0
  167. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +39 -2
  168. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +39 -2
  169. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.mts +3 -0
  170. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.d.ts +3 -0
  171. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.js +3 -0
  172. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/findVisibleDataIndex.mjs +3 -0
  173. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.d.mts +27 -0
  174. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.d.ts +27 -0
  175. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.js +36 -0
  176. package/internals/plugins/featurePlugins/useChartPolarAxis/getPolarAxisClickPayload.mjs +30 -0
  177. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +19 -20
  178. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.mjs +19 -20
  179. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.mts +2 -2
  180. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +2 -2
  181. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.mts +1 -1
  182. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +1 -1
  183. package/internals/seriesSelectorOfType.d.mts +4 -4
  184. package/internals/seriesSelectorOfType.d.ts +4 -4
  185. package/internals/snapEndAngleToFullCircle.d.mts +20 -0
  186. package/internals/snapEndAngleToFullCircle.d.ts +20 -0
  187. package/internals/snapEndAngleToFullCircle.js +47 -0
  188. package/internals/snapEndAngleToFullCircle.mjs +41 -0
  189. package/internals/useRegisterItemActivation.d.mts +23 -0
  190. package/internals/useRegisterItemActivation.d.ts +23 -0
  191. package/internals/useRegisterItemActivation.js +53 -0
  192. package/internals/useRegisterItemActivation.mjs +46 -0
  193. package/models/axis.d.mts +1 -1
  194. package/models/axis.d.ts +1 -1
  195. package/models/events.d.mts +11 -0
  196. package/models/events.d.ts +11 -0
  197. package/models/events.js +5 -0
  198. package/models/events.mjs +1 -0
  199. package/models/index.d.mts +1 -0
  200. package/models/index.d.ts +1 -0
  201. package/moduleAugmentation/barChartBatchRendererOnItemClick.d.mts +3 -4
  202. package/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +3 -4
  203. package/moduleAugmentation/keyboardActivation.d.mts +7 -0
  204. package/moduleAugmentation/keyboardActivation.d.ts +7 -0
  205. package/moduleAugmentation/keyboardActivation.js +8 -0
  206. package/moduleAugmentation/keyboardActivation.mjs +2 -0
  207. package/package.json +19 -5
@@ -26,7 +26,10 @@ export const useChartInteractionListener = ({
26
26
  preventIf: ['pan', 'zoomPinch', 'zoomPan']
27
27
  }), new TapGesture({
28
28
  name: 'tap',
29
- preventIf: ['pan', 'zoomPinch', 'zoomPan']
29
+ // `pan` is intentionally omitted: it has `threshold: 0`, so any pointer drift during a
30
+ // click activates it and would cancel the tap, discarding the click. The tap's own
31
+ // `maxDistance` already discriminates a click from a drag. See https://github.com/mui/mui-x/issues/20364
32
+ preventIf: ['zoomPinch', 'zoomPan']
30
33
  }), new PressGesture({
31
34
  name: 'quickPress',
32
35
  duration: 50
@@ -45,8 +48,13 @@ export const useChartInteractionListener = ({
45
48
  }
46
49
  gestureManager.registerElement(['pan', 'move', 'tap', 'quickPress', 'brush'], svg);
47
50
  return () => {
48
- // Cleanup gesture manager
49
- gestureManager.unregisterAllGestures(svg);
51
+ // Cleanup gesture manager. `destroy()` unregisters every element's gestures like
52
+ // `unregisterAllGestures()` does, and is additionally the only path that removes the
53
+ // document/window listeners owned by the internal PointerManager and KeyboardManager.
54
+ gestureManager.destroy();
55
+ // The manager is unusable once destroyed, so drop it and let the next mount build a
56
+ // fresh one. Reusing a destroyed manager loses its gesture templates.
57
+ gestureManagerRef.current = null;
50
58
  };
51
59
  }, [chartsLayerContainerRef, gestureManagerRef]);
52
60
  const addInteractionListener = React.useCallback((interaction, callback, options) => {
@@ -38,6 +38,7 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
38
38
  identifierSerializer: import("../useChartSeriesConfig/index.mjs").IdentifierSerializer<"pie">;
39
39
  identifierCleaner: import("../useChartSeriesConfig/index.mjs").IdentifierCleaner<"pie">;
40
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.mjs").GetItemAtPosition<"pie"> | undefined;
41
+ getItemWithData?: import("../useChartSeriesConfig/index.mjs").GetItemWithData<"pie"> | undefined;
41
42
  sampler?: import("../../../index.mjs").SamplingStrategy<"pie", unknown> | undefined;
42
43
  descriptionGetter: import("../useChartSeriesConfig/index.mjs").DescriptionGetter<"pie">;
43
44
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.mjs").HighlightCreator<"pie">;
@@ -38,6 +38,7 @@ export declare const selectorChartSeriesConfigGetter: (args_0: import("../useCha
38
38
  identifierSerializer: import("../useChartSeriesConfig/index.js").IdentifierSerializer<"pie">;
39
39
  identifierCleaner: import("../useChartSeriesConfig/index.js").IdentifierCleaner<"pie">;
40
40
  getItemAtPosition?: import("../useChartSeriesConfig/index.js").GetItemAtPosition<"pie"> | undefined;
41
+ getItemWithData?: import("../useChartSeriesConfig/index.js").GetItemWithData<"pie"> | undefined;
41
42
  sampler?: import("../../../index.js").SamplingStrategy<"pie", unknown> | undefined;
42
43
  descriptionGetter: import("../useChartSeriesConfig/index.js").DescriptionGetter<"pie">;
43
44
  isHighlightedCreator: import("../../featurePlugins/useChartHighlight/highlightCreator.types.js").HighlightCreator<"pie">;
@@ -0,0 +1,12 @@
1
+ import type { SeriesItemIdentifierWithType, FocusedItemIdentifier } from "../../../../../models/seriesType/index.mjs";
2
+ import type { ChartState } from "../../../models/chart.mjs";
3
+ import type { ChartSeriesType } from "../../../../../models/seriesType/config.mjs";
4
+ import type { ChartSeriesTypeRequiredPlugins } from "./seriesConfig.types.mjs";
5
+ /**
6
+ * Completes an item identifier with the data a pointer click would provide, so keyboard activation
7
+ * emits the same payload as `getItemAtPosition`.
8
+ * @param {ChartState} state The chart state.
9
+ * @param {FocusedItemIdentifier<SeriesType>} identifier The identifier to complete.
10
+ * @returns {SeriesItemIdentifierWithType<SeriesType>} The identifier with its click data.
11
+ */
12
+ export type GetItemWithData<SeriesType extends ChartSeriesType> = (state: ChartState<ChartSeriesTypeRequiredPlugins<SeriesType>>, identifier: FocusedItemIdentifier<SeriesType>) => SeriesItemIdentifierWithType<SeriesType>;
@@ -0,0 +1,12 @@
1
+ import type { SeriesItemIdentifierWithType, FocusedItemIdentifier } from "../../../../../models/seriesType/index.js";
2
+ import type { ChartState } from "../../../models/chart.js";
3
+ import type { ChartSeriesType } from "../../../../../models/seriesType/config.js";
4
+ import type { ChartSeriesTypeRequiredPlugins } from "./seriesConfig.types.js";
5
+ /**
6
+ * Completes an item identifier with the data a pointer click would provide, so keyboard activation
7
+ * emits the same payload as `getItemAtPosition`.
8
+ * @param {ChartState} state The chart state.
9
+ * @param {FocusedItemIdentifier<SeriesType>} identifier The identifier to complete.
10
+ * @returns {SeriesItemIdentifierWithType<SeriesType>} The identifier with its click data.
11
+ */
12
+ export type GetItemWithData<SeriesType extends ChartSeriesType> = (state: ChartState<ChartSeriesTypeRequiredPlugins<SeriesType>>, identifier: FocusedItemIdentifier<SeriesType>) => SeriesItemIdentifierWithType<SeriesType>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -11,5 +11,6 @@ export * from "./getSeriesWithDefaultValues.types.mjs";
11
11
  export * from "./identifierSerializer.types.mjs";
12
12
  export * from "./identifierCleaner.types.mjs";
13
13
  export * from "./getItemAtPosition.types.mjs";
14
+ export * from "./getItemWithData.types.mjs";
14
15
  export * from "./descriptionGetter.types.mjs";
15
16
  export * from "./TooltipContent.types.mjs";
@@ -11,5 +11,6 @@ export * from "./getSeriesWithDefaultValues.types.js";
11
11
  export * from "./identifierSerializer.types.js";
12
12
  export * from "./identifierCleaner.types.js";
13
13
  export * from "./getItemAtPosition.types.js";
14
+ export * from "./getItemWithData.types.js";
14
15
  export * from "./descriptionGetter.types.js";
15
16
  export * from "./TooltipContent.types.js";
@@ -146,6 +146,17 @@ Object.keys(_getItemAtPosition).forEach(function (key) {
146
146
  }
147
147
  });
148
148
  });
149
+ var _getItemWithData = require("./getItemWithData.types");
150
+ Object.keys(_getItemWithData).forEach(function (key) {
151
+ if (key === "default" || key === "__esModule") return;
152
+ if (key in exports && exports[key] === _getItemWithData[key]) return;
153
+ Object.defineProperty(exports, key, {
154
+ enumerable: true,
155
+ get: function () {
156
+ return _getItemWithData[key];
157
+ }
158
+ });
159
+ });
149
160
  var _descriptionGetter = require("./descriptionGetter.types");
150
161
  Object.keys(_descriptionGetter).forEach(function (key) {
151
162
  if (key === "default" || key === "__esModule") return;
@@ -11,5 +11,6 @@ export * from "./getSeriesWithDefaultValues.types.mjs";
11
11
  export * from "./identifierSerializer.types.mjs";
12
12
  export * from "./identifierCleaner.types.mjs";
13
13
  export * from "./getItemAtPosition.types.mjs";
14
+ export * from "./getItemWithData.types.mjs";
14
15
  export * from "./descriptionGetter.types.mjs";
15
16
  export * from "./TooltipContent.types.mjs";
@@ -13,6 +13,7 @@ import type { KeyboardFocusHandler } from "../../../featurePlugins/useChartKeybo
13
13
  import type { IdentifierSerializer } from "./identifierSerializer.types.mjs";
14
14
  import type { IdentifierCleaner } from "./identifierCleaner.types.mjs";
15
15
  import type { GetItemAtPosition } from "./getItemAtPosition.types.mjs";
16
+ import type { GetItemWithData } from "./getItemWithData.types.mjs";
16
17
  import type { DescriptionGetter } from "./descriptionGetter.types.mjs";
17
18
  import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/useChartCartesianAxis/index.mjs";
18
19
  import type { UseChartPolarAxisSignature } from "../../../featurePlugins/useChartPolarAxis/index.mjs";
@@ -56,6 +57,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
56
57
  */
57
58
  identifierCleaner: IdentifierCleaner<SeriesType>;
58
59
  getItemAtPosition?: GetItemAtPosition<SeriesType>;
60
+ /**
61
+ * Completes a focused item identifier with the data a pointer click provides.
62
+ * Used by keyboard activation to emit the same payload as a click.
63
+ */
64
+ getItemWithData?: GetItemWithData<SeriesType>;
59
65
  /**
60
66
  * Optional sampling strategy used to render large datasets. When set and sampling is enabled,
61
67
  * the series is reduced to a zoom-appropriate level of detail before rendering.
@@ -13,6 +13,7 @@ import type { KeyboardFocusHandler } from "../../../featurePlugins/useChartKeybo
13
13
  import type { IdentifierSerializer } from "./identifierSerializer.types.js";
14
14
  import type { IdentifierCleaner } from "./identifierCleaner.types.js";
15
15
  import type { GetItemAtPosition } from "./getItemAtPosition.types.js";
16
+ import type { GetItemWithData } from "./getItemWithData.types.js";
16
17
  import type { DescriptionGetter } from "./descriptionGetter.types.js";
17
18
  import type { UseChartCartesianAxisSignature } from "../../../featurePlugins/useChartCartesianAxis/index.js";
18
19
  import type { UseChartPolarAxisSignature } from "../../../featurePlugins/useChartPolarAxis/index.js";
@@ -56,6 +57,11 @@ export type ChartSeriesTypeConfig<SeriesType extends ChartSeriesType> = {
56
57
  */
57
58
  identifierCleaner: IdentifierCleaner<SeriesType>;
58
59
  getItemAtPosition?: GetItemAtPosition<SeriesType>;
60
+ /**
61
+ * Completes a focused item identifier with the data a pointer click provides.
62
+ * Used by keyboard activation to emit the same payload as a click.
63
+ */
64
+ getItemWithData?: GetItemWithData<SeriesType>;
59
65
  /**
60
66
  * Optional sampling strategy used to render large datasets. When set and sampling is enabled,
61
67
  * the series is reduced to a zoom-appropriate level of detail before rendering.
@@ -0,0 +1,21 @@
1
+ import type { AxisId, ChartsAxisData, ChartsAxisProps } from "../../../../models/axis.mjs";
2
+ import type { ProcessedSeries } from "../../corePlugins/useChartSeries/index.mjs";
3
+ import type { ChartSeriesType } from "../../../../models/seriesType/config.mjs";
4
+ import type { ComputeResult } from "./computeAxisValue.mjs";
5
+ /**
6
+ * Builds the `onAxisClick` payload for a data index on a given axis.
7
+ * Returns `null` when the axis has no value at this index.
8
+ */
9
+ export declare function getAxisClickPayload({
10
+ axisId,
11
+ dataIndex,
12
+ isXAxis,
13
+ axes,
14
+ processedSeries
15
+ }: {
16
+ axisId: AxisId;
17
+ dataIndex: number;
18
+ isXAxis: boolean;
19
+ axes: ComputeResult<ChartsAxisProps>['axis'];
20
+ processedSeries: ProcessedSeries<ChartSeriesType>;
21
+ }): ChartsAxisData | null;
@@ -0,0 +1,21 @@
1
+ import type { AxisId, ChartsAxisData, ChartsAxisProps } from "../../../../models/axis.js";
2
+ import type { ProcessedSeries } from "../../corePlugins/useChartSeries/index.js";
3
+ import type { ChartSeriesType } from "../../../../models/seriesType/config.js";
4
+ import type { ComputeResult } from "./computeAxisValue.js";
5
+ /**
6
+ * Builds the `onAxisClick` payload for a data index on a given axis.
7
+ * Returns `null` when the axis has no value at this index.
8
+ */
9
+ export declare function getAxisClickPayload({
10
+ axisId,
11
+ dataIndex,
12
+ isXAxis,
13
+ axes,
14
+ processedSeries
15
+ }: {
16
+ axisId: AxisId;
17
+ dataIndex: number;
18
+ isXAxis: boolean;
19
+ axes: ComputeResult<ChartsAxisProps>['axis'];
20
+ processedSeries: ProcessedSeries<ChartSeriesType>;
21
+ }): ChartsAxisData | null;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAxisClickPayload = getAxisClickPayload;
7
+ const AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);
8
+ /**
9
+ * Builds the `onAxisClick` payload for a data index on a given axis.
10
+ * Returns `null` when the axis has no value at this index.
11
+ */
12
+ function getAxisClickPayload({
13
+ axisId,
14
+ dataIndex,
15
+ isXAxis,
16
+ axes,
17
+ processedSeries
18
+ }) {
19
+ const axisValue = axes[axisId]?.data?.[dataIndex];
20
+ if (axisValue === undefined) {
21
+ return null;
22
+ }
23
+ const seriesValues = {};
24
+ Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {
25
+ // @ts-ignore
26
+ const seriesTypeConfig = processedSeries[seriesType];
27
+ seriesTypeConfig?.seriesOrder.forEach(seriesId => {
28
+ const seriesItem = seriesTypeConfig.series[seriesId];
29
+ const providedXAxisId = seriesItem.xAxisId;
30
+ const providedYAxisId = seriesItem.yAxisId;
31
+ const axisKey = isXAxis ? providedXAxisId : providedYAxisId;
32
+ if (axisKey === undefined || axisKey === axisId) {
33
+ // @ts-ignore This is safe because users need to opt in to use range bar series.
34
+ // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`
35
+ // Which adds the proper type to the series data.
36
+ // TODO(v10): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.
37
+ seriesValues[seriesId] = seriesItem.data[dataIndex];
38
+ }
39
+ });
40
+ });
41
+ return {
42
+ dataIndex,
43
+ axisValue,
44
+ seriesValues
45
+ };
46
+ }
@@ -0,0 +1,40 @@
1
+ const AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);
2
+ /**
3
+ * Builds the `onAxisClick` payload for a data index on a given axis.
4
+ * Returns `null` when the axis has no value at this index.
5
+ */
6
+ export function getAxisClickPayload({
7
+ axisId,
8
+ dataIndex,
9
+ isXAxis,
10
+ axes,
11
+ processedSeries
12
+ }) {
13
+ const axisValue = axes[axisId]?.data?.[dataIndex];
14
+ if (axisValue === undefined) {
15
+ return null;
16
+ }
17
+ const seriesValues = {};
18
+ Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {
19
+ // @ts-ignore
20
+ const seriesTypeConfig = processedSeries[seriesType];
21
+ seriesTypeConfig?.seriesOrder.forEach(seriesId => {
22
+ const seriesItem = seriesTypeConfig.series[seriesId];
23
+ const providedXAxisId = seriesItem.xAxisId;
24
+ const providedYAxisId = seriesItem.yAxisId;
25
+ const axisKey = isXAxis ? providedXAxisId : providedYAxisId;
26
+ if (axisKey === undefined || axisKey === axisId) {
27
+ // @ts-ignore This is safe because users need to opt in to use range bar series.
28
+ // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`
29
+ // Which adds the proper type to the series data.
30
+ // TODO(v10): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.
31
+ seriesValues[seriesId] = seriesItem.data[dataIndex];
32
+ }
33
+ });
34
+ });
35
+ return {
36
+ dataIndex,
37
+ axisValue,
38
+ seriesValues
39
+ };
40
+ }
@@ -22,7 +22,7 @@ var _getChartPoint = require("../../../getChartPoint");
22
22
  var _useChartInteraction = require("../useChartInteraction");
23
23
  var _useChartCartesianInteraction = require("./useChartCartesianInteraction.selectors");
24
24
  var _checkHasInteractionPlugin = require("../useChartInteraction/checkHasInteractionPlugin");
25
- const AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);
25
+ var _getAxisClickPayload = require("./getAxisClickPayload");
26
26
  const useChartCartesianAxis = ({
27
27
  params,
28
28
  store,
@@ -175,42 +175,24 @@ const useChartCartesianAxis = ({
175
175
  return () => {};
176
176
  }
177
177
  const axisClickHandler = instance.addInteractionListener('tap', event => {
178
- let dataIndex = null;
179
- let isXAxis = false;
180
178
  const svgPoint = (0, _getChartPoint.getChartPoint)(element, event.detail.srcEvent);
181
179
  const xIndex = (0, _getAxisValue.getAxisIndex)(xAxisWithScale[usedXAxis], svgPoint.x);
182
- isXAxis = xIndex !== -1;
183
- dataIndex = isXAxis ? xIndex : (0, _getAxisValue.getAxisIndex)(yAxisWithScale[usedYAxis], svgPoint.y);
184
- const USED_AXIS_ID = isXAxis ? xAxisIds[0] : yAxisIds[0];
185
- if (dataIndex == null || dataIndex === -1) {
180
+ const isXAxis = xIndex !== -1;
181
+ const dataIndex = isXAxis ? xIndex : (0, _getAxisValue.getAxisIndex)(yAxisWithScale[usedYAxis], svgPoint.y);
182
+ if (dataIndex === -1) {
186
183
  return;
187
184
  }
188
-
189
- // The .data exist because otherwise the dataIndex would be null or -1.
190
- const axisValue = (isXAxis ? xAxisWithScale : yAxisWithScale)[USED_AXIS_ID].data[dataIndex];
191
- const seriesValues = {};
192
- Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {
193
- // @ts-ignore
194
- const seriesTypeConfig = processedSeries[seriesType];
195
- seriesTypeConfig?.seriesOrder.forEach(seriesId => {
196
- const seriesItem = seriesTypeConfig.series[seriesId];
197
- const providedXAxisId = seriesItem.xAxisId;
198
- const providedYAxisId = seriesItem.yAxisId;
199
- const axisKey = isXAxis ? providedXAxisId : providedYAxisId;
200
- if (axisKey === undefined || axisKey === USED_AXIS_ID) {
201
- // @ts-ignore This is safe because users need to opt in to use range bar series.
202
- // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`
203
- // Which adds the proper type to the series data.
204
- // TODO(v9): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.
205
- seriesValues[seriesId] = seriesItem.data[dataIndex];
206
- }
207
- });
208
- });
209
- onAxisClick(event.detail.srcEvent, {
185
+ const payload = (0, _getAxisClickPayload.getAxisClickPayload)({
186
+ axisId: isXAxis ? xAxisIds[0] : yAxisIds[0],
210
187
  dataIndex,
211
- axisValue,
212
- seriesValues
188
+ isXAxis,
189
+ axes: isXAxis ? xAxisWithScale : yAxisWithScale,
190
+ processedSeries
213
191
  });
192
+ if (payload === null) {
193
+ return;
194
+ }
195
+ onAxisClick(event.detail.srcEvent, payload);
214
196
  });
215
197
  return () => {
216
198
  axisClickHandler.cleanup();
@@ -15,7 +15,7 @@ import { getChartPoint } from "../../../getChartPoint.mjs";
15
15
  import { selectorChartsInteractionIsInitialized } from "../useChartInteraction/index.mjs";
16
16
  import { selectorChartAxisInteraction } from "./useChartCartesianInteraction.selectors.mjs";
17
17
  import { checkHasInteractionPlugin } from "../useChartInteraction/checkHasInteractionPlugin.mjs";
18
- const AXIS_CLICK_SERIES_TYPES = new Set(['bar', 'rangeBar', 'line']);
18
+ import { getAxisClickPayload } from "./getAxisClickPayload.mjs";
19
19
  export const useChartCartesianAxis = ({
20
20
  params,
21
21
  store,
@@ -168,42 +168,24 @@ export const useChartCartesianAxis = ({
168
168
  return () => {};
169
169
  }
170
170
  const axisClickHandler = instance.addInteractionListener('tap', event => {
171
- let dataIndex = null;
172
- let isXAxis = false;
173
171
  const svgPoint = getChartPoint(element, event.detail.srcEvent);
174
172
  const xIndex = getAxisIndex(xAxisWithScale[usedXAxis], svgPoint.x);
175
- isXAxis = xIndex !== -1;
176
- dataIndex = isXAxis ? xIndex : getAxisIndex(yAxisWithScale[usedYAxis], svgPoint.y);
177
- const USED_AXIS_ID = isXAxis ? xAxisIds[0] : yAxisIds[0];
178
- if (dataIndex == null || dataIndex === -1) {
173
+ const isXAxis = xIndex !== -1;
174
+ const dataIndex = isXAxis ? xIndex : getAxisIndex(yAxisWithScale[usedYAxis], svgPoint.y);
175
+ if (dataIndex === -1) {
179
176
  return;
180
177
  }
181
-
182
- // The .data exist because otherwise the dataIndex would be null or -1.
183
- const axisValue = (isXAxis ? xAxisWithScale : yAxisWithScale)[USED_AXIS_ID].data[dataIndex];
184
- const seriesValues = {};
185
- Object.keys(processedSeries).filter(seriesType => AXIS_CLICK_SERIES_TYPES.has(seriesType)).forEach(seriesType => {
186
- // @ts-ignore
187
- const seriesTypeConfig = processedSeries[seriesType];
188
- seriesTypeConfig?.seriesOrder.forEach(seriesId => {
189
- const seriesItem = seriesTypeConfig.series[seriesId];
190
- const providedXAxisId = seriesItem.xAxisId;
191
- const providedYAxisId = seriesItem.yAxisId;
192
- const axisKey = isXAxis ? providedXAxisId : providedYAxisId;
193
- if (axisKey === undefined || axisKey === USED_AXIS_ID) {
194
- // @ts-ignore This is safe because users need to opt in to use range bar series.
195
- // In that case, they should import the module augmentation from `x-charts-pro/moduleAugmentation/rangeBarOnClick`
196
- // Which adds the proper type to the series data.
197
- // TODO(v9): Remove this ts-ignore when we can make the breaking change to ChartsAxisData.
198
- seriesValues[seriesId] = seriesItem.data[dataIndex];
199
- }
200
- });
201
- });
202
- onAxisClick(event.detail.srcEvent, {
178
+ const payload = getAxisClickPayload({
179
+ axisId: isXAxis ? xAxisIds[0] : yAxisIds[0],
203
180
  dataIndex,
204
- axisValue,
205
- seriesValues
181
+ isXAxis,
182
+ axes: isXAxis ? xAxisWithScale : yAxisWithScale,
183
+ processedSeries
206
184
  });
185
+ if (payload === null) {
186
+ return;
187
+ }
188
+ onAxisClick(event.detail.srcEvent, payload);
207
189
  });
208
190
  return () => {
209
191
  axisClickHandler.cleanup();
@@ -4,10 +4,10 @@ export declare const selectorChartPreviewXScales: (args_0: import("../../corePlu
4
4
  }, axisId: AxisId) => Record<AxisId, D3Scale>;
5
5
  export declare const selectorChartPreviewComputedXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
6
6
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
7
- }, axisId: AxisId) => import("./useChartCartesianAxis.types.mjs").ComputedAxisConfig<import("../../../index.mjs").ChartsXAxisProps>;
7
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.mjs").ComputedAxisConfig<import("@mui/x-charts/models").ChartsXAxisProps>;
8
8
  export declare const selectorChartPreviewYScales: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState> & {
9
9
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
10
10
  }, axisId: AxisId) => Record<AxisId, D3Scale>;
11
11
  export declare const selectorChartPreviewComputedYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
12
12
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
13
- }, axisId: AxisId) => import("./useChartCartesianAxis.types.mjs").ComputedAxisConfig<import("../../../index.mjs").ChartsYAxisProps>;
13
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.mjs").ComputedAxisConfig<import("@mui/x-charts/models").ChartsYAxisProps>;
@@ -4,10 +4,10 @@ export declare const selectorChartPreviewXScales: (args_0: import("../../corePlu
4
4
  }, axisId: AxisId) => Record<AxisId, D3Scale>;
5
5
  export declare const selectorChartPreviewComputedXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
6
6
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
7
- }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsXAxisProps>;
7
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("@mui/x-charts/models").ChartsXAxisProps>;
8
8
  export declare const selectorChartPreviewYScales: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.js").UseChartCartesianAxisState> & {
9
9
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
10
10
  }, axisId: AxisId) => Record<AxisId, D3Scale>;
11
11
  export declare const selectorChartPreviewComputedYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
12
12
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
13
- }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("../../../index.js").ChartsYAxisProps>;
13
+ }, axisId: AxisId) => import("./useChartCartesianAxis.types.js").ComputedAxisConfig<import("@mui/x-charts/models").ChartsYAxisProps>;
@@ -68,13 +68,13 @@ export declare const selectorChartYScales: (args_0: import("../../corePlugins/us
68
68
  */
69
69
  export declare const selectorChartXAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
70
70
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
71
- }) => import("./computeAxisValue.mjs").ComputeResult<import("../../../index.mjs").ChartsXAxisProps>;
71
+ }) => import("./computeAxisValue.mjs").ComputeResult<import("@mui/x-charts/models").ChartsXAxisProps>;
72
72
  export declare const selectorChartYAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
73
73
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
74
- }) => import("./computeAxisValue.mjs").ComputeResult<import("../../../index.mjs").ChartsYAxisProps>;
74
+ }) => import("./computeAxisValue.mjs").ComputeResult<import("@mui/x-charts/models").ChartsYAxisProps>;
75
75
  export declare const selectorChartAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
76
76
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
77
- }, axisId: AxisId) => (Omit<Omit<DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, import("../../../index.mjs").ChartsXAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, import("../../../index.mjs").ChartsXAxisProps>, "scaleType">, "offset">> & (({
77
+ }, axisId: AxisId) => (Omit<Omit<DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, import("@mui/x-charts/models").ChartsXAxisProps>, "scaleType">, "offset"> & Required<Pick<Omit<DefaultedAxis<keyof import("../../../index.mjs").AxisScaleConfig, any, import("@mui/x-charts/models").ChartsXAxisProps>, "scaleType">, "offset">> & (({
78
78
  scaleType: 'log';
79
79
  scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
80
80
  colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
@@ -105,14 +105,14 @@ export declare const selectorChartAxis: (args_0: import("../../corePlugins/useCh
105
105
  colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
106
106
  } | ({
107
107
  scaleType: 'point';
108
- ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
108
+ ordinalTimeTicks?: import("@mui/x-charts/models").OrdinalTimeTicks;
109
109
  scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
110
110
  toString(): string;
111
111
  }>;
112
112
  colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
113
113
  } & import("../../../index.mjs").AxisGroups) | ({
114
114
  scaleType: 'band';
115
- ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
115
+ ordinalTimeTicks?: import("@mui/x-charts/models").OrdinalTimeTicks;
116
116
  scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
117
117
  toString(): string;
118
118
  }>;
@@ -141,7 +141,7 @@ export declare const selectorChartAxis: (args_0: import("../../corePlugins/useCh
141
141
  tickNumber: number;
142
142
  triggerTooltip?: boolean;
143
143
  isFullCircle?: boolean;
144
- } & import("../../../index.mjs").ChartsXAxisProps & {
144
+ } & import("@mui/x-charts/models").ChartsXAxisProps & {
145
145
  position?: "bottom" | "none" | "top" | undefined;
146
146
  height?: number | "auto" | undefined;
147
147
  width?: undefined;
@@ -150,14 +150,14 @@ export declare const selectorChartAxis: (args_0: import("../../corePlugins/useCh
150
150
  };
151
151
  export declare const selectorChartRawAxis: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<import("./useChartCartesianAxis.types.mjs").UseChartCartesianAxisState> & {
152
152
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
153
- }, axisId: AxisId) => DefaultedAxis<"band", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"linear", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"log", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"point", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"pow", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"sqrt", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"symlog", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"time", any, import("../../../index.mjs").ChartsXAxisProps> | DefaultedAxis<"utc", any, import("../../../index.mjs").ChartsXAxisProps> | ({
153
+ }, axisId: AxisId) => DefaultedAxis<"band", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"linear", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"log", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"point", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"pow", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"sqrt", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"symlog", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"time", any, import("@mui/x-charts/models").ChartsXAxisProps> | DefaultedAxis<"utc", any, import("@mui/x-charts/models").ChartsXAxisProps> | ({
154
154
  offset?: number;
155
155
  } & {
156
156
  id: AxisId;
157
157
  data?: readonly any[] | undefined;
158
158
  dataKey?: string;
159
159
  valueGetter?: ((item: import("../../../index.mjs").DatasetElementType<unknown>) => any) | undefined;
160
- valueFormatter?: (<TScaleName extends keyof import("../../../index.mjs").AxisScaleConfig>(value: any, context: import("../../../index.mjs").AxisValueFormatterContext<TScaleName>) => string) | undefined;
160
+ valueFormatter?: (<TScaleName extends keyof import("../../../index.mjs").AxisScaleConfig>(value: any, context: import("@mui/x-charts/models").AxisValueFormatterContext<TScaleName>) => string) | undefined;
161
161
  hideTooltip?: boolean;
162
162
  reverse?: boolean;
163
163
  domainLimit?: 'nice' | 'strict' | ((min: NumberValue, max: NumberValue) => {
@@ -166,7 +166,7 @@ export declare const selectorChartRawAxis: (args_0: import("../../corePlugins/us
166
166
  });
167
167
  domainSeries?: 'all' | 'visible';
168
168
  ignoreTooltip?: boolean;
169
- } & Omit<Partial<import("../../../index.mjs").ChartsYAxisProps>, "axisId"> & Partial<Omit<{
169
+ } & Omit<Partial<import("@mui/x-charts/models").ChartsYAxisProps>, "axisId"> & Partial<Omit<{
170
170
  scaleType: 'log';
171
171
  scale: import("@mui/x-charts-vendor/d3-scale").ScaleLogarithmic<number, number>;
172
172
  colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
@@ -197,14 +197,14 @@ export declare const selectorChartRawAxis: (args_0: import("../../corePlugins/us
197
197
  colorMap?: import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
198
198
  } | ({
199
199
  scaleType: 'point';
200
- ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
200
+ ordinalTimeTicks?: import("@mui/x-charts/models").OrdinalTimeTicks;
201
201
  scale: import("@mui/x-charts-vendor/d3-scale").ScalePoint<{
202
202
  toString(): string;
203
203
  }>;
204
204
  colorMap?: import("../../../../models/colorMapping.mjs").OrdinalColorConfig | import("../../../../models/colorMapping.mjs").ContinuousColorConfig | import("../../../../models/colorMapping.mjs").PiecewiseColorConfig;
205
205
  } & import("../../../index.mjs").AxisGroups) | ({
206
206
  scaleType: 'band';
207
- ordinalTimeTicks?: import("../../../../index.mjs").OrdinalTimeTicks;
207
+ ordinalTimeTicks?: import("@mui/x-charts/models").OrdinalTimeTicks;
208
208
  scale: import("@mui/x-charts-vendor/d3-scale").ScaleBand<{
209
209
  toString(): string;
210
210
  }>;