@mui/x-charts-premium 9.3.0 → 9.5.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 (212) 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 +40 -0
  22. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +40 -0
  23. package/BarChartPremium/webgl/useWebGLBarLikePlotData.js +228 -0
  24. package/BarChartPremium/webgl/useWebGLBarLikePlotData.mjs +222 -0
  25. package/CHANGELOG.md +296 -0
  26. package/CandlestickChart/CandlestickChart.js +11 -2
  27. package/CandlestickChart/CandlestickChart.mjs +11 -2
  28. package/CandlestickChart/index.d.mts +11 -2
  29. package/CandlestickChart/index.d.ts +11 -2
  30. package/CandlestickChart/index.js +15 -3
  31. package/CandlestickChart/index.mjs +16 -2
  32. package/CandlestickChart/seriesConfig/extrema.js +3 -0
  33. package/CandlestickChart/seriesConfig/extrema.mjs +3 -0
  34. package/CandlestickChart/seriesConfig/seriesProcessor.js +2 -2
  35. package/CandlestickChart/seriesConfig/seriesProcessor.mjs +2 -2
  36. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  37. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +2 -2
  38. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +35 -0
  39. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +35 -0
  40. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +125 -0
  41. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +119 -0
  42. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +5 -0
  43. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +5 -0
  44. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.js +10 -0
  45. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.mjs +4 -0
  46. package/ChartsGeoDataProviderPremium/index.d.mts +3 -0
  47. package/ChartsGeoDataProviderPremium/index.d.ts +3 -0
  48. package/ChartsGeoDataProviderPremium/index.js +20 -0
  49. package/ChartsGeoDataProviderPremium/index.mjs +3 -0
  50. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +10 -0
  51. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +10 -0
  52. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.js +49 -0
  53. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.mjs +42 -0
  54. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  55. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  56. package/HeatmapPremium/HeatmapPremium.js +32 -2
  57. package/HeatmapPremium/HeatmapPremium.mjs +32 -2
  58. package/Map/FocusedMapShape.d.mts +4 -0
  59. package/Map/FocusedMapShape.d.ts +4 -0
  60. package/Map/FocusedMapShape.js +66 -0
  61. package/Map/FocusedMapShape.mjs +60 -0
  62. package/Map/GeoDataPlot.d.mts +26 -0
  63. package/Map/GeoDataPlot.d.ts +26 -0
  64. package/Map/GeoDataPlot.js +65 -0
  65. package/Map/GeoDataPlot.mjs +60 -0
  66. package/Map/Graticule.d.mts +1 -0
  67. package/Map/Graticule.d.ts +1 -0
  68. package/Map/Graticule.js +30 -0
  69. package/Map/Graticule.mjs +24 -0
  70. package/Map/MapShape.d.mts +10 -0
  71. package/Map/MapShape.d.ts +10 -0
  72. package/Map/MapShape.js +55 -0
  73. package/Map/MapShape.mjs +49 -0
  74. package/Map/MapShapePlot.d.mts +21 -0
  75. package/Map/MapShapePlot.d.ts +21 -0
  76. package/Map/MapShapePlot.js +86 -0
  77. package/Map/MapShapePlot.mjs +80 -0
  78. package/Map/index.d.mts +7 -0
  79. package/Map/index.d.ts +7 -0
  80. package/Map/index.js +60 -0
  81. package/Map/index.mjs +8 -0
  82. package/Map/seriesConfig/descriptionGetter.d.mts +3 -0
  83. package/Map/seriesConfig/descriptionGetter.d.ts +3 -0
  84. package/Map/seriesConfig/descriptionGetter.js +19 -0
  85. package/Map/seriesConfig/descriptionGetter.mjs +13 -0
  86. package/Map/seriesConfig/getColor.d.mts +3 -0
  87. package/Map/seriesConfig/getColor.d.ts +3 -0
  88. package/Map/seriesConfig/getColor.js +35 -0
  89. package/Map/seriesConfig/getColor.mjs +29 -0
  90. package/Map/seriesConfig/getSeriesWithDefaultValues.d.mts +3 -0
  91. package/Map/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  92. package/Map/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  93. package/Map/seriesConfig/getSeriesWithDefaultValues.mjs +8 -0
  94. package/Map/seriesConfig/index.d.mts +2 -0
  95. package/Map/seriesConfig/index.d.ts +2 -0
  96. package/Map/seriesConfig/index.js +28 -0
  97. package/Map/seriesConfig/index.mjs +21 -0
  98. package/Map/seriesConfig/keyboardFocusHandler.d.mts +9 -0
  99. package/Map/seriesConfig/keyboardFocusHandler.d.ts +9 -0
  100. package/Map/seriesConfig/keyboardFocusHandler.js +19 -0
  101. package/Map/seriesConfig/keyboardFocusHandler.mjs +13 -0
  102. package/Map/seriesConfig/legend.d.mts +3 -0
  103. package/Map/seriesConfig/legend.d.ts +3 -0
  104. package/Map/seriesConfig/legend.js +28 -0
  105. package/Map/seriesConfig/legend.mjs +22 -0
  106. package/Map/seriesConfig/seriesProcessor.d.mts +3 -0
  107. package/Map/seriesConfig/seriesProcessor.d.ts +3 -0
  108. package/Map/seriesConfig/seriesProcessor.js +66 -0
  109. package/Map/seriesConfig/seriesProcessor.mjs +59 -0
  110. package/Map/seriesConfig/tooltip.d.mts +3 -0
  111. package/Map/seriesConfig/tooltip.d.ts +3 -0
  112. package/Map/seriesConfig/tooltip.js +33 -0
  113. package/Map/seriesConfig/tooltip.mjs +27 -0
  114. package/RadialBarChart/RadialBarChart.d.mts +1 -1
  115. package/RadialBarChart/RadialBarChart.d.ts +1 -1
  116. package/RadialBarChart/RadialBarChart.js +2 -2
  117. package/RadialBarChart/RadialBarChart.mjs +1 -1
  118. package/RadialBarChart/index.d.mts +4 -0
  119. package/RadialBarChart/index.d.ts +4 -0
  120. package/RadialBarChart/index.js +8 -1
  121. package/RadialBarChart/index.mjs +6 -0
  122. package/RadialLineChart/RadialLineChart.d.mts +1 -1
  123. package/RadialLineChart/RadialLineChart.d.ts +1 -1
  124. package/RadialLineChart/RadialLineChart.js +4 -4
  125. package/RadialLineChart/RadialLineChart.mjs +5 -5
  126. package/RadialLineChart/RadialLineHighlightPlot.d.mts +3 -2
  127. package/RadialLineChart/RadialLineHighlightPlot.d.ts +3 -2
  128. package/RadialLineChart/index.d.mts +4 -0
  129. package/RadialLineChart/index.d.ts +4 -0
  130. package/RadialLineChart/index.js +16 -1
  131. package/RadialLineChart/index.mjs +6 -0
  132. package/ScatterChartPremium/ScatterChartPremium.d.mts +2 -1
  133. package/ScatterChartPremium/ScatterChartPremium.d.ts +2 -1
  134. package/ScatterChartPremium/ScatterChartPremium.js +36 -4
  135. package/ScatterChartPremium/ScatterChartPremium.mjs +37 -5
  136. package/ScatterChartPremium/ScatterChartPremium.plugins.d.mts +1 -1
  137. package/ScatterChartPremium/ScatterChartPremium.plugins.d.ts +1 -1
  138. package/ScatterChartPremium/ScatterPlotPremium.d.mts +2 -2
  139. package/ScatterChartPremium/ScatterPlotPremium.d.ts +2 -2
  140. package/hooks/index.d.mts +4 -1
  141. package/hooks/index.d.ts +4 -1
  142. package/hooks/index.js +33 -0
  143. package/hooks/index.mjs +4 -1
  144. package/hooks/useGeoData.d.mts +6 -0
  145. package/hooks/useGeoData.d.ts +6 -0
  146. package/hooks/useGeoData.js +17 -0
  147. package/hooks/useGeoData.mjs +13 -0
  148. package/hooks/useGeoFeatureIndexesByName.d.mts +7 -0
  149. package/hooks/useGeoFeatureIndexesByName.d.ts +7 -0
  150. package/hooks/useGeoFeatureIndexesByName.js +19 -0
  151. package/hooks/useGeoFeatureIndexesByName.mjs +15 -0
  152. package/hooks/useGeoPath.d.mts +6 -0
  153. package/hooks/useGeoPath.d.ts +6 -0
  154. package/hooks/useGeoPath.js +17 -0
  155. package/hooks/useGeoPath.mjs +13 -0
  156. package/hooks/useMapShapeSeries.d.mts +34 -0
  157. package/hooks/useMapShapeSeries.d.ts +34 -0
  158. package/hooks/useMapShapeSeries.js +45 -0
  159. package/hooks/useMapShapeSeries.mjs +40 -0
  160. package/index.d.mts +3 -1
  161. package/index.d.ts +3 -1
  162. package/index.js +32 -1
  163. package/index.mjs +4 -2
  164. package/internals/plugins/allPlugins.d.mts +5 -5
  165. package/internals/plugins/allPlugins.d.ts +5 -5
  166. package/internals/plugins/allPlugins.js +2 -2
  167. package/internals/plugins/allPlugins.mjs +3 -3
  168. package/internals/plugins/useGeoProjection/index.d.mts +3 -0
  169. package/internals/plugins/useGeoProjection/index.d.ts +3 -0
  170. package/internals/plugins/useGeoProjection/index.js +38 -0
  171. package/internals/plugins/useGeoProjection/index.mjs +3 -0
  172. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +3 -0
  173. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +3 -0
  174. package/internals/plugins/useGeoProjection/useGeoProjection.js +58 -0
  175. package/internals/plugins/useGeoProjection/useGeoProjection.mjs +50 -0
  176. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.mts +39 -0
  177. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.ts +39 -0
  178. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.js +135 -0
  179. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.mjs +128 -0
  180. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +55 -0
  181. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +55 -0
  182. package/internals/plugins/useGeoProjection/useGeoProjection.types.js +5 -0
  183. package/internals/plugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
  184. package/models/chartsSlotsComponentsPropsPremium.d.mts +1 -0
  185. package/models/chartsSlotsComponentsPropsPremium.d.ts +1 -0
  186. package/models/chartsSlotsComponentsPropsPremium.js +5 -0
  187. package/models/chartsSlotsComponentsPropsPremium.mjs +1 -0
  188. package/models/index.d.mts +2 -1
  189. package/models/index.d.ts +2 -1
  190. package/models/index.js +11 -0
  191. package/models/index.mjs +2 -1
  192. package/models/seriesType/index.d.mts +2 -1
  193. package/models/seriesType/index.d.ts +2 -1
  194. package/models/seriesType/index.js +11 -0
  195. package/models/seriesType/index.mjs +2 -1
  196. package/models/seriesType/mapShape.d.mts +105 -0
  197. package/models/seriesType/mapShape.d.ts +105 -0
  198. package/models/seriesType/mapShape.js +5 -0
  199. package/models/seriesType/mapShape.mjs +1 -0
  200. package/models/seriesType/ohlc.d.mts +1 -1
  201. package/models/seriesType/ohlc.d.ts +1 -1
  202. package/models/seriesType/radialBar.d.mts +1 -1
  203. package/models/seriesType/radialBar.d.ts +1 -1
  204. package/models/seriesType/radialLine.d.mts +1 -1
  205. package/models/seriesType/radialLine.d.ts +1 -1
  206. package/models/seriesType/rangeBar.d.mts +1 -1
  207. package/models/seriesType/rangeBar.d.ts +1 -1
  208. package/package.json +34 -6
  209. package/typeOverloads/modules.d.mts +16 -1
  210. package/typeOverloads/modules.d.ts +16 -1
  211. package/utils/webgl/useWebGLResizeObserver.js +3 -3
  212. package/utils/webgl/useWebGLResizeObserver.mjs +2 -2
