@mui/x-charts-premium 9.6.0 → 9.8.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 (329) hide show
  1. package/BarChartPremium/BarChartPremium.d.mts +4 -4
  2. package/BarChartPremium/BarChartPremium.d.ts +4 -4
  3. package/BarChartPremium/BarChartPremium.plugins.d.mts +2 -2
  4. package/BarChartPremium/BarChartPremium.plugins.d.ts +2 -2
  5. package/BarChartPremium/BarPlotPremium.d.mts +1 -1
  6. package/BarChartPremium/BarPlotPremium.d.ts +1 -1
  7. package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.mts +1 -1
  8. package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.ts +1 -1
  9. package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +2 -2
  10. package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +2 -2
  11. package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.mts +1 -1
  12. package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.ts +1 -1
  13. package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.mts +1 -1
  14. package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.ts +1 -1
  15. package/BarChartPremium/RangeBar/seriesConfig/extrema.d.mts +1 -1
  16. package/BarChartPremium/RangeBar/seriesConfig/extrema.d.ts +1 -1
  17. package/BarChartPremium/RangeBar/seriesConfig/getColor.d.mts +1 -1
  18. package/BarChartPremium/RangeBar/seriesConfig/getColor.d.ts +1 -1
  19. package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
  20. package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  21. package/BarChartPremium/RangeBar/seriesConfig/index.d.mts +1 -1
  22. package/BarChartPremium/RangeBar/seriesConfig/index.d.ts +1 -1
  23. package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  24. package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  25. package/BarChartPremium/RangeBar/seriesConfig/legend.d.mts +1 -1
  26. package/BarChartPremium/RangeBar/seriesConfig/legend.d.ts +1 -1
  27. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.mts +1 -1
  28. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.ts +1 -1
  29. package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.mts +1 -1
  30. package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.ts +1 -1
  31. package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.mts +1 -1
  32. package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.ts +1 -1
  33. package/BarChartPremium/RangeBar/useRangeBarPlotData.d.mts +4 -4
  34. package/BarChartPremium/RangeBar/useRangeBarPlotData.d.ts +4 -4
  35. package/BarChartPremium/useBarChartPremiumProps.d.mts +5 -5
  36. package/BarChartPremium/useBarChartPremiumProps.d.ts +5 -5
  37. package/BarChartPremium/webgl/BarWebGLProgram.d.mts +5 -6
  38. package/BarChartPremium/webgl/BarWebGLProgram.d.ts +5 -6
  39. package/BarChartPremium/webgl/BarWebGLProgram.js +24 -65
  40. package/BarChartPremium/webgl/BarWebGLProgram.mjs +24 -65
  41. package/BarChartPremium/webgl/shaders.d.mts +1 -1
  42. package/BarChartPremium/webgl/shaders.d.ts +1 -1
  43. package/BarChartPremium/webgl/shaders.js +2 -15
  44. package/BarChartPremium/webgl/shaders.mjs +3 -15
  45. package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +3 -3
  46. package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +3 -3
  47. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +3 -3
  48. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +3 -3
  49. package/CHANGELOG.md +241 -2
  50. package/CandlestickChart/CandlestickChart.d.mts +12 -12
  51. package/CandlestickChart/CandlestickChart.d.ts +12 -12
  52. package/CandlestickChart/CandlestickChart.plugins.d.mts +2 -2
  53. package/CandlestickChart/CandlestickChart.plugins.d.ts +2 -2
  54. package/CandlestickChart/CandlestickWebGLProgram.d.mts +1 -1
  55. package/CandlestickChart/CandlestickWebGLProgram.d.ts +1 -1
  56. package/CandlestickChart/checkCandlestickScaleErrors.d.mts +2 -2
  57. package/CandlestickChart/checkCandlestickScaleErrors.d.ts +2 -2
  58. package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.mts +1 -1
  59. package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.ts +1 -1
  60. package/CandlestickChart/seriesConfig/descriptionGetter.d.mts +1 -1
  61. package/CandlestickChart/seriesConfig/descriptionGetter.d.ts +1 -1
  62. package/CandlestickChart/seriesConfig/extrema.d.mts +1 -1
  63. package/CandlestickChart/seriesConfig/extrema.d.ts +1 -1
  64. package/CandlestickChart/seriesConfig/getColor.d.mts +1 -1
  65. package/CandlestickChart/seriesConfig/getColor.d.ts +1 -1
  66. package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
  67. package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  68. package/CandlestickChart/seriesConfig/index.d.mts +1 -1
  69. package/CandlestickChart/seriesConfig/index.d.ts +1 -1
  70. package/CandlestickChart/seriesConfig/legend.d.mts +1 -1
  71. package/CandlestickChart/seriesConfig/legend.d.ts +1 -1
  72. package/CandlestickChart/seriesConfig/seriesProcessor.d.mts +1 -1
  73. package/CandlestickChart/seriesConfig/seriesProcessor.d.ts +1 -1
  74. package/CandlestickChart/seriesConfig/tooltip.d.mts +1 -1
  75. package/CandlestickChart/seriesConfig/tooltip.d.ts +1 -1
  76. package/CandlestickChart/seriesConfig/tooltipPosition.d.mts +1 -1
  77. package/CandlestickChart/seriesConfig/tooltipPosition.d.ts +1 -1
  78. package/CandlestickChart/useCandlestickChartProps.d.mts +9 -9
  79. package/CandlestickChart/useCandlestickChartProps.d.ts +9 -9
  80. package/CandlestickChart/useCandlestickChartProps.mjs +0 -1
  81. package/CandlestickChart/useCandlestickPlotData.d.mts +3 -3
  82. package/CandlestickChart/useCandlestickPlotData.d.ts +3 -3
  83. package/ChartsContainerPremium/ChartsContainerPremium.d.mts +4 -4
  84. package/ChartsContainerPremium/ChartsContainerPremium.d.ts +4 -4
  85. package/ChartsContainerPremium/useChartsContainerPremiumProps.d.mts +2 -2
  86. package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +2 -2
  87. package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.mts +4 -4
  88. package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.ts +4 -4
  89. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  90. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +3 -4
  91. package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.mts +1 -1
  92. package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.ts +1 -1
  93. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +4 -4
  94. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +4 -4
  95. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +2 -2
  96. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +2 -2
  97. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +3 -3
  98. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +3 -3
  99. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +2 -2
  100. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +2 -2
  101. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.mts +4 -4
  102. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.ts +4 -4
  103. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  104. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  105. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.mts +3 -3
  106. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.ts +3 -3
  107. package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.mts +1 -1
  108. package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.ts +1 -1
  109. package/ChartsRenderer/colors.d.mts +1 -1
  110. package/ChartsRenderer/colors.d.ts +1 -1
  111. package/ChartsRenderer/configuration.d.mts +1 -1
  112. package/ChartsRenderer/configuration.d.ts +1 -1
  113. package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.mts +1 -1
  114. package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.ts +1 -1
  115. package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.mts +1 -1
  116. package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.ts +1 -1
  117. package/HeatmapPremium/HeatmapPlotPremium.d.mts +1 -1
  118. package/HeatmapPremium/HeatmapPlotPremium.d.ts +1 -1
  119. package/HeatmapPremium/HeatmapPremium.d.mts +1 -1
  120. package/HeatmapPremium/HeatmapPremium.d.ts +1 -1
  121. package/HeatmapPremium/HeatmapPremium.plugins.d.mts +2 -2
  122. package/HeatmapPremium/HeatmapPremium.plugins.d.ts +2 -2
  123. package/HeatmapPremium/useHeatmapPremiumProps.d.mts +2 -2
  124. package/HeatmapPremium/useHeatmapPremiumProps.d.ts +2 -2
  125. package/HeatmapPremium/webgl/HeatmapWebGLProgram.js +12 -37
  126. package/HeatmapPremium/webgl/HeatmapWebGLProgram.mjs +12 -37
  127. package/HeatmapPremium/webgl/shaders.d.mts +3 -3
  128. package/HeatmapPremium/webgl/shaders.d.ts +3 -3
  129. package/HeatmapPremium/webgl/shaders.js +12 -15
  130. package/HeatmapPremium/webgl/shaders.mjs +13 -15
  131. package/HeatmapPremium/webgl/useHeatmapPlotData.d.mts +3 -3
  132. package/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +3 -3
  133. package/HeatmapPremium/webgl/useHeatmapPlotData.js +3 -8
  134. package/HeatmapPremium/webgl/useHeatmapPlotData.mjs +3 -8
  135. package/Map/FocusedMapShape.js +5 -1
  136. package/Map/FocusedMapShape.mjs +5 -1
  137. package/Map/MapImagePlot.d.mts +39 -0
  138. package/Map/MapImagePlot.d.ts +39 -0
  139. package/Map/MapImagePlot.js +138 -0
  140. package/Map/MapImagePlot.mjs +132 -0
  141. package/Map/MapShape.d.mts +2 -2
  142. package/Map/MapShape.d.ts +2 -2
  143. package/Map/MapShape.js +6 -6
  144. package/Map/MapShape.mjs +6 -6
  145. package/Map/MapShapePlot.d.mts +8 -0
  146. package/Map/MapShapePlot.d.ts +8 -0
  147. package/Map/MapShapePlot.js +17 -5
  148. package/Map/MapShapePlot.mjs +17 -5
  149. package/Map/index.d.mts +2 -1
  150. package/Map/index.d.ts +2 -1
  151. package/Map/index.js +11 -0
  152. package/Map/index.mjs +1 -0
  153. package/Map/reprojectEquirectangularImage.d.mts +60 -0
  154. package/Map/reprojectEquirectangularImage.d.ts +60 -0
  155. package/Map/reprojectEquirectangularImage.js +116 -0
  156. package/Map/reprojectEquirectangularImage.mjs +110 -0
  157. package/Map/seriesConfig/descriptionGetter.d.mts +1 -1
  158. package/Map/seriesConfig/descriptionGetter.d.ts +1 -1
  159. package/Map/seriesConfig/descriptionGetter.js +5 -1
  160. package/Map/seriesConfig/descriptionGetter.mjs +5 -1
  161. package/Map/seriesConfig/getColor.js +18 -6
  162. package/Map/seriesConfig/getColor.mjs +18 -6
  163. package/Map/seriesConfig/highlight.d.mts +10 -0
  164. package/Map/seriesConfig/highlight.d.ts +10 -0
  165. package/Map/seriesConfig/highlight.js +52 -0
  166. package/Map/seriesConfig/highlight.mjs +45 -0
  167. package/Map/seriesConfig/identifierCleaner.d.mts +3 -0
  168. package/Map/seriesConfig/identifierCleaner.d.ts +3 -0
  169. package/Map/seriesConfig/identifierCleaner.js +14 -0
  170. package/Map/seriesConfig/identifierCleaner.mjs +8 -0
  171. package/Map/seriesConfig/identifierSerializer.d.mts +3 -0
  172. package/Map/seriesConfig/identifierSerializer.d.ts +3 -0
  173. package/Map/seriesConfig/identifierSerializer.js +12 -0
  174. package/Map/seriesConfig/identifierSerializer.mjs +6 -0
  175. package/Map/seriesConfig/index.d.mts +1 -1
  176. package/Map/seriesConfig/index.d.ts +1 -1
  177. package/Map/seriesConfig/index.js +8 -6
  178. package/Map/seriesConfig/index.mjs +7 -5
  179. package/Map/seriesConfig/keyboardFocusHandler.d.mts +1 -7
  180. package/Map/seriesConfig/keyboardFocusHandler.d.ts +1 -7
  181. package/Map/seriesConfig/keyboardFocusHandler.js +40 -7
  182. package/Map/seriesConfig/keyboardFocusHandler.mjs +41 -8
  183. package/Map/seriesConfig/legend.d.mts +1 -1
  184. package/Map/seriesConfig/legend.d.ts +1 -1
  185. package/Map/seriesConfig/seriesProcessor.d.mts +1 -1
  186. package/Map/seriesConfig/seriesProcessor.d.ts +1 -1
  187. package/Map/seriesConfig/seriesProcessor.js +11 -2
  188. package/Map/seriesConfig/seriesProcessor.mjs +11 -2
  189. package/Map/seriesConfig/tooltip.d.mts +1 -1
  190. package/Map/seriesConfig/tooltip.d.ts +1 -1
  191. package/Map/seriesConfig/tooltip.js +8 -4
  192. package/Map/seriesConfig/tooltip.mjs +8 -4
  193. package/Map/seriesConfig/tooltipPosition.d.mts +8 -3
  194. package/Map/seriesConfig/tooltipPosition.d.ts +8 -3
  195. package/Map/seriesConfig/tooltipPosition.js +21 -27
  196. package/Map/seriesConfig/tooltipPosition.mjs +22 -27
  197. package/RadialBarChart/RadialBarChart.d.mts +10 -10
  198. package/RadialBarChart/RadialBarChart.d.ts +10 -10
  199. package/RadialBarChart/RadialBarChart.plugins.d.mts +2 -2
  200. package/RadialBarChart/RadialBarChart.plugins.d.ts +2 -2
  201. package/RadialBarChart/RadialBarElement.d.mts +2 -2
  202. package/RadialBarChart/RadialBarElement.d.ts +2 -2
  203. package/RadialBarChart/seriesConfig/descriptionGetter.d.mts +1 -1
  204. package/RadialBarChart/seriesConfig/descriptionGetter.d.ts +1 -1
  205. package/RadialBarChart/seriesConfig/extremums.d.mts +1 -1
  206. package/RadialBarChart/seriesConfig/extremums.d.ts +1 -1
  207. package/RadialBarChart/seriesConfig/getColor.d.mts +1 -1
  208. package/RadialBarChart/seriesConfig/getColor.d.ts +1 -1
  209. package/RadialBarChart/seriesConfig/getItemAtPosition.d.mts +1 -1
  210. package/RadialBarChart/seriesConfig/getItemAtPosition.d.ts +1 -1
  211. package/RadialBarChart/seriesConfig/index.d.mts +1 -1
  212. package/RadialBarChart/seriesConfig/index.d.ts +1 -1
  213. package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  214. package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  215. package/RadialBarChart/seriesConfig/tooltip.d.mts +1 -1
  216. package/RadialBarChart/seriesConfig/tooltip.d.ts +1 -1
  217. package/RadialBarChart/useRadialBarChartProps.d.mts +6 -6
  218. package/RadialBarChart/useRadialBarChartProps.d.ts +6 -6
  219. package/RadialBarChart/useRadialBarPlotData.d.mts +1 -1
  220. package/RadialBarChart/useRadialBarPlotData.d.ts +1 -1
  221. package/RadialBarChart/useRadialBarPlotData.js +4 -1
  222. package/RadialBarChart/useRadialBarPlotData.mjs +3 -1
  223. package/RadialLineChart/RadialArea.d.mts +1 -1
  224. package/RadialLineChart/RadialArea.d.ts +1 -1
  225. package/RadialLineChart/RadialAreaPlot.d.mts +1 -1
  226. package/RadialLineChart/RadialAreaPlot.d.ts +1 -1
  227. package/RadialLineChart/RadialLine.d.mts +2 -2
  228. package/RadialLineChart/RadialLine.d.ts +2 -2
  229. package/RadialLineChart/RadialLineChart.d.mts +10 -10
  230. package/RadialLineChart/RadialLineChart.d.ts +10 -10
  231. package/RadialLineChart/RadialLineChart.plugins.d.mts +2 -2
  232. package/RadialLineChart/RadialLineChart.plugins.d.ts +2 -2
  233. package/RadialLineChart/RadialLineHighlightElement.d.mts +1 -1
  234. package/RadialLineChart/RadialLineHighlightElement.d.ts +1 -1
  235. package/RadialLineChart/RadialLineHighlightPlot.d.mts +2 -2
  236. package/RadialLineChart/RadialLineHighlightPlot.d.ts +2 -2
  237. package/RadialLineChart/RadialLinePlot.d.mts +1 -1
  238. package/RadialLineChart/RadialLinePlot.d.ts +1 -1
  239. package/RadialLineChart/RadialMarkPlot.d.mts +1 -1
  240. package/RadialLineChart/RadialMarkPlot.d.ts +1 -1
  241. package/RadialLineChart/seriesConfig/descriptionGetter.d.mts +1 -1
  242. package/RadialLineChart/seriesConfig/descriptionGetter.d.ts +1 -1
  243. package/RadialLineChart/seriesConfig/extremums.d.mts +1 -1
  244. package/RadialLineChart/seriesConfig/extremums.d.ts +1 -1
  245. package/RadialLineChart/seriesConfig/getColor.d.mts +1 -1
  246. package/RadialLineChart/seriesConfig/getColor.d.ts +1 -1
  247. package/RadialLineChart/seriesConfig/getItemAtPosition.d.mts +1 -1
  248. package/RadialLineChart/seriesConfig/getItemAtPosition.d.ts +1 -1
  249. package/RadialLineChart/seriesConfig/getItemAtPosition.mjs +1 -2
  250. package/RadialLineChart/seriesConfig/index.d.mts +1 -1
  251. package/RadialLineChart/seriesConfig/index.d.ts +1 -1
  252. package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  253. package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  254. package/RadialLineChart/seriesConfig/legend.d.mts +1 -1
  255. package/RadialLineChart/seriesConfig/legend.d.ts +1 -1
  256. package/RadialLineChart/seriesConfig/seriesProcessor.d.mts +1 -1
  257. package/RadialLineChart/seriesConfig/seriesProcessor.d.ts +1 -1
  258. package/RadialLineChart/seriesConfig/tooltip.d.mts +1 -1
  259. package/RadialLineChart/seriesConfig/tooltip.d.ts +1 -1
  260. package/RadialLineChart/useRadialLineChartProps.d.mts +7 -7
  261. package/RadialLineChart/useRadialLineChartProps.d.ts +7 -7
  262. package/RadialLineChart/useRadialLinePlotData.d.mts +1 -1
  263. package/RadialLineChart/useRadialLinePlotData.d.ts +1 -1
  264. package/ScatterChartPremium/ScatterChartPremium.d.mts +6 -6
  265. package/ScatterChartPremium/ScatterChartPremium.d.ts +6 -6
  266. package/ScatterChartPremium/ScatterChartPremium.plugins.d.mts +1 -1
  267. package/ScatterChartPremium/ScatterChartPremium.plugins.d.ts +1 -1
  268. package/ScatterChartPremium/ScatterPlotPremium.d.mts +1 -1
  269. package/ScatterChartPremium/ScatterPlotPremium.d.ts +1 -1
  270. package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.mts +1 -3
  271. package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.ts +1 -3
  272. package/ScatterChartPremium/webgl/ScatterWebGLProgram.js +23 -81
  273. package/ScatterChartPremium/webgl/ScatterWebGLProgram.mjs +23 -81
  274. package/context/useChartPremiumApiContext.d.mts +1 -1
  275. package/context/useChartPremiumApiContext.d.ts +1 -1
  276. package/hooks/animation/useAnimateRangeBar.d.mts +1 -1
  277. package/hooks/animation/useAnimateRangeBar.d.ts +1 -1
  278. package/hooks/useChartPremiumApiRef.d.mts +4 -4
  279. package/hooks/useChartPremiumApiRef.d.ts +4 -4
  280. package/hooks/useGeoData.d.mts +1 -1
  281. package/hooks/useGeoData.d.ts +1 -1
  282. package/hooks/useGeoData.mjs +0 -1
  283. package/hooks/useGeoFeatureIndexesByName.mjs +0 -1
  284. package/hooks/useGeoPath.d.mts +1 -1
  285. package/hooks/useGeoPath.d.ts +1 -1
  286. package/hooks/useGeoPath.mjs +0 -1
  287. package/hooks/useMapShapeSeries.d.mts +2 -2
  288. package/hooks/useMapShapeSeries.d.ts +2 -2
  289. package/hooks/useOHLCSeries.d.mts +2 -2
  290. package/hooks/useOHLCSeries.d.ts +2 -2
  291. package/hooks/useRadialLineSeries.d.mts +2 -2
  292. package/hooks/useRadialLineSeries.d.ts +2 -2
  293. package/hooks/useRangeBarSeries.d.mts +2 -2
  294. package/hooks/useRangeBarSeries.d.ts +2 -2
  295. package/index.js +1 -1
  296. package/index.mjs +1 -1
  297. package/internals/createGetVisibleCoordinate.d.mts +14 -0
  298. package/internals/createGetVisibleCoordinate.d.ts +14 -0
  299. package/internals/createGetVisibleCoordinate.js +66 -0
  300. package/internals/createGetVisibleCoordinate.mjs +60 -0
  301. package/internals/plugins/allPlugins.d.mts +2 -2
  302. package/internals/plugins/allPlugins.d.ts +2 -2
  303. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +1 -1
  304. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +1 -1
  305. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +1 -1
  306. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +1 -1
  307. package/models/seriesType/mapShape.d.mts +2 -1
  308. package/models/seriesType/mapShape.d.ts +2 -1
  309. package/models/seriesType/ohlc.d.mts +2 -2
  310. package/models/seriesType/ohlc.d.ts +2 -2
  311. package/models/seriesType/rangeBar.d.mts +2 -2
  312. package/models/seriesType/rangeBar.d.ts +2 -2
  313. package/moduleAugmentation/rangeBarOnClick.d.mts +1 -1
  314. package/moduleAugmentation/rangeBarOnClick.d.ts +1 -1
  315. package/package.json +6 -6
  316. package/plugins/selectors/useChartCandlestickPosition.selectors.d.mts +1 -1
  317. package/plugins/selectors/useChartCandlestickPosition.selectors.d.ts +1 -1
  318. package/utils/webgl/glsl.d.mts +15 -0
  319. package/utils/webgl/glsl.d.ts +15 -0
  320. package/utils/webgl/glsl.js +34 -0
  321. package/utils/webgl/glsl.mjs +28 -0
  322. package/utils/webgl/instancedAttribute.d.mts +28 -0
  323. package/utils/webgl/instancedAttribute.d.ts +28 -0
  324. package/utils/webgl/instancedAttribute.js +57 -0
  325. package/utils/webgl/instancedAttribute.mjs +50 -0
  326. package/utils/webgl/utils.d.mts +21 -2
  327. package/utils/webgl/utils.d.ts +21 -2
  328. package/utils/webgl/utils.js +44 -8
  329. package/utils/webgl/utils.mjs +41 -7
