@mui/x-charts-premium 9.3.0 → 9.4.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 (176) hide show
  1. package/BarChartPremium/BarChartPremium.js +35 -5
  2. package/BarChartPremium/BarChartPremium.mjs +35 -5
  3. package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +10 -0
  4. package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +10 -0
  5. package/BarChartPremium/RangeBar/RangeBarPlot.js +59 -2
  6. package/BarChartPremium/RangeBar/RangeBarPlot.mjs +59 -2
  7. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.mts +10 -0
  8. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.ts +10 -0
  9. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.js +82 -0
  10. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.mjs +76 -0
  11. package/BarChartPremium/RangeBar/seriesConfig/extrema.js +3 -0
  12. package/BarChartPremium/RangeBar/seriesConfig/extrema.mjs +3 -0
  13. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.js +2 -2
  14. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.mjs +2 -2
  15. package/BarChartPremium/useBarChartPremiumProps.js +2 -1
  16. package/BarChartPremium/useBarChartPremiumProps.mjs +2 -1
  17. package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +2 -7
  18. package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +2 -7
  19. package/BarChartPremium/webgl/useBarWebGLPlotData.js +4 -151
  20. package/BarChartPremium/webgl/useBarWebGLPlotData.mjs +4 -150
  21. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +39 -0
  22. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +39 -0
  23. package/BarChartPremium/webgl/useWebGLBarLikePlotData.js +169 -0
  24. package/BarChartPremium/webgl/useWebGLBarLikePlotData.mjs +163 -0
  25. package/CHANGELOG.md +196 -0
  26. package/CandlestickChart/CandlestickChart.js +11 -2
  27. package/CandlestickChart/CandlestickChart.mjs +11 -2
  28. package/CandlestickChart/seriesConfig/extrema.js +3 -0
  29. package/CandlestickChart/seriesConfig/extrema.mjs +3 -0
  30. package/CandlestickChart/seriesConfig/seriesProcessor.js +2 -2
  31. package/CandlestickChart/seriesConfig/seriesProcessor.mjs +2 -2
  32. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  33. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +2 -2
  34. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +35 -0
  35. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +35 -0
  36. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +125 -0
  37. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +119 -0
  38. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +5 -0
  39. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +5 -0
  40. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.js +10 -0
  41. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.mjs +4 -0
  42. package/ChartsGeoDataProviderPremium/index.d.mts +3 -0
  43. package/ChartsGeoDataProviderPremium/index.d.ts +3 -0
  44. package/ChartsGeoDataProviderPremium/index.js +20 -0
  45. package/ChartsGeoDataProviderPremium/index.mjs +3 -0
  46. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +10 -0
  47. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +10 -0
  48. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.js +49 -0
  49. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.mjs +42 -0
  50. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  51. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  52. package/HeatmapPremium/HeatmapPremium.js +32 -2
  53. package/HeatmapPremium/HeatmapPremium.mjs +32 -2
  54. package/Map/FocusedMapShape.d.mts +4 -0
  55. package/Map/FocusedMapShape.d.ts +4 -0
  56. package/Map/FocusedMapShape.js +66 -0
  57. package/Map/FocusedMapShape.mjs +60 -0
  58. package/Map/GeoDataPlot.d.mts +26 -0
  59. package/Map/GeoDataPlot.d.ts +26 -0
  60. package/Map/GeoDataPlot.js +65 -0
  61. package/Map/GeoDataPlot.mjs +60 -0
  62. package/Map/Graticule.d.mts +1 -0
  63. package/Map/Graticule.d.ts +1 -0
  64. package/Map/Graticule.js +30 -0
  65. package/Map/Graticule.mjs +24 -0
  66. package/Map/MapShape.d.mts +10 -0
  67. package/Map/MapShape.d.ts +10 -0
  68. package/Map/MapShape.js +55 -0
  69. package/Map/MapShape.mjs +49 -0
  70. package/Map/MapShapePlot.d.mts +21 -0
  71. package/Map/MapShapePlot.d.ts +21 -0
  72. package/Map/MapShapePlot.js +86 -0
  73. package/Map/MapShapePlot.mjs +80 -0
  74. package/Map/index.d.mts +7 -0
  75. package/Map/index.d.ts +7 -0
  76. package/Map/index.js +60 -0
  77. package/Map/index.mjs +8 -0
  78. package/Map/seriesConfig/descriptionGetter.d.mts +3 -0
  79. package/Map/seriesConfig/descriptionGetter.d.ts +3 -0
  80. package/Map/seriesConfig/descriptionGetter.js +19 -0
  81. package/Map/seriesConfig/descriptionGetter.mjs +13 -0
  82. package/Map/seriesConfig/getColor.d.mts +3 -0
  83. package/Map/seriesConfig/getColor.d.ts +3 -0
  84. package/Map/seriesConfig/getColor.js +35 -0
  85. package/Map/seriesConfig/getColor.mjs +29 -0
  86. package/Map/seriesConfig/getSeriesWithDefaultValues.d.mts +3 -0
  87. package/Map/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  88. package/Map/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  89. package/Map/seriesConfig/getSeriesWithDefaultValues.mjs +8 -0
  90. package/Map/seriesConfig/index.d.mts +2 -0
  91. package/Map/seriesConfig/index.d.ts +2 -0
  92. package/Map/seriesConfig/index.js +28 -0
  93. package/Map/seriesConfig/index.mjs +21 -0
  94. package/Map/seriesConfig/keyboardFocusHandler.d.mts +9 -0
  95. package/Map/seriesConfig/keyboardFocusHandler.d.ts +9 -0
  96. package/Map/seriesConfig/keyboardFocusHandler.js +19 -0
  97. package/Map/seriesConfig/keyboardFocusHandler.mjs +13 -0
  98. package/Map/seriesConfig/legend.d.mts +3 -0
  99. package/Map/seriesConfig/legend.d.ts +3 -0
  100. package/Map/seriesConfig/legend.js +28 -0
  101. package/Map/seriesConfig/legend.mjs +22 -0
  102. package/Map/seriesConfig/seriesProcessor.d.mts +3 -0
  103. package/Map/seriesConfig/seriesProcessor.d.ts +3 -0
  104. package/Map/seriesConfig/seriesProcessor.js +66 -0
  105. package/Map/seriesConfig/seriesProcessor.mjs +59 -0
  106. package/Map/seriesConfig/tooltip.d.mts +3 -0
  107. package/Map/seriesConfig/tooltip.d.ts +3 -0
  108. package/Map/seriesConfig/tooltip.js +33 -0
  109. package/Map/seriesConfig/tooltip.mjs +27 -0
  110. package/RadialLineChart/RadialLineHighlightPlot.d.mts +3 -2
  111. package/RadialLineChart/RadialLineHighlightPlot.d.ts +3 -2
  112. package/ScatterChartPremium/ScatterChartPremium.d.mts +2 -1
  113. package/ScatterChartPremium/ScatterChartPremium.d.ts +2 -1
  114. package/ScatterChartPremium/ScatterChartPremium.js +32 -2
  115. package/ScatterChartPremium/ScatterChartPremium.mjs +32 -2
  116. package/hooks/index.d.mts +4 -1
  117. package/hooks/index.d.ts +4 -1
  118. package/hooks/index.js +33 -0
  119. package/hooks/index.mjs +4 -1
  120. package/hooks/useGeoData.d.mts +6 -0
  121. package/hooks/useGeoData.d.ts +6 -0
  122. package/hooks/useGeoData.js +17 -0
  123. package/hooks/useGeoData.mjs +13 -0
  124. package/hooks/useGeoFeatureIndexesByName.d.mts +7 -0
  125. package/hooks/useGeoFeatureIndexesByName.d.ts +7 -0
  126. package/hooks/useGeoFeatureIndexesByName.js +19 -0
  127. package/hooks/useGeoFeatureIndexesByName.mjs +15 -0
  128. package/hooks/useGeoPath.d.mts +6 -0
  129. package/hooks/useGeoPath.d.ts +6 -0
  130. package/hooks/useGeoPath.js +17 -0
  131. package/hooks/useGeoPath.mjs +13 -0
  132. package/hooks/useMapShapeSeries.d.mts +34 -0
  133. package/hooks/useMapShapeSeries.d.ts +34 -0
  134. package/hooks/useMapShapeSeries.js +45 -0
  135. package/hooks/useMapShapeSeries.mjs +40 -0
  136. package/index.d.mts +2 -0
  137. package/index.d.ts +2 -0
  138. package/index.js +25 -1
  139. package/index.mjs +3 -1
  140. package/internals/plugins/useGeoProjection/index.d.mts +3 -0
  141. package/internals/plugins/useGeoProjection/index.d.ts +3 -0
  142. package/internals/plugins/useGeoProjection/index.js +38 -0
  143. package/internals/plugins/useGeoProjection/index.mjs +3 -0
  144. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +3 -0
  145. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +3 -0
  146. package/internals/plugins/useGeoProjection/useGeoProjection.js +58 -0
  147. package/internals/plugins/useGeoProjection/useGeoProjection.mjs +50 -0
  148. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.mts +39 -0
  149. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.ts +39 -0
  150. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.js +135 -0
  151. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.mjs +128 -0
  152. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +55 -0
  153. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +55 -0
  154. package/internals/plugins/useGeoProjection/useGeoProjection.types.js +5 -0
  155. package/internals/plugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
  156. package/models/chartsSlotsComponentsPropsPremium.d.mts +1 -0
  157. package/models/chartsSlotsComponentsPropsPremium.d.ts +1 -0
  158. package/models/chartsSlotsComponentsPropsPremium.js +5 -0
  159. package/models/chartsSlotsComponentsPropsPremium.mjs +1 -0
  160. package/models/index.d.mts +2 -1
  161. package/models/index.d.ts +2 -1
  162. package/models/index.js +11 -0
  163. package/models/index.mjs +2 -1
  164. package/models/seriesType/index.d.mts +2 -1
  165. package/models/seriesType/index.d.ts +2 -1
  166. package/models/seriesType/index.js +11 -0
  167. package/models/seriesType/index.mjs +2 -1
  168. package/models/seriesType/mapShape.d.mts +105 -0
  169. package/models/seriesType/mapShape.d.ts +105 -0
  170. package/models/seriesType/mapShape.js +5 -0
  171. package/models/seriesType/mapShape.mjs +1 -0
  172. package/package.json +35 -7
  173. package/typeOverloads/modules.d.mts +16 -1
  174. package/typeOverloads/modules.d.ts +16 -1
  175. package/utils/webgl/useWebGLResizeObserver.js +3 -3
  176. package/utils/webgl/useWebGLResizeObserver.mjs +2 -2