@@ -0,0 +1,55 @@
1
+ import { type ChartPluginSignature } from '@mui/x-charts/internals';
2
+ import { type GeoProjection, type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
3
+ export type D3NamedProjection = 'azimuthalEqualArea' | 'azimuthalEquidistant' | 'gnomonic' | 'orthographic' | 'stereographic' | 'conicConformal' | 'conicEqualArea' | 'conicEquidistant' | 'albers' | 'albersUsa' | 'equirectangular' | 'mercator' | 'transverseMercator' | 'equalEarth' | 'naturalEarth1';
4
+ /**
5
+ * A d3-geo projection accepted by `useGeoProjection`.
6
+ *
7
+ * Either a built-in projection name (e.g. `'mercator'`, `'naturalEarth1'`)
8
+ * or a `GeoProjection` instance returned by a d3-geo factory.
9
+ */
10
+ export type GeoProjectionInput = D3NamedProjection | GeoProjection;
11
+ export interface UseGeoProjectionParameters {
12
+ /**
13
+ * The GeoJSON `FeatureCollection` whose features will be rendered on the map.
14
+ */
15
+ geoData?: ExtendedFeatureCollection;
16
+ /**
17
+ * The d3-geo projection used to map geographic coordinates to SVG coordinates.
18
+ * Accepts a d3-geo projection name (e.g. `'mercator'`, `'naturalEarth1'`)
19
+ * or a custom `GeoProjection` instance.
20
+ */
21
+ projection?: GeoProjectionInput;
22
+ /**
23
+ * The center of the projection, specified as a `[longitude, latitude]` pair in degrees.
24
+ */
25
+ translate?: [number, number];
26
+ /**
27
+ * The rotation of the projection, specified as a `[longitude, latitude]` pair in degrees.
28
+ */
29
+ rotate?: [number, number];
30
+ /**
31
+ * The scale of the projection.
32
+ * Id not provided the scale will default to fit the entire geoData in the drawing area.
33
+ */
34
+ scale?: number;
35
+ }
36
+ export type UseGeoProjectionDefaultizedParameters = UseGeoProjectionParameters;
37
+ export interface UseGeoProjectionState {
38
+ geoProjection: {
39
+ geoData: ExtendedFeatureCollection | null;
40
+ projection: GeoProjectionInput | null;
41
+ translate: [number, number] | null;
42
+ rotate: [number, number] | null;
43
+ scale: number | null;
44
+ /**
45
+ * The two standard parallels used by conic projections, if applicable.
46
+ * Used for projection 'conicConformal', 'conicEqualArea', 'conicEquidistant'.
47
+ */
48
+ parallels?: [number, number] | null;
49
+ };
50
+ }
51
+ export type UseGeoProjectionSignature = ChartPluginSignature<{
52
+ params: UseGeoProjectionParameters;
53
+ defaultizedParams: UseGeoProjectionDefaultizedParameters;
54
+ state: UseGeoProjectionState;
55
+ }>;
@@ -0,0 +1,55 @@
1
+ import { type ChartPluginSignature } from '@mui/x-charts/internals';
2
+ import { type GeoProjection, type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
3
+ export type D3NamedProjection = 'azimuthalEqualArea' | 'azimuthalEquidistant' | 'gnomonic' | 'orthographic' | 'stereographic' | 'conicConformal' | 'conicEqualArea' | 'conicEquidistant' | 'albers' | 'albersUsa' | 'equirectangular' | 'mercator' | 'transverseMercator' | 'equalEarth' | 'naturalEarth1';
4
+ /**
5
+ * A d3-geo projection accepted by `useGeoProjection`.
6
+ *
7
+ * Either a built-in projection name (e.g. `'mercator'`, `'naturalEarth1'`)
8
+ * or a `GeoProjection` instance returned by a d3-geo factory.
9
+ */
10
+ export type GeoProjectionInput = D3NamedProjection | GeoProjection;
11
+ export interface UseGeoProjectionParameters {
12
+ /**
13
+ * The GeoJSON `FeatureCollection` whose features will be rendered on the map.
14
+ */
15
+ geoData?: ExtendedFeatureCollection;
16
+ /**
17
+ * The d3-geo projection used to map geographic coordinates to SVG coordinates.
18
+ * Accepts a d3-geo projection name (e.g. `'mercator'`, `'naturalEarth1'`)
19
+ * or a custom `GeoProjection` instance.
20
+ */
21
+ projection?: GeoProjectionInput;
22
+ /**
23
+ * The center of the projection, specified as a `[longitude, latitude]` pair in degrees.
24
+ */
25
+ translate?: [number, number];
26
+ /**
27
+ * The rotation of the projection, specified as a `[longitude, latitude]` pair in degrees.
28
+ */
29
+ rotate?: [number, number];
30
+ /**
31
+ * The scale of the projection.
32
+ * Id not provided the scale will default to fit the entire geoData in the drawing area.
33
+ */
34
+ scale?: number;
35
+ }
36
+ export type UseGeoProjectionDefaultizedParameters = UseGeoProjectionParameters;
37
+ export interface UseGeoProjectionState {
38
+ geoProjection: {
39
+ geoData: ExtendedFeatureCollection | null;
40
+ projection: GeoProjectionInput | null;
41
+ translate: [number, number] | null;
42
+ rotate: [number, number] | null;
43
+ scale: number | null;
44
+ /**
45
+ * The two standard parallels used by conic projections, if applicable.
46
+ * Used for projection 'conicConformal', 'conicEqualArea', 'conicEquidistant'.
47
+ */
48
+ parallels?: [number, number] | null;
49
+ };
50
+ }
51
+ export type UseGeoProjectionSignature = ChartPluginSignature<{
52
+ params: UseGeoProjectionParameters;
53
+ defaultizedParams: UseGeoProjectionDefaultizedParameters;
54
+ state: UseGeoProjectionState;
55
+ }>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ export interface RadialLineHighlightPropsOverrides {}
@@ -0,0 +1 @@
1
+ export interface RadialLineHighlightPropsOverrides {}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,3 @@
1
1
  export * from '@mui/x-charts-pro/models';
2
- export * from "./seriesType/index.mjs";
2
+ export * from "./seriesType/index.mjs";
3
+ export * from "./chartsSlotsComponentsPropsPremium.mjs";
package/models/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@mui/x-charts-pro/models';
2
- export * from "./seriesType/index.js";
2
+ export * from "./seriesType/index.js";
3
+ export * from "./chartsSlotsComponentsPropsPremium.js";
package/models/index.js CHANGED
@@ -24,4 +24,15 @@ Object.keys(_seriesType).forEach(function (key) {
24
24
  return _seriesType[key];
25
25
  }
26
26
  });
27
+ });
28
+ var _chartsSlotsComponentsPropsPremium = require("./chartsSlotsComponentsPropsPremium");
29
+ Object.keys(_chartsSlotsComponentsPropsPremium).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _chartsSlotsComponentsPropsPremium[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function () {
35
+ return _chartsSlotsComponentsPropsPremium[key];
36
+ }
37
+ });
27
38
  });