@@ -0,0 +1,60 @@
1
+ import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
2
+ export interface ReprojectEquirectangularImageParams {
3
+ /**
4
+ * A fully-loaded image whose pixels are in the equirectangular (plate carrée)
5
+ * projection — longitude maps linearly to x, latitude linearly to y.
6
+ */
7
+ image: HTMLImageElement;
8
+ /**
9
+ * The chart projection. Must expose `invert`; otherwise reprojection is impossible.
10
+ */
11
+ projection: GeoProjection;
12
+ /**
13
+ * The chart drawing area, in SVG coordinates. `left`/`top` are the offset of the
14
+ * drawing area inside the SVG, which the projection already accounts for.
15
+ */
16
+ area: {
17
+ left: number;
18
+ top: number;
19
+ width: number;
20
+ height: number;
21
+ };
22
+ /**
23
+ * Geographic extent the source image covers, as `[[west, south], [east, north]]`
24
+ * in degrees. `west > east` is allowed and means the range wraps across the antimeridian.
25
+ */
26
+ imageBounds: [[number, number], [number, number]];
27
+ }
28
+ /**
29
+ * Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
30
+ * returning the result as a PNG data URL (or `null` when it cannot be produced).
31
+ *
32
+ * ### Why inverse mapping
33
+ *
34
+ * Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
35
+ * because the mapping is non-linear and area-distorting. Instead we walk every
36
+ * *destination* pixel and pull the color it should show from the source — inverse
37
+ * (destination-to-source) resampling, which fills the output exactly once.
38
+ *
39
+ * ### Algorithm
40
+ *
41
+ * For each destination pixel `(px, py)` of the drawing area:
42
+ *
43
+ * 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
44
+ * `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
45
+ * `null` for pixels outside the visible map (post-clip and the spherical
46
+ * round-trip), leaving them transparent.
47
+ * 2. Discard coordinates outside `imageBounds` (no source data there).
48
+ * 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
49
+ * being equirectangular, both axes are linear) and copy its RGBA.
50
+ *
51
+ * ### Failure modes
52
+ *
53
+ * Returns `null` when a 2D canvas context is unavailable, or when reading the
54
+ * source pixels throws because a cross-origin image without CORS headers has
55
+ * tainted the canvas.
56
+ *
57
+ * Complexity is `O(width × height)`; callers should treat it as a per-resize
58
+ * computation rather than a per-frame one.
59
+ */
60
+ export declare function reprojectEquirectangularImage(params: ReprojectEquirectangularImageParams): string | null;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.reprojectEquirectangularImage = reprojectEquirectangularImage;
7
+ var _createGetVisibleCoordinate = require("../internals/createGetVisibleCoordinate");
8
+ /**
9
+ * Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
10
+ * returning the result as a PNG data URL (or `null` when it cannot be produced).
11
+ *
12
+ * ### Why inverse mapping
13
+ *
14
+ * Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
15
+ * because the mapping is non-linear and area-distorting. Instead we walk every
16
+ * *destination* pixel and pull the color it should show from the source — inverse
17
+ * (destination-to-source) resampling, which fills the output exactly once.
18
+ *
19
+ * ### Algorithm
20
+ *
21
+ * For each destination pixel `(px, py)` of the drawing area:
22
+ *
23
+ * 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
24
+ * `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
25
+ * `null` for pixels outside the visible map (post-clip and the spherical
26
+ * round-trip), leaving them transparent.
27
+ * 2. Discard coordinates outside `imageBounds` (no source data there).
28
+ * 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
29
+ * being equirectangular, both axes are linear) and copy its RGBA.
30
+ *
31
+ * ### Failure modes
32
+ *
33
+ * Returns `null` when a 2D canvas context is unavailable, or when reading the
34
+ * source pixels throws because a cross-origin image without CORS headers has
35
+ * tainted the canvas.
36
+ *
37
+ * Complexity is `O(width × height)`; callers should treat it as a per-resize
38
+ * computation rather than a per-frame one.
39
+ */
40
+ function reprojectEquirectangularImage(params) {
41
+ const {
42
+ image,
43
+ projection,
44
+ area,
45
+ imageBounds
46
+ } = params;
47
+ if (typeof projection.invert !== 'function') {
48
+ return null;
49
+ }
50
+ const getVisibleCoordinate = (0, _createGetVisibleCoordinate.createGetVisibleCoordinate)(projection);
51
+ const {
52
+ left,
53
+ top
54
+ } = area;
55
+ const outWidth = Math.max(1, Math.round(area.width));
56
+ const outHeight = Math.max(1, Math.round(area.height));
57
+ const [[west, south], [east, north]] = imageBounds;
58
+ const source = document.createElement('canvas');
59
+ source.width = image.naturalWidth;
60
+ source.height = image.naturalHeight;
61
+ const sourceCtx = source.getContext('2d');
62
+ const output = document.createElement('canvas');
63
+ output.width = outWidth;
64
+ output.height = outHeight;
65
+ const outputCtx = output.getContext('2d');
66
+ if (!sourceCtx || !outputCtx) {
67
+ return null;
68
+ }
69
+ sourceCtx.drawImage(image, 0, 0);
70
+ let sourcePixels;
71
+ try {
72
+ sourcePixels = sourceCtx.getImageData(0, 0, source.width, source.height);
73
+ } catch {
74
+ // Cross-origin image without CORS taints the canvas: bail out.
75
+ return null;
76
+ }
77
+ const sourceWidth = source.width;
78
+ const sourceHeight = source.height;
79
+ const target = outputCtx.createImageData(outWidth, outHeight);
80
+
81
+ // `west > east` means the source wraps across the antimeridian (e.g. 170°E..-170°E).
82
+ const lonWraps = east < west;
83
+ const lonSpan = lonWraps ? east - west + 360 : east - west;
84
+ for (let py = 0; py < outHeight; py += 1) {
85
+ for (let px = 0; px < outWidth; px += 1) {
86
+ // 1. Destination pixel -> geographic coordinate, or skip if not on the map.
87
+ const coordinates = getVisibleCoordinate([left + px, top + py]);
88
+ if (!coordinates) {
89
+ continue;
90
+ }
91
+ const [lon, lat] = coordinates;
92
+
93
+ // 2. Outside the source image extent: nothing to sample.
94
+ const insideLon = lonWraps ? lon >= west || lon <= east : lon >= west && lon <= east;
95
+ if (!insideLon || lat < south || lat > north) {
96
+ continue;
97
+ }
98
+
99
+ // 3. Geographic coordinate -> source pixel (nearest neighbor). When the
100
+ // bounds wrap, longitudes past the antimeridian are offset by a full turn.
101
+ const lonOffset = lonWraps && lon <= east ? lon - west + 360 : lon - west;
102
+ let sx = Math.floor(lonOffset / lonSpan * sourceWidth);
103
+ let sy = Math.floor((north - lat) / (north - south) * sourceHeight);
104
+ sx = Math.min(Math.max(sx, 0), sourceWidth - 1);
105
+ sy = Math.min(Math.max(sy, 0), sourceHeight - 1);
106
+ const sourceIndex = (sy * sourceWidth + sx) * 4;
107
+ const targetIndex = (py * outWidth + px) * 4;
108
+ target.data[targetIndex] = sourcePixels.data[sourceIndex];
109
+ target.data[targetIndex + 1] = sourcePixels.data[sourceIndex + 1];
110
+ target.data[targetIndex + 2] = sourcePixels.data[sourceIndex + 2];
111
+ target.data[targetIndex + 3] = sourcePixels.data[sourceIndex + 3];
112
+ }
113
+ }
114
+ outputCtx.putImageData(target, 0, 0);
115
+ return output.toDataURL();
116
+ }
@@ -0,0 +1,110 @@
1
+ import { createGetVisibleCoordinate } from "../internals/createGetVisibleCoordinate.mjs";
2
+ /**
3
+ * Warps an equirectangular raster so it matches an arbitrary d3-geo `projection`,
4
+ * returning the result as a PNG data URL (or `null` when it cannot be produced).
5
+ *
6
+ * ### Why inverse mapping
7
+ *
8
+ * Forward-projecting each *source* pixel to the screen leaves holes and overlaps,
9
+ * because the mapping is non-linear and area-distorting. Instead we walk every
10
+ * *destination* pixel and pull the color it should show from the source — inverse
11
+ * (destination-to-source) resampling, which fills the output exactly once.
12
+ *
13
+ * ### Algorithm
14
+ *
15
+ * For each destination pixel `(px, py)` of the drawing area:
16
+ *
17
+ * 1. Convert it to SVG coordinates `(left + px, top + py)` and resolve it to a
18
+ * `[lon, lat]` coordinate with {@link createVisibleCoordinate}, which returns
19
+ * `null` for pixels outside the visible map (post-clip and the spherical
20
+ * round-trip), leaving them transparent.
21
+ * 2. Discard coordinates outside `imageBounds` (no source data there).
22
+ * 3. Map `[lon, lat]` to a source pixel with nearest-neighbor sampling (the image
23
+ * being equirectangular, both axes are linear) and copy its RGBA.
24
+ *
25
+ * ### Failure modes
26
+ *
27
+ * Returns `null` when a 2D canvas context is unavailable, or when reading the
28
+ * source pixels throws because a cross-origin image without CORS headers has
29
+ * tainted the canvas.
30
+ *
31
+ * Complexity is `O(width × height)`; callers should treat it as a per-resize
32
+ * computation rather than a per-frame one.
33
+ */
34
+ export function reprojectEquirectangularImage(params) {
35
+ const {
36
+ image,
37
+ projection,
38
+ area,
39
+ imageBounds
40
+ } = params;
41
+ if (typeof projection.invert !== 'function') {
42
+ return null;
43
+ }
44
+ const getVisibleCoordinate = createGetVisibleCoordinate(projection);
45
+ const {
46
+ left,
47
+ top
48
+ } = area;
49
+ const outWidth = Math.max(1, Math.round(area.width));
50
+ const outHeight = Math.max(1, Math.round(area.height));
51
+ const [[west, south], [east, north]] = imageBounds;
52
+ const source = document.createElement('canvas');
53
+ source.width = image.naturalWidth;
54
+ source.height = image.naturalHeight;
55
+ const sourceCtx = source.getContext('2d');
56
+ const output = document.createElement('canvas');
57
+ output.width = outWidth;
58
+ output.height = outHeight;
59
+ const outputCtx = output.getContext('2d');
60
+ if (!sourceCtx || !outputCtx) {
61
+ return null;
62
+ }
63
+ sourceCtx.drawImage(image, 0, 0);
64
+ let sourcePixels;
65
+ try {
66
+ sourcePixels = sourceCtx.getImageData(0, 0, source.width, source.height);
67
+ } catch {
68
+ // Cross-origin image without CORS taints the canvas: bail out.
69
+ return null;
70
+ }
71
+ const sourceWidth = source.width;
72
+ const sourceHeight = source.height;
73
+ const target = outputCtx.createImageData(outWidth, outHeight);
74
+
75
+ // `west > east` means the source wraps across the antimeridian (e.g. 170°E..-170°E).
76
+ const lonWraps = east < west;
77
+ const lonSpan = lonWraps ? east - west + 360 : east - west;
78
+ for (let py = 0; py < outHeight; py += 1) {
79
+ for (let px = 0; px < outWidth; px += 1) {
80
+ // 1. Destination pixel -> geographic coordinate, or skip if not on the map.
81
+ const coordinates = getVisibleCoordinate([left + px, top + py]);
82
+ if (!coordinates) {
83
+ continue;
84
+ }
85
+ const [lon, lat] = coordinates;
86
+
87
+ // 2. Outside the source image extent: nothing to sample.
88
+ const insideLon = lonWraps ? lon >= west || lon <= east : lon >= west && lon <= east;
89
+ if (!insideLon || lat < south || lat > north) {
90
+ continue;
91
+ }
92
+
93
+ // 3. Geographic coordinate -> source pixel (nearest neighbor). When the
94
+ // bounds wrap, longitudes past the antimeridian are offset by a full turn.
95
+ const lonOffset = lonWraps && lon <= east ? lon - west + 360 : lon - west;
96
+ let sx = Math.floor(lonOffset / lonSpan * sourceWidth);
97
+ let sy = Math.floor((north - lat) / (north - south) * sourceHeight);
98
+ sx = Math.min(Math.max(sx, 0), sourceWidth - 1);
99
+ sy = Math.min(Math.max(sy, 0), sourceHeight - 1);
100
+ const sourceIndex = (sy * sourceWidth + sx) * 4;
101
+ const targetIndex = (py * outWidth + px) * 4;
102
+ target.data[targetIndex] = sourcePixels.data[sourceIndex];
103
+ target.data[targetIndex + 1] = sourcePixels.data[sourceIndex + 1];
104
+ target.data[targetIndex + 2] = sourcePixels.data[sourceIndex + 2];
105
+ target.data[targetIndex + 3] = sourcePixels.data[sourceIndex + 3];
106
+ }
107
+ }
108
+ outputCtx.putImageData(target, 0, 0);
109
+ return output.toDataURL();
110
+ }
@@ -1,3 +1,3 @@
1
- import { type DescriptionGetter } from '@mui/x-charts/internals';
1
+ import type { DescriptionGetter } from '@mui/x-charts/internals';
2
2
  declare const descriptionGetter: DescriptionGetter<'mapShape'>;