@@ -1,13 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { type ScatterChartProps, type ScatterChartSlots, type ScatterChartSlotProps } from '@mui/x-charts/ScatterChart';
3
3
  import { type ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
4
+ import type { TooltipPropsOverrides } from '@mui/x-charts/models';
4
5
  import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from '@mui/x-charts-pro/ChartsToolbarPro';
5
6
  import { type ChartsSlotPropsPro, type ChartsSlotsPro } from '@mui/x-charts-pro/internals';
6
7
  import { type ChartsContainerPremiumProps } from "../ChartsContainerPremium/index.mjs";
7
8
  import { type ScatterChartPremiumPluginSignatures } from "./ScatterChartPremium.plugins.mjs";
8
9
  export interface ScatterChartPremiumSlots extends Omit<ScatterChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
9
10
  export interface ScatterChartPremiumSlotProps extends Omit<ScatterChartSlotProps, 'toolbar' | 'tooltip'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
10
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
11
+ tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
11
12
  }
12
13
  export interface ScatterChartPremiumProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig' | 'renderer'>, Omit<ChartsContainerPremiumProps<'scatter', ScatterChartPremiumPluginSignatures>, 'series' | 'onItemClick' | 'slots' | 'slotProps' | 'highlightedAxis' | 'onHighlightedAxisChange'> {