package/models/index.mjs CHANGED
@@ -2,4 +2,5 @@
2
2
  export * from '@mui/x-charts-pro/models';
3
3
  // End of re-export-block
4
4
 
5
- export * from "./seriesType/index.mjs";
5
+ export * from "./seriesType/index.mjs";
6
+ export * from "./chartsSlotsComponentsPropsPremium.mjs";
@@ -1,4 +1,5 @@
1
1
  export * from "./rangeBar.mjs";
2
2
  export * from "./ohlc.mjs";
3
3
  export * from "./radialLine.mjs";
4
- export * from "./radialBar.mjs";
4
+ export * from "./radialBar.mjs";
5
+ export * from "./mapShape.mjs";
@@ -1,4 +1,5 @@
1
1
  export * from "./rangeBar.js";
2
2
  export * from "./ohlc.js";
3
3
  export * from "./radialLine.js";
4
- export * from "./radialBar.js";
4
+ export * from "./radialBar.js";
5
+ export * from "./mapShape.js";
@@ -46,4 +46,15 @@ Object.keys(_radialBar).forEach(function (key) {
46
46
  return _radialBar[key];
47
47
  }
48
48
  });
49
+ });
50
+ var _mapShape = require("./mapShape");
51
+ Object.keys(_mapShape).forEach(function (key) {
52
+ if (key === "default" || key === "__esModule") return;
53
+ if (key in exports && exports[key] === _mapShape[key]) return;
54
+ Object.defineProperty(exports, key, {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _mapShape[key];
58
+ }
59
+ });
49
60
  });