3
3
  export default descriptionGetter;
@@ -1,3 +1,3 @@
1
- import { type DescriptionGetter } from '@mui/x-charts/internals';
1
+ import type { DescriptionGetter } from '@mui/x-charts/internals';
2
2
  declare const descriptionGetter: DescriptionGetter<'mapShape'>;
3
3
  export default descriptionGetter;
@@ -9,7 +9,11 @@ const descriptionGetter = ({
9
9
  identifier,
10
10
  series
11
11
  }) => {
12
- const item = series.data[identifier.dataIndex];
12
+ const itemIndex = series.lookupByName.get(identifier.name);
13
+ if (itemIndex === undefined) {
14
+ return '';
15
+ }
16
+ const item = series.data[itemIndex];
13
17
  if (!item) {
14
18
  return '';
15
19
  }
@@ -3,7 +3,11 @@ const descriptionGetter = ({
3
3
  identifier,
4
4
  series
5
5
  }) => {
6
- const item = series.data[identifier.dataIndex];
6
+ const itemIndex = series.lookupByName.get(identifier.name);
7
+ if (itemIndex === undefined) {
8
+ return '';
9
+ }
10
+ const item = series.data[itemIndex];
7
11
  if (!item) {
8
12
  return '';
9
13
  }
@@ -7,11 +7,18 @@ exports.default = void 0;
7
7
  const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
8
8
  const colorScale = zAxis?.colorScale;
9
9
  if (colorScale) {
10
- return dataIndex => {
11
- if (dataIndex == null) {
10
+ return name => {
11
+ if (name == null) {
12
+ return series.color;
13
+ }
14
+ const itemIndex = series.lookupByName.get(name);
15
+ if (itemIndex === undefined) {
16
+ return series.color;
17
+ }
18
+ const item = series.data[itemIndex];
19
+ if (item === undefined) {
12
20
  return series.color;
13
21
  }
14
- const item = series.data[dataIndex];
15
22
  if (item.color !== undefined) {
16
23
  return item.color;
17
24
  }
@@ -20,11 +27,16 @@ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
20
27
  return color;
21
28
  };
22
29
  }
23
- return dataIndex => {
24
- if (dataIndex == null) {
30
+ return name => {
31
+ if (name == null) {
32
+ return series.color;
33
+ }
34
+ const itemIndex = series.lookupByName.get(name);
35
+ if (itemIndex === undefined) {
25
36
  return series.color;
26
37
  }
27
- return series.data[dataIndex].color ?? series.color;
38
+ const item = series.data[itemIndex];
39
+ return item?.color ?? series.color;
28
40
  };
29
41
  };
30
42
  var _default = exports.default = getColor;
@@ -1,11 +1,18 @@
1
1
  const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
2
2
  const colorScale = zAxis?.colorScale;
3
3
  if (colorScale) {
4
- return dataIndex => {
5
- if (dataIndex == null) {
4
+ return name => {
5
+ if (name == null) {
6
+ return series.color;
7
+ }
8
+ const itemIndex = series.lookupByName.get(name);
9
+ if (itemIndex === undefined) {
10
+ return series.color;
11
+ }
12
+ const item = series.data[itemIndex];
13
+ if (item === undefined) {
6
14
  return series.color;
7
15
  }
8
- const item = series.data[dataIndex];
9
16
  if (item.color !== undefined) {
10
17
  return item.color;
11
18
  }
@@ -14,11 +21,16 @@ const getColor = (series, _mainAxis, _secondaryAxis, zAxis) => {
14
21
  return color;
15
22
  };
16
23
  }
17
- return dataIndex => {
18
- if (dataIndex == null) {
24
+ return name => {
25
+ if (name == null) {
26
+ return series.color;
27
+ }
28
+ const itemIndex = series.lookupByName.get(name);
29
+ if (itemIndex === undefined) {
19
30
  return series.color;
20
31
  }
21
- return series.data[dataIndex].color ?? series.color;
32
+ const item = series.data[itemIndex];
33
+ return item?.color ?? series.color;
22
34
  };
23
35
  };
24
36
  export default getColor;
@@ -0,0 +1,10 @@
1
+ import type { HighlightScope } from '@mui/x-charts/context';
2
+ import type { HighlightItemIdentifier } from '@mui/x-charts/models';
3
+ /**
4
+ * The isHighlighted logic for main charts (those that are identified by an id and a name)
5
+ */
6
+ export declare function createIsHighlighted(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
7
+ /**
8
+ * The isFade logic for main charts (those that are identified by an id and a name)
9
+ */
10
+ export declare function createIsFaded(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
@@ -0,0 +1,10 @@
1
+ import type { HighlightScope } from '@mui/x-charts/context';
2
+ import type { HighlightItemIdentifier } from '@mui/x-charts/models';
3
+ /**
4
+ * The isHighlighted logic for main charts (those that are identified by an id and a name)
5
+ */
6
+ export declare function createIsHighlighted(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
7
+ /**
8
+ * The isFade logic for main charts (those that are identified by an id and a name)
9
+ */
10
+ export declare function createIsFaded(highlightScope: HighlightScope<'mapShape'> | null | undefined, highlightedItem: HighlightItemIdentifier<'mapShape'> | null): (item: HighlightItemIdentifier<"mapShape"> | null) => boolean;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createIsFaded = createIsFaded;
7
+ exports.createIsHighlighted = createIsHighlighted;
8
+ function alwaysFalse() {
9
+ return false;
10
+ }
11
+
12
+ /**
13
+ * The isHighlighted logic for main charts (those that are identified by an id and a name)
14
+ */
15
+ function createIsHighlighted(highlightScope, highlightedItem) {
16
+ if (!highlightScope || !highlightedItem) {
17
+ return alwaysFalse;
18
+ }
19
+ return function isHighlighted(item) {
20
+ if (!item) {
21
+ return false;
22
+ }
23
+ if (highlightScope.highlight === 'series') {
24
+ return item.seriesId === highlightedItem.seriesId;
25
+ }
26
+ if (highlightScope.highlight === 'item') {
27
+ return item.name === highlightedItem.name && item.seriesId === highlightedItem.seriesId;
28
+ }
29
+ return false;
30
+ };
31
+ }
32
+
33
+ /**
34
+ * The isFade logic for main charts (those that are identified by an id and a name)
35
+ */
36
+ function createIsFaded(highlightScope, highlightedItem) {
37
+ if (!highlightScope || !highlightedItem) {
38
+ return alwaysFalse;
39
+ }
40
+ return function isFaded(item) {
41
+ if (!item) {
42
+ return false;
43
+ }
44
+ if (highlightScope.fade === 'series') {
45
+ return item.seriesId === highlightedItem.seriesId && item.name !== highlightedItem.name;
46
+ }
47
+ if (highlightScope.fade === 'global') {
48
+ return item.seriesId !== highlightedItem.seriesId || item.name !== highlightedItem.name;
49
+ }
50
+ return false;
51
+ };
52
+ }
@@ -0,0 +1,45 @@
1
+ function alwaysFalse() {
2
+ return false;
3
+ }
4
+
5
+ /**
6
+ * The isHighlighted logic for main charts (those that are identified by an id and a name)
7
+ */
8
+ export function createIsHighlighted(highlightScope, highlightedItem) {
9
+ if (!highlightScope || !highlightedItem) {
10
+ return alwaysFalse;
11
+ }
12
+ return function isHighlighted(item) {
13
+ if (!item) {
14
+ return false;
15
+ }
16
+ if (highlightScope.highlight === 'series') {
17
+ return item.seriesId === highlightedItem.seriesId;
18
+ }
19
+ if (highlightScope.highlight === 'item') {
20
+ return item.name === highlightedItem.name && item.seriesId === highlightedItem.seriesId;
21
+ }
22
+ return false;
23
+ };
24
+ }
25
+
26
+ /**
27
+ * The isFade logic for main charts (those that are identified by an id and a name)
28
+ */
29
+ export function createIsFaded(highlightScope, highlightedItem) {
30
+ if (!highlightScope || !highlightedItem) {
31
+ return alwaysFalse;
32
+ }
33
+ return function isFaded(item) {
34
+ if (!item) {
35
+ return false;
36
+ }
37
+ if (highlightScope.fade === 'series') {
38
+ return item.seriesId === highlightedItem.seriesId && item.name !== highlightedItem.name;
39
+ }
40
+ if (highlightScope.fade === 'global') {
41
+ return item.seriesId !== highlightedItem.seriesId || item.name !== highlightedItem.name;
42
+ }
43
+ return false;
44
+ };
45
+ }
@@ -0,0 +1,3 @@
1
+ import type { IdentifierCleaner } from '@mui/x-charts/internals';
2
+ declare const identifierCleaner: IdentifierCleaner<'mapShape'>;
3
+ export default identifierCleaner;
@@ -0,0 +1,3 @@
1
+ import type { IdentifierCleaner } from '@mui/x-charts/internals';
2
+ declare const identifierCleaner: IdentifierCleaner<'mapShape'>;
3
+ export default identifierCleaner;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const identifierCleaner = identifier => {
8
+ return {
9
+ type: identifier.type,
10
+ seriesId: identifier.seriesId,
11
+ name: identifier.name
12
+ };
13
+ };
14
+ var _default = exports.default = identifierCleaner;
@@ -0,0 +1,8 @@
1
+ const identifierCleaner = identifier => {
2
+ return {
3
+ type: identifier.type,
4
+ seriesId: identifier.seriesId,
5
+ name: identifier.name
6
+ };
7
+ };
8
+ export default identifierCleaner;
@@ -0,0 +1,3 @@
1
+ import type { IdentifierSerializer } from '@mui/x-charts/internals';
2
+ declare const identifierSerializer: IdentifierSerializer<'mapShape'>;
3
+ export default identifierSerializer;
@@ -0,0 +1,3 @@
1
+ import type { IdentifierSerializer } from '@mui/x-charts/internals';
2
+ declare const identifierSerializer: IdentifierSerializer<'mapShape'>;
3
+ export default identifierSerializer;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ const identifierSerializer = identifier => {
9
+ const namePart = identifier.name == null ? '' : `(${identifier.name})`;
10
+ return `${(0, _internals.typeSerializer)(identifier.type)}${(0, _internals.seriesIdSerializer)(identifier.seriesId)}Name(${namePart})`;
11
+ };
12
+ var _default = exports.default = identifierSerializer;
@@ -0,0 +1,6 @@
1
+ import { typeSerializer, seriesIdSerializer } from '@mui/x-charts/internals';
2
+ const identifierSerializer = identifier => {
3
+ const namePart = identifier.name == null ? '' : `(${identifier.name})`;
4
+ return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}Name(${namePart})`;
5
+ };
6
+ export default identifierSerializer;
@@ -1,2 +1,2 @@
1
- import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
1
+ import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
2
  export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
@@ -1,2 +1,2 @@
1
- import { type ChartSeriesTypeConfig } from '@mui/x-charts/internals';
1
+ import type { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
2
  export declare const mapShapeSeriesConfig: ChartSeriesTypeConfig<'mapShape'>;
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.mapShapeSeriesConfig = void 0;
8
- var _internals = require("@mui/x-charts/internals");
9
8
  var _seriesProcessor = _interopRequireDefault(require("./seriesProcessor"));
10
9
  var _getColor = _interopRequireDefault(require("./getColor"));
11
10
  var _legend = _interopRequireDefault(require("./legend"));
@@ -14,17 +13,20 @@ var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWit
14
13
  var _descriptionGetter = _interopRequireDefault(require("./descriptionGetter"));
15
14
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
16
15
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
16
+ var _identifierSerializer = _interopRequireDefault(require("./identifierSerializer"));
17
+ var _identifierCleaner = _interopRequireDefault(require("./identifierCleaner"));
18
+ var _highlight = require("./highlight");
17
19
  const mapShapeSeriesConfig = exports.mapShapeSeriesConfig = {
18
20
  seriesProcessor: _seriesProcessor.default,
19
21
  colorProcessor: _getColor.default,
20
22
  legendGetter: _legend.default,
21
23
  tooltipGetter: _tooltip.default,
22
- tooltipItemPositionGetter: _tooltipPosition.default,
24
+ selectorTooltipItemPosition: _tooltipPosition.default,
23
25
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
24
26
  keyboardFocusHandler: _keyboardFocusHandler.default,
25
- identifierSerializer: _internals.identifierSerializerSeriesIdDataIndex,
26
- identifierCleaner: _internals.identifierCleanerSeriesIdDataIndex,
27
+ identifierSerializer: _identifierSerializer.default,
28
+ identifierCleaner: _identifierCleaner.default,
27
29
  descriptionGetter: _descriptionGetter.default,
28
- isHighlightedCreator: _internals.createIsHighlighted,
29
- isFadedCreator: _internals.createIsFaded
30
+ isHighlightedCreator: _highlight.createIsHighlighted,
31
+ isFadedCreator: _highlight.createIsFaded
30
32
  };