13
14
  /**
@@ -1,13 +1,14 @@
1
1
  import * as React from 'react';
2
2
  import { type ScatterChartProps, type ScatterChartSlots, type ScatterChartSlotProps } from '@mui/x-charts/ScatterChart';
3
3
  import { type ChartsTooltipProps } from '@mui/x-charts/ChartsTooltip';
4
+ import type { TooltipPropsOverrides } from '@mui/x-charts/models';
4
5
  import { type ChartsToolbarProSlotProps, type ChartsToolbarProSlots } from '@mui/x-charts-pro/ChartsToolbarPro';
5
6
  import { type ChartsSlotPropsPro, type ChartsSlotsPro } from '@mui/x-charts-pro/internals';
6
7
  import { type ChartsContainerPremiumProps } from "../ChartsContainerPremium/index.js";
7
8
  import { type ScatterChartPremiumPluginSignatures } from "./ScatterChartPremium.plugins.js";
8
9
  export interface ScatterChartPremiumSlots extends Omit<ScatterChartSlots, 'toolbar'>, ChartsToolbarProSlots, Partial<ChartsSlotsPro> {}
9
10
  export interface ScatterChartPremiumSlotProps extends Omit<ScatterChartSlotProps, 'toolbar' | 'tooltip'>, ChartsToolbarProSlotProps, Partial<ChartsSlotPropsPro> {
10
- tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>>;
11
+ tooltip?: Partial<ChartsTooltipProps<'item' | 'none'>> & TooltipPropsOverrides;
11
12
  }
12
13
  export interface ScatterChartPremiumProps extends Omit<ScatterChartProps, 'apiRef' | 'slots' | 'slotProps' | 'plugins' | 'seriesConfig' | 'renderer'>, Omit<ChartsContainerPremiumProps<'scatter', ScatterChartPremiumPluginSignatures>, 'series' | 'onItemClick' | 'slots' | 'slotProps' | 'highlightedAxis' | 'onHighlightedAxisChange'> {
13
14
  /**
@@ -291,12 +291,21 @@ process.env.NODE_ENV !== "production" ? ScatterChartPremium.propTypes = {
291
291
  /**
292
292
  * The list of zoom data related to each axis.
293
293
  * Used to initialize the zoom in a specific configuration without controlling it.
294
+ *
295
+ * Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
296
+ * range value (`{ axisId, value }`) resolved against the axis domain.
294
297
  */