@@ -1,4 +1,5 @@
1
1
  export * from "./rangeBar.mjs";
2
2
  export * from "./ohlc.mjs";
3
3
  export * from "./radialLine.mjs";
4
- export * from "./radialBar.mjs";
4
+ export * from "./radialBar.mjs";
5
+ export * from "./mapShape.mjs";
@@ -0,0 +1,105 @@
1
+ import type { CommonSeriesType, CommonDefaultizedProps, SeriesId, DatasetElementType } from '@mui/x-charts/internals';
2
+ import type { DefaultizedProps } from '@mui/x-internals/types';
3
+ /**
4
+ * A single entry of a `mapShape` series.
5
+ *
6
+ * The `name` is used to join the entry to a feature in the chart's `geoData`
7
+ * (matching `feature.properties.name`).
8
+ */
9
+ export interface MapShapeValueType {
10
+ /**
11
+ * Identifies the GeoJSON feature this entry maps to, via `feature.properties.name`.
12
+ */
13
+ name: string;
14
+ /**
15
+ * Numeric value associated with the feature.
16
+ */
17
+ value?: number;
18
+ /**
19
+ * The value used to compute the color of the item through a color axis.
20
+ * Falls back to `value` when no `colorValue` is provided.
21
+ */
22
+ colorValue?: any;
23
+ /**
24
+ * Label used in legends and tooltips.
25
+ */
26
+ label?: string;
27
+ /**
28
+ * Color used for the item. Fallback on the series color if not defined.
29
+ */
30
+ color?: string;
31
+ }
32
+ export interface MapShapeSeriesType extends Omit<CommonSeriesType<'mapShape'>, 'valueFormatter'> {
33
+ type: 'mapShape';
34
+ /**
35
+ * The data points to render. Each entry is joined to a feature in `geoData`
36
+ * through its `name` property.
37
+ */
38
+ data?: ReadonlyArray<MapShapeValueType>;
39
+ /**
40
+ * The label to display on the tooltip or the legend. It can be a string or a function.
41
+ */
42
+ label?: string | ((location: 'tooltip' | 'legend') => string);
43
+ /**
44
+ * The id of the color axis used to compute the color of the shapes.
45
+ * It points to the id of an axis defined with the `zAxis` prop.
46
+ */
47
+ colorAxisId?: string;
48
+ /**
49
+ * A function to extract and transform the value from the `dataset` item.
50
+ * It receives the full dataset item and should return a map shape value.
51
+ * Can be used as an alternative to `datasetKeys`.
52
+ * @param {DatasetElementType<unknown>} item The full dataset item.
53
+ * @returns {MapShapeValueType} The transformed value.
54
+ */
55
+ valueGetter?: (item: DatasetElementType<unknown>) => MapShapeValueType;
56
+ /**
57
+ * The keys used to retrieve data from the dataset.
58
+ *
59
+ * When this prop is provided, `name` is required to match each entry with a
60
+ * GeoJSON feature. `label`, `value`, and `colorValue` are optional.
61
+ */
62
+ datasetKeys?: {
63
+ /**
64
+ * The key used to retrieve the feature name from the dataset.
65
+ */
66
+ name: string;
67
+ /**
68
+ * The key used to retrieve the item label from the dataset.
69
+ */
70
+ label?: string;
71
+ /**
72
+ * The key used to retrieve the item numeric value from the dataset.
73
+ */
74
+ value?: string;
75
+ /**
76
+ * The key used to retrieve the color value from the dataset.
77
+ */
78
+ colorValue?: string;
79
+ };
80
+ /**
81
+ * Formatter used to render values in tooltips or other data displays.
82
+ * @param {MapShapeValueType} value The data entry to format.
83
+ * @param {object} context The rendering context.
84
+ * @param {number} context.dataIndex The index of the data point in the series.
85
+ * @returns {string | null} The string to display, or `null` if the value should not be shown.
86
+ */
87
+ valueFormatter?: (value: MapShapeValueType, context: {
88
+ dataIndex: number;
89
+ }) => string | null;
90
+ }
91
+ /**
92
+ * Identifies a single item in a `mapShape` series.
93
+ */
94
+ export type MapShapeItemIdentifier = {
95
+ type: 'mapShape';
96
+ seriesId: SeriesId;
97
+ dataIndex: number;
98
+ };
99
+ export type DefaultizedMapShapeValueType = MapShapeValueType & {
100
+ hidden: boolean;
101
+ };
102
+ export interface DefaultizedMapShapeSeriesType extends Omit<DefaultizedProps<MapShapeSeriesType, CommonDefaultizedProps | 'color'>, 'data'> {
103
+ hidden: boolean;
104
+ data: ReadonlyArray<DefaultizedMapShapeValueType>;
105
+ }
@@ -0,0 +1,105 @@
1
+ import type { CommonSeriesType, CommonDefaultizedProps, SeriesId, DatasetElementType } from '@mui/x-charts/internals';
2
+ import type { DefaultizedProps } from '@mui/x-internals/types';
3
+ /**
4
+ * A single entry of a `mapShape` series.
5
+ *
6
+ * The `name` is used to join the entry to a feature in the chart's `geoData`
7
+ * (matching `feature.properties.name`).
8
+ */
9
+ export interface MapShapeValueType {
10
+ /**
11
+ * Identifies the GeoJSON feature this entry maps to, via `feature.properties.name`.
12
+ */
13
+ name: string;
14
+ /**
15
+ * Numeric value associated with the feature.
16
+ */
17
+ value?: number;
18
+ /**
19
+ * The value used to compute the color of the item through a color axis.
20
+ * Falls back to `value` when no `colorValue` is provided.
21
+ */
22
+ colorValue?: any;
23
+ /**
24
+ * Label used in legends and tooltips.
25
+ */
26
+ label?: string;
27
+ /**
28
+ * Color used for the item. Fallback on the series color if not defined.
29
+ */
30
+ color?: string;
31
+ }
32
+ export interface MapShapeSeriesType extends Omit<CommonSeriesType<'mapShape'>, 'valueFormatter'> {
33
+ type: 'mapShape';
34
+ /**
35
+ * The data points to render. Each entry is joined to a feature in `geoData`
36
+ * through its `name` property.
37
+ */
38
+ data?: ReadonlyArray<MapShapeValueType>;
39
+ /**
40
+ * The label to display on the tooltip or the legend. It can be a string or a function.
41
+ */
42
+ label?: string | ((location: 'tooltip' | 'legend') => string);
43
+ /**
44
+ * The id of the color axis used to compute the color of the shapes.
45
+ * It points to the id of an axis defined with the `zAxis` prop.
46
+ */
47
+ colorAxisId?: string;
48
+ /**
49
+ * A function to extract and transform the value from the `dataset` item.
50
+ * It receives the full dataset item and should return a map shape value.
51
+ * Can be used as an alternative to `datasetKeys`.
52
+ * @param {DatasetElementType<unknown>} item The full dataset item.
53
+ * @returns {MapShapeValueType} The transformed value.
54
+ */
55
+ valueGetter?: (item: DatasetElementType<unknown>) => MapShapeValueType;
56
+ /**
57
+ * The keys used to retrieve data from the dataset.
58
+ *
59
+ * When this prop is provided, `name` is required to match each entry with a
60
+ * GeoJSON feature. `label`, `value`, and `colorValue` are optional.
61
+ */
62
+ datasetKeys?: {
63
+ /**
64
+ * The key used to retrieve the feature name from the dataset.
65
+ */
66
+ name: string;
67
+ /**
68
+ * The key used to retrieve the item label from the dataset.
69
+ */
70
+ label?: string;
71
+ /**
72
+ * The key used to retrieve the item numeric value from the dataset.
73
+ */
74
+ value?: string;
75
+ /**
76
+ * The key used to retrieve the color value from the dataset.
77
+ */
78
+ colorValue?: string;
79
+ };
80
+ /**
81
+ * Formatter used to render values in tooltips or other data displays.
82
+ * @param {MapShapeValueType} value The data entry to format.
83
+ * @param {object} context The rendering context.
84
+ * @param {number} context.dataIndex The index of the data point in the series.
85
+ * @returns {string | null} The string to display, or `null` if the value should not be shown.
86
+ */
87
+ valueFormatter?: (value: MapShapeValueType, context: {
88
+ dataIndex: number;
89
+ }) => string | null;
90
+ }
91
+ /**
92
+ * Identifies a single item in a `mapShape` series.
93
+ */
94
+ export type MapShapeItemIdentifier = {
95
+ type: 'mapShape';
96
+ seriesId: SeriesId;
97
+ dataIndex: number;
98
+ };
99
+ export type DefaultizedMapShapeValueType = MapShapeValueType & {
100
+ hidden: boolean;
101
+ };
102
+ export interface DefaultizedMapShapeSeriesType extends Omit<DefaultizedProps<MapShapeSeriesType, CommonDefaultizedProps | 'color'>, 'data'> {
103
+ hidden: boolean;
104
+ data: ReadonlyArray<DefaultizedMapShapeValueType>;
105
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -11,7 +11,7 @@ export type OHLCValueType = [number, number, number, number];
11
11
  * The OHLC fields that can be formatted individually.
12
12
  */
13
13
  export type OHLCField = 'open' | 'high' | 'low' | 'close';
14
- export interface OHLCSeriesType extends Omit<CommonSeriesType<OHLCValueType | null, 'ohlc'>, 'valueFormatter'>, CartesianSeriesType {
14
+ export interface OHLCSeriesType extends Omit<CommonSeriesType<'ohlc'>, 'valueFormatter'>, CartesianSeriesType {
15
15
  type: 'ohlc';
16
16
  /**
17
17
  * The OHLC data points.
@@ -11,7 +11,7 @@ export type OHLCValueType = [number, number, number, number];
11
11
  * The OHLC fields that can be formatted individually.
12
12
  */
13
13
  export type OHLCField = 'open' | 'high' | 'low' | 'close';
14
- export interface OHLCSeriesType extends Omit<CommonSeriesType<OHLCValueType | null, 'ohlc'>, 'valueFormatter'>, CartesianSeriesType {
14
+ export interface OHLCSeriesType extends Omit<CommonSeriesType<'ohlc'>, 'valueFormatter'>, CartesianSeriesType {
15
15
  type: 'ohlc';
16
16
  /**
17
17
  * The OHLC data points.
@@ -1,7 +1,7 @@
1
1
  import type { CommonSeriesType, CommonBarSeriesType, RadialSeriesType, StackableSeriesType, SeriesId, CommonDefaultizedProps } from '@mui/x-charts/internals';
2
2
  import type { StackOffsetType } from '@mui/x-charts/models';
3
3
  import type { DefaultizedProps } from '@mui/x-internals/types';
4
- export interface RadialBarSeriesType extends CommonSeriesType<number | null, 'radialBar'>, RadialSeriesType, StackableSeriesType, CommonBarSeriesType {
4
+ export interface RadialBarSeriesType extends CommonSeriesType<'radialBar'>, RadialSeriesType, StackableSeriesType, CommonBarSeriesType {
5
5
  type: 'radialBar';
6
6
  /**
7
7
  * Defines how stacked series handle negative values.
@@ -1,7 +1,7 @@
1
1
  import type { CommonSeriesType, CommonBarSeriesType, RadialSeriesType, StackableSeriesType, SeriesId, CommonDefaultizedProps } from '@mui/x-charts/internals';
2
2
  import type { StackOffsetType } from '@mui/x-charts/models';
3
3
  import type { DefaultizedProps } from '@mui/x-internals/types';
4
- export interface RadialBarSeriesType extends CommonSeriesType<number | null, 'radialBar'>, RadialSeriesType, StackableSeriesType, CommonBarSeriesType {
4
+ export interface RadialBarSeriesType extends CommonSeriesType<'radialBar'>, RadialSeriesType, StackableSeriesType, CommonBarSeriesType {
5
5
  type: 'radialBar';
6
6
  /**
7
7
  * Defines how stacked series handle negative values.
@@ -1,7 +1,7 @@
1
1
  import type { CommonSeriesType, CommonLineSeriesType, RadialSeriesType, StackableSeriesType, SeriesId, CommonDefaultizedProps } from '@mui/x-charts/internals';
2
2
  import type { CurveType, StackOffsetType } from '@mui/x-charts/models';
3
3
  import type { DefaultizedProps } from '@mui/x-internals/types';
4
- export interface RadialLineSeriesType extends CommonSeriesType<number | null, 'line'>, RadialSeriesType, StackableSeriesType, CommonLineSeriesType {
4
+ export interface RadialLineSeriesType extends CommonSeriesType<'line'>, RadialSeriesType, StackableSeriesType, CommonLineSeriesType {
5
5
  type: 'radialLine';
6
6
  /**
7
7
  * Defines how stacked series handle negative values.
@@ -1,7 +1,7 @@
1
1
  import type { CommonSeriesType, CommonLineSeriesType, RadialSeriesType, StackableSeriesType, SeriesId, CommonDefaultizedProps } from '@mui/x-charts/internals';
2
2
  import type { CurveType, StackOffsetType } from '@mui/x-charts/models';
3
3
  import type { DefaultizedProps } from '@mui/x-internals/types';
4
- export interface RadialLineSeriesType extends CommonSeriesType<number | null, 'line'>, RadialSeriesType, StackableSeriesType, CommonLineSeriesType {
4
+ export interface RadialLineSeriesType extends CommonSeriesType<'line'>, RadialSeriesType, StackableSeriesType, CommonLineSeriesType {
5
5
  type: 'radialLine';
6
6
  /**
7
7
  * Defines how stacked series handle negative values.
@@ -2,7 +2,7 @@ import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSerie
2
2
  import { type DefaultizedProps } from '@mui/x-internals/types';
3
3
  /** [start, end] */
4
4
  export type RangeBarValueType = [number, number];
5
- export interface RangeBarSeriesType extends CommonSeriesType<RangeBarValueType | null, 'rangeBar'>, CartesianSeriesType {
5
+ export interface RangeBarSeriesType extends CommonSeriesType<'rangeBar'>, CartesianSeriesType {
6
6
  type: 'rangeBar';
7
7
  /**
8
8
  * Data associated to each range bar.
@@ -2,7 +2,7 @@ import { type CartesianSeriesType, type CommonDefaultizedProps, type CommonSerie
2
2
  import { type DefaultizedProps } from '@mui/x-internals/types';
3
3
  /** [start, end] */
4
4
  export type RangeBarValueType = [number, number];
5
- export interface RangeBarSeriesType extends CommonSeriesType<RangeBarValueType | null, 'rangeBar'>, CartesianSeriesType {
5
+ export interface RangeBarSeriesType extends CommonSeriesType<'rangeBar'>, CartesianSeriesType {
6
6
  type: 'rangeBar';
7
7
  /**
8
8
  * Data associated to each range bar.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-premium",
3
- "version": "9.3.0",
3
+ "version": "9.5.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Premium plan edition of the MUI X Charts components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -27,15 +27,15 @@
27
27
  "directory": "packages/x-charts-premium"
28
28
  },
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.29.2",
30
+ "@babel/runtime": "^7.29.7",
31
31
  "@mui/utils": "9.0.1",
32
32
  "clsx": "^2.1.1",
33
33
  "prop-types": "^15.8.1",
34
- "@mui/x-charts-vendor": "^9.0.0",
35
- "@mui/x-charts": "^9.3.0",
36
- "@mui/x-charts-pro": "^9.3.0",
34
+ "@mui/x-charts-vendor": "^9.4.0",
35
+ "@mui/x-charts-pro": "^9.5.0",
36
+ "@mui/x-license": "^9.4.0",
37
37
  "@mui/x-internals": "^9.1.0",
38
- "@mui/x-license": "^9.2.0"
38
+ "@mui/x-charts": "^9.5.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@emotion/react": "^11.9.0",
@@ -300,6 +300,20 @@
300
300
  "default": "./ChartsDataProviderPro/index.mjs"
301
301
  }
302
302
  },
303
+ "./ChartsGeoDataProviderPremium": {
304
+ "import": {
305
+ "types": "./ChartsGeoDataProviderPremium/index.d.mts",
306
+ "default": "./ChartsGeoDataProviderPremium/index.mjs"
307
+ },
308
+ "require": {
309
+ "types": "./ChartsGeoDataProviderPremium/index.d.ts",
310
+ "default": "./ChartsGeoDataProviderPremium/index.js"
311
+ },
312
+ "default": {
313
+ "types": "./ChartsGeoDataProviderPremium/index.d.mts",
314
+ "default": "./ChartsGeoDataProviderPremium/index.mjs"
315
+ }
316
+ },
303
317
  "./ChartsGrid": {
304
318
  "import": {
305
319
  "types": "./ChartsGrid/index.d.mts",
@@ -720,6 +734,20 @@
720
734
  "default": "./LineChartPro/index.mjs"
721
735
  }
722
736
  },
737
+ "./Map": {
738
+ "import": {
739
+ "types": "./Map/index.d.mts",
740
+ "default": "./Map/index.mjs"
741
+ },
742
+ "require": {
743
+ "types": "./Map/index.d.ts",
744
+ "default": "./Map/index.js"
745
+ },
746
+ "default": {
747
+ "types": "./Map/index.d.mts",
748
+ "default": "./Map/index.mjs"
749
+ }
750
+ },
723
751
  "./PieChart": {
724
752
  "import": {
725
753
  "types": "./PieChart/index.d.mts",
@@ -1,6 +1,6 @@
1
1
  import type { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
2
2
  import type { CommonHighlightScope, SeriesColor, SeriesId, ComputedXAxis, ComputedYAxis, PolarAxisDefaultized, ChartsRadiusAxisProps, ChartsRotationAxisProps } from '@mui/x-charts/internals';
3
- import type { RangeBarValueType, RangeBarSeriesType, DefaultizedOHLCSeriesType, OHLCItemIdentifier, OHLCSeriesType, OHLCValueType, RadialLineSeriesType, DefaultizedRadialLineSeriesType, RadialLineItemIdentifier, RadialBarSeriesType, DefaultizedRadialBarSeriesType, RadialBarItemIdentifier } from "../models/index.mjs";
3
+ import type { RangeBarValueType, RangeBarSeriesType, DefaultizedOHLCSeriesType, OHLCItemIdentifier, OHLCSeriesType, OHLCValueType, RadialLineSeriesType, DefaultizedRadialLineSeriesType, RadialLineItemIdentifier, RadialBarSeriesType, DefaultizedRadialBarSeriesType, RadialBarItemIdentifier, MapShapeSeriesType, DefaultizedMapShapeSeriesType, MapShapeItemIdentifier, MapShapeValueType } from "../models/index.mjs";
4
4
  import type { DefaultizedRangeBarSeriesType, RangeBarItemIdentifier } from "../models/seriesType/rangeBar.mjs";
5
5
  import type { BarSeries } from "../BarChart/index.mjs";
6
6
  declare module '@mui/x-charts/internals' {
@@ -75,6 +75,21 @@ declare module '@mui/x-charts/internals' {
75
75
  dataIndex?: number;
76
76
  };
77
77
  };
78
+ mapShape: {
79
+ seriesInput: DefaultizedProps<MapShapeSeriesType, 'id'> & MakeRequired<SeriesColor<MapShapeValueType>, 'color'>;
80
+ series: DefaultizedMapShapeSeriesType;
81
+ seriesLayout: {};
82
+ seriesProp: MapShapeSeriesType;
83
+ itemIdentifier: MapShapeItemIdentifier;
84
+ itemIdentifierWithData: MapShapeItemIdentifier;
85
+ valueType: MapShapeValueType;
86
+ highlightScope: CommonHighlightScope;
87
+ descriptionGetterParams: {
88
+ identifier: MapShapeItemIdentifier;
89
+ series: DefaultizedMapShapeSeriesType;
90
+ };
91
+ highlightIdentifier: MapShapeItemIdentifier;
92
+ };
78
93
  radialBar: {
79
94
  seriesInput: DefaultizedProps<RadialBarSeriesType, 'id'> & MakeRequired<SeriesColor<number | null>, 'color'>;
80
95
  series: DefaultizedRadialBarSeriesType;
@@ -1,6 +1,6 @@
1
1
  import type { DefaultizedProps, MakeRequired } from '@mui/x-internals/types';
2
2
  import type { CommonHighlightScope, SeriesColor, SeriesId, ComputedXAxis, ComputedYAxis, PolarAxisDefaultized, ChartsRadiusAxisProps, ChartsRotationAxisProps } from '@mui/x-charts/internals';
3
- import type { RangeBarValueType, RangeBarSeriesType, DefaultizedOHLCSeriesType, OHLCItemIdentifier, OHLCSeriesType, OHLCValueType, RadialLineSeriesType, DefaultizedRadialLineSeriesType, RadialLineItemIdentifier, RadialBarSeriesType, DefaultizedRadialBarSeriesType, RadialBarItemIdentifier } from "../models/index.js";
3
+ import type { RangeBarValueType, RangeBarSeriesType, DefaultizedOHLCSeriesType, OHLCItemIdentifier, OHLCSeriesType, OHLCValueType, RadialLineSeriesType, DefaultizedRadialLineSeriesType, RadialLineItemIdentifier, RadialBarSeriesType, DefaultizedRadialBarSeriesType, RadialBarItemIdentifier, MapShapeSeriesType, DefaultizedMapShapeSeriesType, MapShapeItemIdentifier, MapShapeValueType } from "../models/index.js";
4
4
  import type { DefaultizedRangeBarSeriesType, RangeBarItemIdentifier } from "../models/seriesType/rangeBar.js";
5
5
  import type { BarSeries } from "../BarChart/index.js";
6
6
  declare module '@mui/x-charts/internals' {
@@ -75,6 +75,21 @@ declare module '@mui/x-charts/internals' {
75
75
  dataIndex?: number;
76
76
  };
77
77
  };
78
+ mapShape: {
79
+ seriesInput: DefaultizedProps<MapShapeSeriesType, 'id'> & MakeRequired<SeriesColor<MapShapeValueType>, 'color'>;
80
+ series: DefaultizedMapShapeSeriesType;
81
+ seriesLayout: {};
82
+ seriesProp: MapShapeSeriesType;
83
+ itemIdentifier: MapShapeItemIdentifier;
84
+ itemIdentifierWithData: MapShapeItemIdentifier;
85
+ valueType: MapShapeValueType;
86
+ highlightScope: CommonHighlightScope;
87
+ descriptionGetterParams: {
88
+ identifier: MapShapeItemIdentifier;
89
+ series: DefaultizedMapShapeSeriesType;
90
+ };
91
+ highlightIdentifier: MapShapeItemIdentifier;
92
+ };
78
93
  radialBar: {
79
94
  seriesInput: DefaultizedProps<RadialBarSeriesType, 'id'> & MakeRequired<SeriesColor<number | null>, 'color'>;
80
95
  series: DefaultizedRadialBarSeriesType;