295
- initialZoom: _propTypes.default.arrayOf(_propTypes.default.shape({
298
+ initialZoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
296
299
  axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
297
300
  end: _propTypes.default.number.isRequired,
298
301
  start: _propTypes.default.number.isRequired
299
- })),
302
+ }), _propTypes.default.shape({
303
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
304
+ value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.instanceOf(Date).isRequired), _propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func, _propTypes.default.shape({
305
+ step: _propTypes.default.number,
306
+ unit: _propTypes.default.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
307
+ })])
308
+ })]).isRequired),
300
309
  /**
301
310
  * If `true`, a loading overlay is displayed.
302
311
  * @default false
@@ -454,6 +463,27 @@ process.env.NODE_ENV !== "production" ? ScatterChartPremium.propTypes = {
454
463
  id: _propTypes.default.string,
455
464
  max: _propTypes.default.number,
456
465
  min: _propTypes.default.number,
466
+ sizeMap: _propTypes.default.oneOfType([_propTypes.default.shape({
467
+ interpolator: _propTypes.default.oneOf(['linear', 'log', 'sqrt']),
468
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
469
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
470
+ size: _propTypes.default.arrayOf(_propTypes.default.number.isRequired).isRequired,
471
+ type: _propTypes.default.oneOf(['continuous']).isRequired
472
+ }), _propTypes.default.shape({
473
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
474
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
475
+ size: _propTypes.default.func.isRequired,
476
+ type: _propTypes.default.oneOf(['continuous']).isRequired
477
+ }), _propTypes.default.shape({
478
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
479
+ thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
480
+ type: _propTypes.default.oneOf(['piecewise']).isRequired
481
+ }), _propTypes.default.shape({
482
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
483
+ type: _propTypes.default.oneOf(['ordinal']).isRequired,
484
+ unknownSize: _propTypes.default.number,
485
+ values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
486
+ })]),
457
487
  valueGetter: _propTypes.default.func
458
488
  })),
459
489
  /**
@@ -284,12 +284,21 @@ process.env.NODE_ENV !== "production" ? ScatterChartPremium.propTypes = {
284
284
  /**
285
285
  * The list of zoom data related to each axis.
286
286
  * Used to initialize the zoom in a specific configuration without controlling it.
287
+ *
288
+ * Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
289
+ * range value (`{ axisId, value }`) resolved against the axis domain.
287
290
  */
288
- initialZoom: PropTypes.arrayOf(PropTypes.shape({
291
+ initialZoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
289
292
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
290
293
  end: PropTypes.number.isRequired,
291
294
  start: PropTypes.number.isRequired
292
- })),
295
+ }), PropTypes.shape({
296
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
297
+ value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date).isRequired), PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func, PropTypes.shape({
298
+ step: PropTypes.number,
299
+ unit: PropTypes.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
300
+ })])
301
+ })]).isRequired),
293
302
  /**
294
303
  * If `true`, a loading overlay is displayed.
295
304
  * @default false
@@ -447,6 +456,27 @@ process.env.NODE_ENV !== "production" ? ScatterChartPremium.propTypes = {
447
456
  id: PropTypes.string,
448
457
  max: PropTypes.number,
449
458
  min: PropTypes.number,
459
+ sizeMap: PropTypes.oneOfType([PropTypes.shape({
460
+ interpolator: PropTypes.oneOf(['linear', 'log', 'sqrt']),
461
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
462
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
463
+ size: PropTypes.arrayOf(PropTypes.number.isRequired).isRequired,
464
+ type: PropTypes.oneOf(['continuous']).isRequired
465
+ }), PropTypes.shape({
466
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
467
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
468
+ size: PropTypes.func.isRequired,
469
+ type: PropTypes.oneOf(['continuous']).isRequired
470
+ }), PropTypes.shape({
471
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
472
+ thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
473
+ type: PropTypes.oneOf(['piecewise']).isRequired
474
+ }), PropTypes.shape({
475
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
476
+ type: PropTypes.oneOf(['ordinal']).isRequired,
477
+ unknownSize: PropTypes.number,
478
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
479
+ })]),
450
480
  valueGetter: PropTypes.func
451
481
  })),
452
482
  /**
package/hooks/index.d.mts CHANGED
@@ -2,4 +2,7 @@ export * from '@mui/x-charts-pro/hooks';
2
2
  export * from "./animation/index.mjs";
3
3
  export * from "./useChartPremiumApiRef.mjs";
4
4
  export * from "./useRangeBarSeries.mjs";
5
- export * from "./useOHLCSeries.mjs";
5
+ export * from "./useOHLCSeries.mjs";
6
+ export * from "./useGeoPath.mjs";
7
+ export * from "./useGeoData.mjs";
8
+ export * from "./useGeoFeatureIndexesByName.mjs";
package/hooks/index.d.ts CHANGED
@@ -2,4 +2,7 @@ export * from '@mui/x-charts-pro/hooks';
2
2
  export * from "./animation/index.js";
3
3
  export * from "./useChartPremiumApiRef.js";
4
4
  export * from "./useRangeBarSeries.js";
5
- export * from "./useOHLCSeries.js";
5
+ export * from "./useOHLCSeries.js";
6
+ export * from "./useGeoPath.js";
7
+ export * from "./useGeoData.js";
8
+ export * from "./useGeoFeatureIndexesByName.js";
package/hooks/index.js CHANGED
@@ -57,4 +57,37 @@ Object.keys(_useOHLCSeries).forEach(function (key) {
57
57
  return _useOHLCSeries[key];
58
58
  }
59
59
  });
60
+ });
61
+ var _useGeoPath = require("./useGeoPath");
62
+ Object.keys(_useGeoPath).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _useGeoPath[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _useGeoPath[key];
69
+ }
70
+ });
71
+ });
72
+ var _useGeoData = require("./useGeoData");
73
+ Object.keys(_useGeoData).forEach(function (key) {
74
+ if (key === "default" || key === "__esModule") return;
75
+ if (key in exports && exports[key] === _useGeoData[key]) return;
76
+ Object.defineProperty(exports, key, {
77
+ enumerable: true,
78
+ get: function () {
79
+ return _useGeoData[key];
80
+ }
81
+ });
82
+ });
83
+ var _useGeoFeatureIndexesByName = require("./useGeoFeatureIndexesByName");
84
+ Object.keys(_useGeoFeatureIndexesByName).forEach(function (key) {
85
+ if (key === "default" || key === "__esModule") return;
86
+ if (key in exports && exports[key] === _useGeoFeatureIndexesByName[key]) return;
87
+ Object.defineProperty(exports, key, {
88
+ enumerable: true,
89
+ get: function () {
90
+ return _useGeoFeatureIndexesByName[key];
91
+ }
92
+ });
60
93
  });
package/hooks/index.mjs CHANGED
@@ -5,4 +5,7 @@ export * from '@mui/x-charts-pro/hooks';
5
5
  export * from "./animation/index.mjs";
6
6
  export * from "./useChartPremiumApiRef.mjs";
7
7
  export * from "./useRangeBarSeries.mjs";
8
- export * from "./useOHLCSeries.mjs";
8
+ export * from "./useOHLCSeries.mjs";
9
+ export * from "./useGeoPath.mjs";
10
+ export * from "./useGeoData.mjs";
11
+ export * from "./useGeoFeatureIndexesByName.mjs";
@@ -0,0 +1,6 @@
1
+ import { type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
4
+ * or `null` when no `geoData` has been configured.
5
+ */
6
+ export declare function useGeoData(): ExtendedFeatureCollection | null;
@@ -0,0 +1,6 @@
1
+ import { type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
4
+ * or `null` when no `geoData` has been configured.
5
+ */
6
+ export declare function useGeoData(): ExtendedFeatureCollection | null;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useGeoData = useGeoData;
8
+ var _internals = require("@mui/x-charts/internals");
9
+ var _useGeoProjection = require("../internals/plugins/useGeoProjection");
10
+ /**
11
+ * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
12
+ * or `null` when no `geoData` has been configured.
13
+ */
14
+ function useGeoData() {
15
+ const store = (0, _internals.useStore)();
16
+ return store.use(_useGeoProjection.selectorChartRawGeoData);
17
+ }
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+
3
+ import { useStore } from '@mui/x-charts/internals';
4
+ import { selectorChartRawGeoData } from "../internals/plugins/useGeoProjection/index.mjs";
5
+
6
+ /**
7
+ * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
8
+ * or `null` when no `geoData` has been configured.
9
+ */
10
+ export function useGeoData() {
11
+ const store = useStore();
12
+ return store.use(selectorChartRawGeoData);
13
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
3
+ *
4
+ * Used to join `mapShape` series data rows to geographic features by name.
5
+ * Returns an empty map when no `geoData` is registered.
6
+ */
7
+ export declare function useGeoFeatureIndexesByName(): ReadonlyMap<string, number[]>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
3
+ *
4
+ * Used to join `mapShape` series data rows to geographic features by name.
5
+ * Returns an empty map when no `geoData` is registered.
6
+ */
7
+ export declare function useGeoFeatureIndexesByName(): ReadonlyMap<string, number[]>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useGeoFeatureIndexesByName = useGeoFeatureIndexesByName;
8
+ var _internals = require("@mui/x-charts/internals");
9
+ var _useGeoProjection = require("../internals/plugins/useGeoProjection");
10
+ /**
11
+ * Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
12
+ *
13
+ * Used to join `mapShape` series data rows to geographic features by name.
14
+ * Returns an empty map when no `geoData` is registered.
15
+ */
16
+ function useGeoFeatureIndexesByName() {
17
+ const store = (0, _internals.useStore)();
18
+ return store.use(_useGeoProjection.selectorChartGeoFeatureIndexesByName);
19
+ }
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+
3
+ import { useStore } from '@mui/x-charts/internals';
4
+ import { selectorChartGeoFeatureIndexesByName } from "../internals/plugins/useGeoProjection/index.mjs";
5
+
6
+ /**
7
+ * Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
8
+ *
9
+ * Used to join `mapShape` series data rows to geographic features by name.
10
+ * Returns an empty map when no `geoData` is registered.
11
+ */
12
+ export function useGeoFeatureIndexesByName() {
13
+ const store = useStore();
14
+ return store.use(selectorChartGeoFeatureIndexesByName);
15
+ }
@@ -0,0 +1,6 @@
1
+ import { type GeoPath } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Get the geo path registered with the geo chart, resolved against d3-geo and
4
+ * fitted to the chart's drawing area.
5
+ */
6
+ export declare function useGeoPath(): GeoPath | null;
@@ -0,0 +1,6 @@
1
+ import { type GeoPath } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Get the geo path registered with the geo chart, resolved against d3-geo and
4
+ * fitted to the chart's drawing area.
5
+ */
6
+ export declare function useGeoPath(): GeoPath | null;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useGeoPath = useGeoPath;
8
+ var _internals = require("@mui/x-charts/internals");
9
+ var _useGeoProjection = require("../internals/plugins/useGeoProjection");
10
+ /**
11
+ * Get the geo path registered with the geo chart, resolved against d3-geo and
12
+ * fitted to the chart's drawing area.
13
+ */
14
+ function useGeoPath() {
15
+ const store = (0, _internals.useStore)();
16
+ return store.use(_useGeoProjection.selectorChartGeoPath);
17
+ }
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+
3
+ import { useStore } from '@mui/x-charts/internals';
4
+ import { selectorChartGeoPath } from "../internals/plugins/useGeoProjection/index.mjs";
5
+
6
+ /**
7
+ * Get the geo path registered with the geo chart, resolved against d3-geo and
8
+ * fitted to the chart's drawing area.
9
+ */
10
+ export function useGeoPath() {
11
+ const store = useStore();
12
+ return store.use(selectorChartGeoPath);
13
+ }
@@ -0,0 +1,34 @@
1
+ import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
+ import { type SeriesId } from '@mui/x-charts/models';
3
+ export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
4
+ export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
5
+ /**
6
+ * Get access to the internal state of range bar series.
7
+ *
8
+ * @param {SeriesId} seriesId The id of the series to get.
9
+ * @returns {UseMapShapeSeriesReturnValue} the range bar series
10
+ */
11
+ export declare function useMapShapeSeries(seriesId: SeriesId): UseMapShapeSeriesReturnValue | undefined;
12
+ /**
13
+ * Get access to the internal state of map shape series.
14
+ *
15
+ * When called without arguments, it returns all map shape series.
16
+ *
17
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
18
+ */
19
+ export declare function useMapShapeSeries(): UseMapShapeSeriesReturnValue[];
20
+ /**
21
+ * Get access to the internal state of map shape series.
22
+ *
23
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
24
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
25
+ */
26
+ export declare function useMapShapeSeries(seriesIds: SeriesId[]): UseMapShapeSeriesReturnValue[];
27
+ /**
28
+ * Get access to the internal state of map shape series.
29
+ * The returned object contains:
30
+ * - series: a mapping from ids to series attributes.
31
+ * - seriesOrder: the array of series ids.
32
+ * @returns the map shape series
33
+ */
34
+ export declare function useMapShapeSeriesContext(): UseMapShapeSeriesContextReturnValue;
@@ -0,0 +1,34 @@
1
+ import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
+ import { type SeriesId } from '@mui/x-charts/models';
3
+ export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
4
+ export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
5
+ /**
6
+ * Get access to the internal state of range bar series.
7
+ *
8
+ * @param {SeriesId} seriesId The id of the series to get.
9
+ * @returns {UseMapShapeSeriesReturnValue} the range bar series
10
+ */
11
+ export declare function useMapShapeSeries(seriesId: SeriesId): UseMapShapeSeriesReturnValue | undefined;
12
+ /**
13
+ * Get access to the internal state of map shape series.
14
+ *
15
+ * When called without arguments, it returns all map shape series.
16
+ *
17
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
18
+ */
19
+ export declare function useMapShapeSeries(): UseMapShapeSeriesReturnValue[];
20
+ /**
21
+ * Get access to the internal state of map shape series.
22
+ *
23
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
24
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
25
+ */
26
+ export declare function useMapShapeSeries(seriesIds: SeriesId[]): UseMapShapeSeriesReturnValue[];
27
+ /**
28
+ * Get access to the internal state of map shape series.
29
+ * The returned object contains:
30
+ * - series: a mapping from ids to series attributes.
31
+ * - seriesOrder: the array of series ids.
32
+ * @returns the map shape series
33
+ */
34
+ export declare function useMapShapeSeriesContext(): UseMapShapeSeriesContextReturnValue;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useMapShapeSeries = useMapShapeSeries;
8
+ exports.useMapShapeSeriesContext = useMapShapeSeriesContext;
9
+ var _internals = require("@mui/x-charts/internals");
10
+ /**
11
+ * Get access to the internal state of range bar series.
12
+ *
13
+ * @param {SeriesId} seriesId The id of the series to get.
14
+ * @returns {UseMapShapeSeriesReturnValue} the range bar series
15
+ */
16
+
17
+ /**
18
+ * Get access to the internal state of map shape series.
19
+ *
20
+ * When called without arguments, it returns all map shape series.
21
+ *
22
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
23
+ */
24
+
25
+ /**
26
+ * Get access to the internal state of map shape series.
27
+ *
28
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
29
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
30
+ */
31
+
32
+ function useMapShapeSeries(seriesIds) {
33
+ return (0, _internals.useSeriesOfType)('mapShape', seriesIds);
34
+ }
35
+
36
+ /**
37
+ * Get access to the internal state of map shape series.
38
+ * The returned object contains:
39
+ * - series: a mapping from ids to series attributes.
40
+ * - seriesOrder: the array of series ids.
41
+ * @returns the map shape series
42
+ */
43
+ function useMapShapeSeriesContext() {
44
+ return (0, _internals.useAllSeriesOfType)('mapShape');
45
+ }
@@ -0,0 +1,40 @@
1
+ 'use client';
2
+
3
+ import { useAllSeriesOfType, useSeriesOfType } from '@mui/x-charts/internals';
4
+
5
+ /**
6
+ * Get access to the internal state of range bar series.
7
+ *
8
+ * @param {SeriesId} seriesId The id of the series to get.
9
+ * @returns {UseMapShapeSeriesReturnValue} the range bar series
10
+ */
11
+
12
+ /**
13
+ * Get access to the internal state of map shape series.
14
+ *
15
+ * When called without arguments, it returns all map shape series.
16
+ *
17
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
18
+ */
19
+
20
+ /**
21
+ * Get access to the internal state of map shape series.
22
+ *
23
+ * @param {SeriesId[]} seriesIds The ids of the series to get. Order is preserved.
24
+ * @returns {UseMapShapeSeriesReturnValue[]} the map shape series
25
+ */
26
+
27
+ export function useMapShapeSeries(seriesIds) {
28
+ return useSeriesOfType('mapShape', seriesIds);
29
+ }
30
+
31
+ /**
32
+ * Get access to the internal state of map shape series.
33
+ * The returned object contains:
34
+ * - series: a mapping from ids to series attributes.
35
+ * - seriesOrder: the array of series ids.
36
+ * @returns the map shape series
37
+ */
38
+ export function useMapShapeSeriesContext() {
39
+ return useAllSeriesOfType('mapShape');
40
+ }
package/index.d.mts CHANGED
@@ -47,6 +47,8 @@ export * from "./plugins/index.mjs";
47
47
  export * from "./ChartsRenderer/index.mjs";
48
48
  export * from "./ChartsDataProviderPremium/index.mjs";
49
49
  export * from "./ChartsRadialDataProviderPremium/index.mjs";
50
+ export * from "./ChartsGeoDataProviderPremium/index.mjs";
51
+ export * from "./Map/index.mjs";
50
52
  export * from "./ChartsContainerPremium/index.mjs";
51
53
  export * from "./BarChartPremium/index.mjs";
52
54
  export * from "./HeatmapPremium/index.mjs";
package/index.d.ts CHANGED
@@ -47,6 +47,8 @@ export * from "./plugins/index.js";
47
47
  export * from "./ChartsRenderer/index.js";
48
48
  export * from "./ChartsDataProviderPremium/index.js";
49
49
  export * from "./ChartsRadialDataProviderPremium/index.js";
50
+ export * from "./ChartsGeoDataProviderPremium/index.js";
51
+ export * from "./Map/index.js";
50
52
  export * from "./ChartsContainerPremium/index.js";
51
53
  export * from "./BarChartPremium/index.js";
52
54
  export * from "./HeatmapPremium/index.js";
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-premium v9.3.0
2
+ * @mui/x-charts-premium v9.4.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -558,6 +558,30 @@ Object.keys(_ChartsRadialDataProviderPremium).forEach(function (key) {
558
558
  }
559
559
  });
560
560
  });
561
+ var _ChartsGeoDataProviderPremium = require("./ChartsGeoDataProviderPremium");
562
+ Object.keys(_ChartsGeoDataProviderPremium).forEach(function (key) {
563
+ if (key === "default" || key === "__esModule") return;
564
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
565
+ if (key in exports && exports[key] === _ChartsGeoDataProviderPremium[key]) return;
566
+ Object.defineProperty(exports, key, {
567
+ enumerable: true,
568
+ get: function () {
569
+ return _ChartsGeoDataProviderPremium[key];
570
+ }
571
+ });
572
+ });
573
+ var _Map = require("./Map");
574
+ Object.keys(_Map).forEach(function (key) {
575
+ if (key === "default" || key === "__esModule") return;
576
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
577
+ if (key in exports && exports[key] === _Map[key]) return;
578
+ Object.defineProperty(exports, key, {
579
+ enumerable: true,
580
+ get: function () {
581
+ return _Map[key];
582
+ }
583
+ });
584
+ });
561
585
  var _ChartsContainerPremium = require("./ChartsContainerPremium");
562
586
  Object.keys(_ChartsContainerPremium).forEach(function (key) {
563
587
  if (key === "default" || key === "__esModule") return;
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-premium v9.3.0
2
+ * @mui/x-charts-premium v9.4.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -63,6 +63,8 @@ export * from "./plugins/index.mjs";
63
63
  export * from "./ChartsRenderer/index.mjs";
64
64
  export * from "./ChartsDataProviderPremium/index.mjs";
65
65
  export * from "./ChartsRadialDataProviderPremium/index.mjs";
66
+ export * from "./ChartsGeoDataProviderPremium/index.mjs";
67
+ export * from "./Map/index.mjs";
66
68
  export * from "./ChartsContainerPremium/index.mjs";
67
69
  export * from "./BarChartPremium/index.mjs";
68
70
  export * from "./HeatmapPremium/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./useGeoProjection.mjs";
2
+ export * from "./useGeoProjection.types.mjs";
3
+ export * from "./useGeoProjection.selectors.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./useGeoProjection.js";
2
+ export * from "./useGeoProjection.types.js";
3
+ export * from "./useGeoProjection.selectors.js";
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _useGeoProjection = require("./useGeoProjection");
7
+ Object.keys(_useGeoProjection).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _useGeoProjection[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _useGeoProjection[key];
14
+ }
15
+ });
16
+ });
17
+ var _useGeoProjection2 = require("./useGeoProjection.types");
18
+ Object.keys(_useGeoProjection2).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _useGeoProjection2[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _useGeoProjection2[key];
25
+ }
26
+ });
27
+ });
28
+ var _useGeoProjection3 = require("./useGeoProjection.selectors");
29
+ Object.keys(_useGeoProjection3).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _useGeoProjection3[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _useGeoProjection3[key];
36
+ }
37
+ });
38
+ });
@@ -0,0 +1,3 @@
1
+ export * from "./useGeoProjection.mjs";
2
+ export * from "./useGeoProjection.types.mjs";
3
+ export * from "./useGeoProjection.selectors.mjs";