@mui/x-charts 8.16.0 → 8.18.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 (485) hide show
  1. package/BarChart/AnimatedBarElement.d.ts +1 -1
  2. package/BarChart/BarChart.js +1 -0
  3. package/BarChart/BarClipPath.d.ts +1 -1
  4. package/BarChart/BarElement.d.ts +1 -1
  5. package/BarChart/BarElement.js +6 -8
  6. package/BarChart/BarLabel/BarLabel.d.ts +6 -0
  7. package/BarChart/BarLabel/BarLabel.js +41 -4
  8. package/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
  9. package/BarChart/BarLabel/BarLabelItem.js +4 -2
  10. package/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
  11. package/BarChart/BarLabel/BarLabelPlot.js +42 -38
  12. package/BarChart/BarPlot.d.ts +13 -3
  13. package/BarChart/BarPlot.js +8 -3
  14. package/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
  15. package/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
  16. package/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
  17. package/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
  18. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
  19. package/BarChart/seriesConfig/bar/legend.d.ts +3 -0
  20. package/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
  21. package/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
  22. package/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
  23. package/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
  24. package/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
  25. package/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
  26. package/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
  27. package/BarChart/seriesConfig/index.d.ts +1 -1
  28. package/BarChart/seriesConfig/index.js +9 -9
  29. package/BarChart/types.d.ts +2 -0
  30. package/BarChart/useBarPlotData.js +5 -3
  31. package/CHANGELOG.md +208 -1
  32. package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  33. package/ChartsAxis/ChartsAxis.d.ts +1 -2
  34. package/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
  35. package/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
  36. package/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
  37. package/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
  38. package/ChartsClipPath/ChartsClipPath.d.ts +1 -2
  39. package/ChartsClipPath/ChartsClipPath.js +0 -2
  40. package/ChartsGrid/ChartsGrid.d.ts +1 -2
  41. package/ChartsGrid/ChartsGrid.js +0 -2
  42. package/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
  43. package/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
  44. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  45. package/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
  46. package/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
  47. package/ChartsOverlay/ChartsLoadingOverlay.js +0 -2
  48. package/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
  49. package/ChartsOverlay/ChartsNoDataOverlay.js +0 -2
  50. package/ChartsOverlay/ChartsOverlay.d.ts +1 -1
  51. package/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
  52. package/ChartsReferenceLine/ChartsReferenceLine.js +0 -2
  53. package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
  54. package/ChartsReferenceLine/ChartsXReferenceLine.js +0 -2
  55. package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
  56. package/ChartsReferenceLine/ChartsYReferenceLine.js +0 -2
  57. package/ChartsSurface/ChartsSurface.js +8 -9
  58. package/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
  59. package/ChartsSurface/chartsSurfaceClasses.js +21 -0
  60. package/ChartsSurface/index.d.ts +2 -1
  61. package/ChartsSurface/index.js +12 -1
  62. package/ChartsText/ChartsText.d.ts +1 -1
  63. package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
  64. package/ChartsTooltip/ChartsAxisTooltipContent.js +0 -2
  65. package/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
  66. package/ChartsTooltip/ChartsItemTooltipContent.js +0 -2
  67. package/ChartsTooltip/ChartsTooltip.d.ts +1 -2
  68. package/ChartsTooltip/ChartsTooltip.js +0 -2
  69. package/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
  70. package/ChartsTooltip/ChartsTooltipContainer.js +13 -14
  71. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  72. package/ChartsWrapper/ChartsWrapper.d.ts +1 -1
  73. package/ChartsWrapper/ChartsWrapper.js +3 -5
  74. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
  75. package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
  76. package/ChartsXAxis/ChartsXAxis.d.ts +1 -2
  77. package/ChartsXAxis/ChartsXAxis.js +0 -2
  78. package/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
  79. package/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
  80. package/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
  81. package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
  82. package/ChartsYAxis/ChartsYAxis.d.ts +1 -2
  83. package/ChartsYAxis/ChartsYAxis.js +0 -2
  84. package/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
  85. package/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
  86. package/Gauge/GaugeProvider.d.ts +1 -1
  87. package/Gauge/GaugeReferenceArc.d.ts +1 -1
  88. package/Gauge/GaugeValueArc.d.ts +1 -1
  89. package/Gauge/GaugeValueText.d.ts +1 -2
  90. package/Gauge/GaugeValueText.js +0 -2
  91. package/LineChart/AnimatedArea.d.ts +1 -1
  92. package/LineChart/AppearingMask.d.ts +1 -1
  93. package/LineChart/AreaElement.d.ts +1 -1
  94. package/LineChart/AreaPlot.d.ts +1 -1
  95. package/LineChart/CircleMarkElement.d.ts +1 -1
  96. package/LineChart/FocusedMark.d.ts +1 -2
  97. package/LineChart/FocusedMark.js +0 -2
  98. package/LineChart/LineElement.d.ts +1 -1
  99. package/LineChart/LineHighlightElement.d.ts +1 -1
  100. package/LineChart/LineHighlightPlot.d.ts +1 -1
  101. package/LineChart/LinePlot.d.ts +1 -1
  102. package/LineChart/MarkElement.d.ts +1 -1
  103. package/LineChart/MarkPlot.d.ts +1 -1
  104. package/LineChart/seriesConfig/getColor.js +28 -5
  105. package/LineChart/seriesConfig/index.d.ts +1 -1
  106. package/LineChart/seriesConfig/index.js +2 -2
  107. package/PieChart/PieArcLabelPlot.d.ts +1 -1
  108. package/PieChart/PieArcPlot.d.ts +1 -1
  109. package/PieChart/PiePlot.d.ts +1 -2
  110. package/PieChart/PiePlot.js +0 -2
  111. package/PieChart/seriesConfig/index.d.ts +1 -1
  112. package/PieChart/seriesConfig/index.js +2 -2
  113. package/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  114. package/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  115. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
  116. package/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -3
  117. package/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
  118. package/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
  119. package/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
  120. package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
  121. package/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
  122. package/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
  123. package/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
  124. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
  125. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
  126. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
  127. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
  128. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -3
  129. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
  130. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
  131. package/RadarChart/seriesConfig/getColor.js +12 -1
  132. package/ScatterChart/BatchScatter.d.ts +1 -2
  133. package/ScatterChart/BatchScatter.js +4 -4
  134. package/ScatterChart/Scatter.d.ts +7 -2
  135. package/ScatterChart/Scatter.js +7 -3
  136. package/ScatterChart/ScatterMarker.d.ts +1 -1
  137. package/ScatterChart/ScatterPlot.d.ts +1 -1
  138. package/ScatterChart/ScatterPlot.js +1 -1
  139. package/ScatterChart/seriesConfig/getColor.js +36 -7
  140. package/ScatterChart/seriesConfig/index.d.ts +1 -1
  141. package/ScatterChart/seriesConfig/index.js +2 -2
  142. package/context/ChartProvider/ChartProvider.d.ts +1 -1
  143. package/context/ChartProvider/ChartProvider.js +4 -4
  144. package/context/ChartProvider/ChartProvider.types.d.ts +3 -3
  145. package/context/ChartsSlotsContext.d.ts +1 -1
  146. package/esm/BarChart/AnimatedBarElement.d.ts +1 -1
  147. package/esm/BarChart/BarChart.js +1 -0
  148. package/esm/BarChart/BarClipPath.d.ts +1 -1
  149. package/esm/BarChart/BarElement.d.ts +1 -1
  150. package/esm/BarChart/BarElement.js +6 -8
  151. package/esm/BarChart/BarLabel/BarLabel.d.ts +6 -0
  152. package/esm/BarChart/BarLabel/BarLabel.js +41 -4
  153. package/esm/BarChart/BarLabel/BarLabelItem.d.ts +7 -1
  154. package/esm/BarChart/BarLabel/BarLabelItem.js +4 -2
  155. package/esm/BarChart/BarLabel/BarLabelPlot.d.ts +2 -3
  156. package/esm/BarChart/BarLabel/BarLabelPlot.js +42 -37
  157. package/esm/BarChart/BarPlot.d.ts +13 -3
  158. package/esm/BarChart/BarPlot.js +8 -3
  159. package/esm/BarChart/seriesConfig/{extremums.d.ts → bar/extremums.d.ts} +1 -1
  160. package/esm/BarChart/seriesConfig/{extremums.js → bar/extremums.js} +1 -1
  161. package/esm/BarChart/seriesConfig/bar/getColor.d.ts +3 -0
  162. package/esm/BarChart/seriesConfig/{getColor.js → bar/getColor.js} +28 -5
  163. package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +3 -0
  164. package/esm/BarChart/seriesConfig/bar/legend.d.ts +3 -0
  165. package/esm/BarChart/seriesConfig/{legend.js → bar/legend.js} +1 -1
  166. package/esm/BarChart/seriesConfig/bar/seriesProcessor.d.ts +3 -0
  167. package/esm/BarChart/seriesConfig/{seriesProcessor.js → bar/seriesProcessor.js} +1 -1
  168. package/esm/BarChart/seriesConfig/bar/tooltip.d.ts +4 -0
  169. package/esm/BarChart/seriesConfig/{tooltip.js → bar/tooltip.js} +1 -1
  170. package/esm/BarChart/seriesConfig/bar/tooltipPosition.d.ts +3 -0
  171. package/esm/BarChart/seriesConfig/{tooltipPosition.js → bar/tooltipPosition.js} +1 -1
  172. package/esm/BarChart/seriesConfig/index.d.ts +1 -1
  173. package/esm/BarChart/seriesConfig/index.js +8 -8
  174. package/esm/BarChart/types.d.ts +2 -0
  175. package/esm/BarChart/useBarPlotData.js +5 -3
  176. package/esm/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  177. package/esm/ChartsAxis/ChartsAxis.d.ts +1 -2
  178. package/esm/ChartsAxisHighlight/ChartsAxisHighlight.d.ts +1 -2
  179. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.d.ts +1 -2
  180. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.d.ts +1 -2
  181. package/esm/ChartsBrushOverlay/ChartsBrushOverlay.d.ts +1 -2
  182. package/esm/ChartsClipPath/ChartsClipPath.d.ts +1 -2
  183. package/esm/ChartsClipPath/ChartsClipPath.js +0 -1
  184. package/esm/ChartsGrid/ChartsGrid.d.ts +1 -2
  185. package/esm/ChartsGrid/ChartsGrid.js +0 -1
  186. package/esm/ChartsGrid/ChartsHorizontalGrid.d.ts +1 -2
  187. package/esm/ChartsGrid/ChartsVerticalGrid.d.ts +1 -2
  188. package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  189. package/esm/ChartsLocalizationProvider/ChartsLocalizationProvider.d.ts +1 -1
  190. package/esm/ChartsOverlay/ChartsLoadingOverlay.d.ts +1 -2
  191. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +0 -1
  192. package/esm/ChartsOverlay/ChartsNoDataOverlay.d.ts +1 -2
  193. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +0 -1
  194. package/esm/ChartsOverlay/ChartsOverlay.d.ts +1 -1
  195. package/esm/ChartsReferenceLine/ChartsReferenceLine.d.ts +1 -2
  196. package/esm/ChartsReferenceLine/ChartsReferenceLine.js +0 -1
  197. package/esm/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -2
  198. package/esm/ChartsReferenceLine/ChartsXReferenceLine.js +0 -1
  199. package/esm/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -2
  200. package/esm/ChartsReferenceLine/ChartsYReferenceLine.js +0 -1
  201. package/esm/ChartsSurface/ChartsSurface.js +9 -10
  202. package/esm/ChartsSurface/chartsSurfaceClasses.d.ts +6 -0
  203. package/esm/ChartsSurface/chartsSurfaceClasses.js +13 -0
  204. package/esm/ChartsSurface/index.d.ts +2 -1
  205. package/esm/ChartsSurface/index.js +2 -1
  206. package/esm/ChartsText/ChartsText.d.ts +1 -1
  207. package/esm/ChartsTooltip/ChartsAxisTooltipContent.d.ts +1 -2
  208. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +0 -1
  209. package/esm/ChartsTooltip/ChartsItemTooltipContent.d.ts +1 -2
  210. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +0 -1
  211. package/esm/ChartsTooltip/ChartsTooltip.d.ts +1 -2
  212. package/esm/ChartsTooltip/ChartsTooltip.js +0 -1
  213. package/esm/ChartsTooltip/ChartsTooltipContainer.d.ts +1 -1
  214. package/esm/ChartsTooltip/ChartsTooltipContainer.js +13 -14
  215. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  216. package/esm/ChartsWrapper/ChartsWrapper.d.ts +1 -1
  217. package/esm/ChartsWrapper/ChartsWrapper.js +4 -6
  218. package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +1 -2
  219. package/esm/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +1 -2
  220. package/esm/ChartsXAxis/ChartsXAxis.d.ts +1 -2
  221. package/esm/ChartsXAxis/ChartsXAxis.js +0 -1
  222. package/esm/ChartsXAxis/ChartsXAxisImpl.d.ts +1 -2
  223. package/esm/ChartsXAxis/useAxisTicksProps.d.ts +32 -32
  224. package/esm/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts +1 -2
  225. package/esm/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +1 -2
  226. package/esm/ChartsYAxis/ChartsYAxis.d.ts +1 -2
  227. package/esm/ChartsYAxis/ChartsYAxis.js +0 -1
  228. package/esm/ChartsYAxis/ChartsYAxisImpl.d.ts +1 -2
  229. package/esm/ChartsYAxis/useAxisTicksProps.d.ts +32 -32
  230. package/esm/Gauge/GaugeProvider.d.ts +1 -1
  231. package/esm/Gauge/GaugeReferenceArc.d.ts +1 -1
  232. package/esm/Gauge/GaugeValueArc.d.ts +1 -1
  233. package/esm/Gauge/GaugeValueText.d.ts +1 -2
  234. package/esm/Gauge/GaugeValueText.js +0 -1
  235. package/esm/LineChart/AnimatedArea.d.ts +1 -1
  236. package/esm/LineChart/AppearingMask.d.ts +1 -1
  237. package/esm/LineChart/AreaElement.d.ts +1 -1
  238. package/esm/LineChart/AreaPlot.d.ts +1 -1
  239. package/esm/LineChart/CircleMarkElement.d.ts +1 -1
  240. package/esm/LineChart/FocusedMark.d.ts +1 -2
  241. package/esm/LineChart/FocusedMark.js +0 -1
  242. package/esm/LineChart/LineElement.d.ts +1 -1
  243. package/esm/LineChart/LineHighlightElement.d.ts +1 -1
  244. package/esm/LineChart/LineHighlightPlot.d.ts +1 -1
  245. package/esm/LineChart/LinePlot.d.ts +1 -1
  246. package/esm/LineChart/MarkElement.d.ts +1 -1
  247. package/esm/LineChart/MarkPlot.d.ts +1 -1
  248. package/esm/LineChart/seriesConfig/getColor.js +28 -5
  249. package/esm/LineChart/seriesConfig/index.d.ts +1 -1
  250. package/esm/LineChart/seriesConfig/index.js +1 -1
  251. package/esm/PieChart/PieArcLabelPlot.d.ts +1 -1
  252. package/esm/PieChart/PieArcPlot.d.ts +1 -1
  253. package/esm/PieChart/PiePlot.d.ts +1 -2
  254. package/esm/PieChart/PiePlot.js +0 -1
  255. package/esm/PieChart/seriesConfig/index.d.ts +1 -1
  256. package/esm/PieChart/seriesConfig/index.js +1 -1
  257. package/esm/RadarChart/RadarAxis/RadarAxis.d.ts +1 -1
  258. package/esm/RadarChart/RadarAxis/RadarAxis.utils.d.ts +2 -2
  259. package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.d.ts +1 -2
  260. package/esm/RadarChart/RadarAxisHighlight/RadarAxisHighlight.js +7 -2
  261. package/esm/RadarChart/RadarDataProvider/RadarDataProvider.d.ts +1 -2
  262. package/esm/RadarChart/RadarGrid/CircularRadarGrid.d.ts +1 -2
  263. package/esm/RadarChart/RadarGrid/CircularRadarStripes.d.ts +1 -2
  264. package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -2
  265. package/esm/RadarChart/RadarGrid/SharpRadarGrid.d.ts +1 -2
  266. package/esm/RadarChart/RadarGrid/SharpRadarStripes.d.ts +1 -2
  267. package/esm/RadarChart/RadarMetricLabels/RadarMetricLabels.d.ts +1 -2
  268. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +1 -1
  269. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +1 -1
  270. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +1 -2
  271. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.d.ts +1 -2
  272. package/esm/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +1 -2
  273. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +3 -0
  274. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -1
  275. package/esm/RadarChart/seriesConfig/getColor.js +12 -1
  276. package/esm/ScatterChart/BatchScatter.d.ts +1 -2
  277. package/esm/ScatterChart/BatchScatter.js +4 -4
  278. package/esm/ScatterChart/Scatter.d.ts +7 -2
  279. package/esm/ScatterChart/Scatter.js +7 -3
  280. package/esm/ScatterChart/ScatterMarker.d.ts +1 -1
  281. package/esm/ScatterChart/ScatterPlot.d.ts +1 -1
  282. package/esm/ScatterChart/ScatterPlot.js +1 -1
  283. package/esm/ScatterChart/seriesConfig/getColor.js +36 -7
  284. package/esm/ScatterChart/seriesConfig/index.d.ts +1 -1
  285. package/esm/ScatterChart/seriesConfig/index.js +1 -1
  286. package/esm/context/ChartProvider/ChartProvider.d.ts +1 -1
  287. package/esm/context/ChartProvider/ChartProvider.js +4 -4
  288. package/esm/context/ChartProvider/ChartProvider.types.d.ts +3 -3
  289. package/esm/context/ChartsSlotsContext.d.ts +1 -1
  290. package/esm/hooks/animation/useAnimateBarLabel.d.ts +1 -1
  291. package/esm/hooks/animation/useAnimateBarLabel.js +61 -12
  292. package/esm/hooks/index.d.ts +1 -0
  293. package/esm/hooks/index.js +1 -0
  294. package/esm/hooks/useAxis.d.ts +116 -16
  295. package/esm/hooks/useAxis.js +122 -18
  296. package/esm/hooks/useDataset.d.ts +6 -0
  297. package/esm/hooks/useDataset.js +13 -0
  298. package/esm/hooks/useInteractionItemProps.js +2 -5
  299. package/esm/hooks/useIsItemFocused.js +5 -3
  300. package/esm/hooks/useItemHighlighted.js +2 -2
  301. package/esm/hooks/useItemHighlightedGetter.js +0 -1
  302. package/esm/hooks/useScale.d.ts +25 -6
  303. package/esm/hooks/useScale.js +29 -8
  304. package/esm/index.js +1 -1
  305. package/esm/internals/colorScale.d.ts +1 -1
  306. package/esm/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
  307. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
  308. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -1
  309. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
  310. package/esm/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -1
  311. package/esm/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
  312. package/esm/internals/createSeriesSelectorOfType.js +5 -3
  313. package/esm/internals/getSeriesColorFn.d.ts +5 -0
  314. package/esm/internals/getSeriesColorFn.js +3 -0
  315. package/esm/internals/index.d.ts +1 -1
  316. package/esm/internals/index.js +1 -1
  317. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
  318. package/esm/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
  319. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
  320. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
  321. package/esm/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
  322. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
  323. package/esm/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
  324. package/esm/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
  325. package/esm/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
  326. package/esm/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
  327. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
  328. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
  329. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +8 -1
  330. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
  331. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
  332. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
  333. package/esm/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
  334. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
  335. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +21 -5
  336. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
  337. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
  338. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +15 -9
  339. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
  340. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +69 -45
  341. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
  342. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
  343. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
  344. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -22
  345. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
  346. package/esm/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
  347. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
  348. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
  349. package/esm/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
  350. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
  351. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
  352. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
  353. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
  354. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
  355. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +3 -0
  356. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
  357. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
  358. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
  359. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +11 -10
  360. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
  361. package/esm/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
  362. package/esm/internals/plugins/models/plugin.d.ts +3 -2
  363. package/esm/internals/plugins/utils/selectors.d.ts +13 -17
  364. package/esm/internals/plugins/utils/selectors.js +3 -35
  365. package/esm/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
  366. package/esm/internals/plugins/utils/useLazySelectorEffect.js +2 -2
  367. package/esm/internals/store/useCharts.d.ts +3 -4
  368. package/esm/internals/store/useCharts.js +2 -2
  369. package/esm/internals/store/useSelector.d.ts +2 -4
  370. package/esm/internals/store/useSelector.js +2 -8
  371. package/esm/internals/store/useStore.d.ts +3 -5
  372. package/esm/locales/index.d.ts +2 -1
  373. package/esm/locales/index.js +1 -0
  374. package/esm/locales/nbNO.d.ts +115 -0
  375. package/esm/locales/nbNO.js +113 -0
  376. package/esm/models/seriesType/bar.d.ts +16 -0
  377. package/esm/models/seriesType/common.d.ts +22 -6
  378. package/esm/models/seriesType/config.d.ts +7 -16
  379. package/hooks/animation/useAnimateBarLabel.d.ts +1 -1
  380. package/hooks/animation/useAnimateBarLabel.js +61 -12
  381. package/hooks/index.d.ts +1 -0
  382. package/hooks/index.js +12 -0
  383. package/hooks/useAxis.d.ts +116 -16
  384. package/hooks/useAxis.js +122 -18
  385. package/hooks/useDataset.d.ts +6 -0
  386. package/hooks/useDataset.js +18 -0
  387. package/hooks/useInteractionItemProps.js +2 -5
  388. package/hooks/useIsItemFocused.js +5 -3
  389. package/hooks/useItemHighlighted.js +2 -2
  390. package/hooks/useScale.d.ts +25 -6
  391. package/hooks/useScale.js +29 -8
  392. package/index.js +1 -1
  393. package/internals/colorScale.d.ts +1 -1
  394. package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -2
  395. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.d.ts +1 -2
  396. package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +0 -2
  397. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +1 -2
  398. package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +0 -2
  399. package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.d.ts +1 -2
  400. package/internals/createSeriesSelectorOfType.js +6 -3
  401. package/internals/getSeriesColorFn.d.ts +5 -0
  402. package/internals/getSeriesColorFn.js +9 -0
  403. package/internals/index.d.ts +1 -1
  404. package/internals/index.js +1 -1
  405. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.js +7 -15
  406. package/internals/plugins/corePlugins/useChartAnimation/useChartAnimation.selectors.d.ts +2 -4
  407. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.js +28 -36
  408. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.d.ts +11 -17
  409. package/internals/plugins/corePlugins/useChartDimensions/useChartDimensions.selectors.js +27 -21
  410. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.js +1 -6
  411. package/internals/plugins/corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.selectors.d.ts +2 -4
  412. package/internals/plugins/corePlugins/useChartId/useChartId.js +6 -10
  413. package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +2 -4
  414. package/internals/plugins/corePlugins/useChartInteractionListener/useChartInteractionListener.js +1 -3
  415. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +10 -10
  416. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.d.ts +11 -7
  417. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.selectors.js +9 -2
  418. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +1 -0
  419. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.js +19 -35
  420. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.d.ts +29 -57
  421. package/internals/plugins/featurePlugins/useChartBrush/useChartBrush.selectors.js +2 -2
  422. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.d.ts +15 -15
  423. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartAxisSize.selectors.js +22 -6
  424. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +11 -17
  425. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.d.ts +12 -4
  426. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPreview.selectors.js +14 -8
  427. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +62 -86
  428. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.js +70 -46
  429. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.d.ts +14 -26
  430. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianHighlight.selectors.js +3 -2
  431. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +17 -33
  432. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +23 -23
  433. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.js +9 -15
  434. package/internals/plugins/featurePlugins/useChartClosestPoint/useChartClosestPoint.selectors.d.ts +2 -4
  435. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.js +12 -16
  436. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +23 -21
  437. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +8 -7
  438. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +29 -43
  439. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +14 -28
  440. package/internals/plugins/featurePlugins/useChartInteraction/useChartTooltip.selectors.d.ts +7 -9
  441. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +47 -53
  442. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.d.ts +22 -36
  443. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +4 -1
  444. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +3 -5
  445. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.selectors.d.ts +11 -21
  446. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +14 -26
  447. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +12 -10
  448. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.js +1 -3
  449. package/internals/plugins/featurePlugins/useChartZAxis/useChartZAxis.selectors.d.ts +3 -5
  450. package/internals/plugins/models/plugin.d.ts +3 -2
  451. package/internals/plugins/utils/selectors.d.ts +13 -17
  452. package/internals/plugins/utils/selectors.js +3 -35
  453. package/internals/plugins/utils/useLazySelectorEffect.d.ts +2 -2
  454. package/internals/plugins/utils/useLazySelectorEffect.js +2 -2
  455. package/internals/store/useCharts.d.ts +3 -4
  456. package/internals/store/useCharts.js +2 -2
  457. package/internals/store/useSelector.d.ts +2 -4
  458. package/internals/store/useSelector.js +2 -10
  459. package/internals/store/useStore.d.ts +3 -5
  460. package/locales/index.d.ts +2 -1
  461. package/locales/index.js +11 -0
  462. package/locales/nbNO.d.ts +115 -0
  463. package/locales/nbNO.js +119 -0
  464. package/models/seriesType/bar.d.ts +16 -0
  465. package/models/seriesType/common.d.ts +22 -6
  466. package/models/seriesType/config.d.ts +7 -16
  467. package/package.json +5 -5
  468. package/BarChart/seriesConfig/getColor.d.ts +0 -3
  469. package/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  470. package/BarChart/seriesConfig/legend.d.ts +0 -3
  471. package/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
  472. package/BarChart/seriesConfig/tooltip.d.ts +0 -4
  473. package/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
  474. package/esm/BarChart/seriesConfig/getColor.d.ts +0 -3
  475. package/esm/BarChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  476. package/esm/BarChart/seriesConfig/legend.d.ts +0 -3
  477. package/esm/BarChart/seriesConfig/seriesProcessor.d.ts +0 -3
  478. package/esm/BarChart/seriesConfig/tooltip.d.ts +0 -4
  479. package/esm/BarChart/seriesConfig/tooltipPosition.d.ts +0 -3
  480. package/esm/internals/plugins/utils/ChartStore.d.ts +0 -13
  481. package/esm/internals/plugins/utils/ChartStore.js +0 -22
  482. package/internals/plugins/utils/ChartStore.d.ts +0 -13
  483. package/internals/plugins/utils/ChartStore.js +0 -29
  484. /package/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
  485. /package/esm/BarChart/seriesConfig/{getSeriesWithDefaultValues.js → bar/getSeriesWithDefaultValues.js} +0 -0
@@ -59,7 +59,7 @@ export interface LineElementProps extends Omit<LineElementOwnerState, 'isFaded'
59
59
  *
60
60
  * - [LineElement API](https://mui.com/x/api/charts/line-element/)
61
61
  */
62
- declare function LineElement(props: LineElementProps): React.JSX.Element;
62
+ declare function LineElement(props: LineElementProps): import("react/jsx-runtime").JSX.Element;
63
63
  declare namespace LineElement {
64
64
  var propTypes: any;
65
65
  }
@@ -29,7 +29,7 @@ export type LineHighlightElementProps = (LineHighlightElementCommonProps & ({
29
29
  *
30
30
  * - [LineHighlightElement API](https://mui.com/x/api/charts/line-highlight-element/)
31
31
  */
32
- declare function LineHighlightElement(props: LineHighlightElementProps): React.JSX.Element;
32
+ declare function LineHighlightElement(props: LineHighlightElementProps): import("react/jsx-runtime").JSX.Element;
33
33
  declare namespace LineHighlightElement {
34
34
  var propTypes: any;
35
35
  }
@@ -29,7 +29,7 @@ export interface LineHighlightPlotProps extends React.SVGAttributes<SVGSVGElemen
29
29
  *
30
30
  * - [LineHighlightPlot API](https://mui.com/x/api/charts/line-highlight-plot/)
31
31
  */
32
- declare function LineHighlightPlot(props: LineHighlightPlotProps): React.JSX.Element | null;
32
+ declare function LineHighlightPlot(props: LineHighlightPlotProps): import("react/jsx-runtime").JSX.Element | null;
33
33
  declare namespace LineHighlightPlot {
34
34
  var propTypes: any;
35
35
  }
@@ -21,7 +21,7 @@ export interface LinePlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<
21
21
  *
22
22
  * - [LinePlot API](https://mui.com/x/api/charts/line-plot/)
23
23
  */
24
- declare function LinePlot(props: LinePlotProps): React.JSX.Element;
24
+ declare function LinePlot(props: LinePlotProps): import("react/jsx-runtime").JSX.Element;
25
25
  declare namespace LinePlot {
26
26
  var propTypes: any;
27
27
  }
@@ -35,7 +35,7 @@ export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighli
35
35
  *
36
36
  * - [MarkElement API](https://mui.com/x/api/charts/mark-element/)
37
37
  */
38
- declare function MarkElement(props: MarkElementProps): React.JSX.Element;
38
+ declare function MarkElement(props: MarkElementProps): import("react/jsx-runtime").JSX.Element;
39
39
  declare namespace MarkElement {
40
40
  var propTypes: any;
41
41
  }
@@ -35,7 +35,7 @@ export interface MarkPlotProps extends React.SVGAttributes<SVGSVGElement>, Pick<
35
35
  *
36
36
  * - [MarkPlot API](https://mui.com/x/api/charts/mark-plot/)
37
37
  */
38
- declare function MarkPlot(props: MarkPlotProps): React.JSX.Element | null;
38
+ declare function MarkPlot(props: MarkPlotProps): import("react/jsx-runtime").JSX.Element | null;
39
39
  declare namespace MarkPlot {
40
40
  var propTypes: any;
41
41
  }
@@ -1,15 +1,23 @@
1
+ import { getSeriesColorFn } from "../../internals/getSeriesColorFn.js";
1
2
  const getColor = (series, xAxis, yAxis) => {
2
3
  const yColorScale = yAxis?.colorScale;
3
4
  const xColorScale = xAxis?.colorScale;
5
+ const getSeriesColor = getSeriesColorFn(series);
4
6
  if (yColorScale) {
5
7
  return dataIndex => {
6
8
  if (dataIndex === undefined) {
7
9
  return series.color;
8
10
  }
9
11
  const value = series.data[dataIndex];
10
- const color = value === null ? series.color : yColorScale(value);
12
+ const color = value === null ? getSeriesColor({
13
+ value,
14
+ dataIndex
15
+ }) : yColorScale(value);
11
16
  if (color === null) {
12
- return series.color;
17
+ return getSeriesColor({
18
+ value,
19
+ dataIndex
20
+ });
13
21
  }
14
22
  return color;
15
23
  };
@@ -20,13 +28,28 @@ const getColor = (series, xAxis, yAxis) => {
20
28
  return series.color;
21
29
  }
22
30
  const value = xAxis.data?.[dataIndex];
23
- const color = value === null ? series.color : xColorScale(value);
31
+ const color = value === null ? getSeriesColor({
32
+ value,
33
+ dataIndex
34
+ }) : xColorScale(value);
24
35
  if (color === null) {
25
- return series.color;
36
+ return getSeriesColor({
37
+ value,
38
+ dataIndex
39
+ });
26
40
  }
27
41
  return color;
28
42
  };
29
43
  }
30
- return () => series.color;
44
+ return dataIndex => {
45
+ if (dataIndex === undefined) {
46
+ return series.color;
47
+ }
48
+ const value = series.data[dataIndex];
49
+ return getSeriesColor({
50
+ value,
51
+ dataIndex
52
+ });
53
+ };
31
54
  };
32
55
  export default getColor;
@@ -1,2 +1,2 @@
1
1
  import { ChartSeriesTypeConfig } from "../../internals/plugins/models/seriesConfig/index.js";
2
- export declare const seriesConfig: ChartSeriesTypeConfig<'line'>;
2
+ export declare const lineSeriesConfig: ChartSeriesTypeConfig<'line'>;
@@ -5,7 +5,7 @@ import legendGetter from "./legend.js";
5
5
  import tooltipGetter, { axisTooltipGetter } from "./tooltip.js";
6
6
  import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
7
7
  import tooltipItemPositionGetter from "./tooltipPosition.js";
8
- export const seriesConfig = {
8
+ export const lineSeriesConfig = {
9
9
  colorProcessor: getColor,
10
10
  seriesProcessor,
11
11
  legendGetter,
@@ -29,7 +29,7 @@ export interface PieArcLabelPlotProps extends Pick<DefaultizedPieSeriesType, 'da
29
29
  */
30
30
  skipAnimation?: boolean;
31
31
  }
32
- declare function PieArcLabelPlot(props: PieArcLabelPlotProps): React.JSX.Element | null;
32
+ declare function PieArcLabelPlot(props: PieArcLabelPlotProps): import("react/jsx-runtime").JSX.Element | null;
33
33
  declare namespace PieArcLabelPlot {
34
34
  var propTypes: any;
35
35
  }
@@ -36,7 +36,7 @@ export interface PieArcPlotProps extends Pick<DefaultizedPieSeriesType, 'data' |
36
36
  */
37
37
  skipAnimation?: boolean;
38
38
  }
39
- declare function PieArcPlot(props: PieArcPlotProps): React.JSX.Element | null;
39
+ declare function PieArcPlot(props: PieArcPlotProps): import("react/jsx-runtime").JSX.Element | null;
40
40
  declare namespace PieArcPlot {
41
41
  var propTypes: any;
42
42
  }
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { PieArcPlotProps, PieArcPlotSlotProps, PieArcPlotSlots } from "./PieArcPlot.js";
3
2
  import { PieArcLabelPlotSlots, PieArcLabelPlotSlotProps } from "./PieArcLabelPlot.js";
4
3
  export interface PiePlotSlots extends PieArcPlotSlots, PieArcLabelPlotSlots {}
@@ -25,7 +24,7 @@ export interface PiePlotProps extends Pick<PieArcPlotProps, 'skipAnimation' | 'o
25
24
  *
26
25
  * - [PiePlot API](https://mui.com/x/api/charts/pie-plot/)
27
26
  */
28
- declare function PiePlot(props: PiePlotProps): React.JSX.Element | null;
27
+ declare function PiePlot(props: PiePlotProps): import("react/jsx-runtime").JSX.Element | null;
29
28
  declare namespace PiePlot {
30
29
  var propTypes: any;
31
30
  }
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import * as React from 'react';
4
3
  import PropTypes from 'prop-types';
5
4
  import { PieArcPlot } from "./PieArcPlot.js";
6
5
  import { PieArcLabelPlot } from "./PieArcLabelPlot.js";
@@ -1,2 +1,2 @@
1
1
  import { ChartSeriesTypeConfig } from "../../internals/plugins/models/seriesConfig/index.js";
2
- export declare const seriesConfig: ChartSeriesTypeConfig<'pie'>;
2
+ export declare const pieSeriesConfig: ChartSeriesTypeConfig<'pie'>;
@@ -4,7 +4,7 @@ import legendGetter from "./legend.js";
4
4
  import tooltipGetter from "./tooltip.js";
5
5
  import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
6
6
  import tooltipItemPositionGetter from "./tooltipPosition.js";
7
- export const seriesConfig = {
7
+ export const pieSeriesConfig = {
8
8
  colorProcessor: getColor,
9
9
  seriesProcessor,
10
10
  legendGetter,
@@ -22,7 +22,7 @@ export interface RadarAxisProps extends UseRadarAxisParams {
22
22
  */
23
23
  classes?: Partial<RadarAxisClasses>;
24
24
  }
25
- declare function RadarAxis(props: RadarAxisProps): React.JSX.Element | null;
25
+ declare function RadarAxis(props: RadarAxisProps): import("react/jsx-runtime").JSX.Element | null;
26
26
  declare namespace RadarAxis {
27
27
  var propTypes: any;
28
28
  }
@@ -8,13 +8,13 @@ export declare function getLabelAttributes(params: GetLabelAttributesParams): {
8
8
  x: number;
9
9
  y: number;
10
10
  textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
11
- dominantBaseline: "inherit" | "auto" | "middle" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "text-before-edge" | "central" | "text-after-edge" | "use-script" | "no-change" | "reset-size" | undefined;
11
+ dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
12
12
  transform?: undefined;
13
13
  } | {
14
14
  x: number;
15
15
  y: number;
16
16
  textAnchor: "inherit" | "end" | "start" | "middle" | undefined;
17
- dominantBaseline: "inherit" | "auto" | "middle" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "text-before-edge" | "central" | "text-after-edge" | "use-script" | "no-change" | "reset-size" | undefined;
17
+ dominantBaseline: "inherit" | "auto" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "use-script" | "no-change" | "reset-size" | undefined;
18
18
  transform: string;
19
19
  };
20
20
  export {};
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { RadarAxisHighlightClasses } from "./radarAxisHighlightClasses.js";
3
2
  export interface RadarAxisHighlightProps {
4
3
  /**
@@ -6,7 +5,7 @@ export interface RadarAxisHighlightProps {
6
5
  */
7
6
  classes?: Partial<RadarAxisHighlightClasses>;
8
7
  }
9
- declare function RadarAxisHighlight(props: RadarAxisHighlightProps): React.JSX.Element | null;
8
+ declare function RadarAxisHighlight(props: RadarAxisHighlightProps): import("react/jsx-runtime").JSX.Element | null;
10
9
  declare namespace RadarAxisHighlight {
11
10
  var propTypes: any;
12
11
  }
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import { useTheme } from '@mui/material/styles';
5
4
  import composeClasses from '@mui/utils/composeClasses';
6
5
  import { useRadarAxisHighlight } from "./useRadarAxisHighlight.js";
7
6
  import { getRadarAxisHighlightUtilityClass } from "./radarAxisHighlightClasses.js";
7
+ import { getSeriesColorFn } from "../../internals/getSeriesColorFn.js";
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  const useUtilityClasses = classes => {
10
10
  const slots = {
@@ -42,6 +42,7 @@ function RadarAxisHighlight(props) {
42
42
  points,
43
43
  radius,
44
44
  highlightedAngle,
45
+ highlightedIndex,
45
46
  instance
46
47
  } = data;
47
48
  const [x, y] = instance.polar2svg(radius, highlightedAngle);
@@ -55,8 +56,12 @@ function RadarAxisHighlight(props) {
55
56
  pointerEvents: "none",
56
57
  strokeDasharray: "4 4"
57
58
  }), points.map((point, seriesIndex) => {
59
+ const colorGetter = getSeriesColorFn(series[seriesIndex]);
58
60
  return /*#__PURE__*/_jsx("circle", _extends({
59
- fill: series[seriesIndex].color,
61
+ fill: colorGetter({
62
+ value: point.value,
63
+ dataIndex: highlightedIndex
64
+ }),
60
65
  cx: point.x,
61
66
  cy: point.y,
62
67
  className: classes.dot,
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { MakeOptional } from '@mui/x-internals/types';
3
2
  import { RadarChartPluginSignatures } from "../RadarChart.plugins.js";
4
3
  import { RadarSeriesType } from "../../models/seriesType/radar.js";
@@ -22,5 +21,5 @@ export type RadarDataProviderProps<TSignatures extends readonly ChartAnyPluginSi
22
21
  */
23
22
  highlight?: 'axis' | 'series' | 'none';
24
23
  };
25
- declare function RadarDataProvider<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginSignatures>(props: RadarDataProviderProps<TSignatures>): React.JSX.Element;
24
+ declare function RadarDataProvider<TSignatures extends readonly ChartAnyPluginSignature[] = RadarChartPluginSignatures>(props: RadarDataProviderProps<TSignatures>): import("react/jsx-runtime").JSX.Element;
26
25
  export { RadarDataProvider };
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarGridRenderProps } from "./RadarGrid.types.js";
3
2
  /**
4
3
  * @ignore - internal component.
5
4
  */
6
- export declare function CircularRadarGrid(props: RadarGridRenderProps): React.JSX.Element;
5
+ export declare function CircularRadarGrid(props: RadarGridRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarGridStripeRenderProps } from "./RadarGrid.types.js";
3
2
  /**
4
3
  * @ignore - internal component.
5
4
  */
6
- export declare function CircularRadarStripes(props: RadarGridStripeRenderProps): React.JSX.Element;
5
+ export declare function CircularRadarStripes(props: RadarGridStripeRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarGridProps } from "./RadarGrid.types.js";
3
- declare function RadarGrid(props: RadarGridProps): React.JSX.Element | null;
2
+ declare function RadarGrid(props: RadarGridProps): import("react/jsx-runtime").JSX.Element | null;
4
3
  declare namespace RadarGrid {
5
4
  var propTypes: any;
6
5
  }
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarGridRenderProps } from "./RadarGrid.types.js";
3
2
  /**
4
3
  * @ignore - internal component.
5
4
  */
6
- export declare function SharpRadarGrid(props: RadarGridRenderProps): React.JSX.Element;
5
+ export declare function SharpRadarGrid(props: RadarGridRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarGridStripeRenderProps } from "./RadarGrid.types.js";
3
2
  /**
4
3
  * @ignore - internal component.
5
4
  */
6
- export declare function SharpRadarStripes(props: RadarGridStripeRenderProps): React.JSX.Element;
5
+ export declare function SharpRadarStripes(props: RadarGridStripeRenderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,2 @@
1
- import * as React from 'react';
2
- declare function RadarMetricLabels(): React.JSX.Element;
1
+ declare function RadarMetricLabels(): import("react/jsx-runtime").JSX.Element;
3
2
  export { RadarMetricLabels };
@@ -16,7 +16,7 @@ interface GetPathPropsParams {
16
16
  color: string;
17
17
  }
18
18
  export declare function getPathProps(params: GetPathPropsParams): React.SVGProps<SVGPathElement>;
19
- declare function RadarSeriesArea(props: RadarSeriesAreaProps): React.JSX.Element;
19
+ declare function RadarSeriesArea(props: RadarSeriesAreaProps): import("react/jsx-runtime").JSX.Element;
20
20
  declare namespace RadarSeriesArea {
21
21
  var propTypes: any;
22
22
  }
@@ -16,7 +16,7 @@ interface GetCirclePropsParams {
16
16
  color: string;
17
17
  }
18
18
  export declare function getCircleProps(params: GetCirclePropsParams): React.SVGProps<SVGCircleElement>;
19
- declare function RadarSeriesMarks(props: RadarSeriesMarksProps): React.JSX.Element;
19
+ declare function RadarSeriesMarks(props: RadarSeriesMarksProps): import("react/jsx-runtime").JSX.Element;
20
20
  declare namespace RadarSeriesMarks {
21
21
  var propTypes: any;
22
22
  }
@@ -49,7 +49,6 @@ function RadarSeriesMarks(props) {
49
49
  children: seriesCoordinates?.map(({
50
50
  seriesId: id,
51
51
  points,
52
- color,
53
52
  hideMark,
54
53
  fillArea
55
54
  }) => {
@@ -60,7 +59,7 @@ function RadarSeriesMarks(props) {
60
59
  children: points.map((point, index) => /*#__PURE__*/_jsx("circle", _extends({}, getCircleProps({
61
60
  seriesId: id,
62
61
  point,
63
- color,
62
+ color: point.color,
64
63
  fillArea,
65
64
  isFaded,
66
65
  isHighlighted,
@@ -1,6 +1,5 @@
1
- import * as React from 'react';
2
1
  import { RadarSeriesPlotProps } from "./RadarSeriesPlot.types.js";
3
- declare function RadarSeriesPlot(props: RadarSeriesPlotProps): React.JSX.Element;
2
+ declare function RadarSeriesPlot(props: RadarSeriesPlotProps): import("react/jsx-runtime").JSX.Element;
4
3
  declare namespace RadarSeriesPlot {
5
4
  var propTypes: any;
6
5
  }
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
2
  import PropTypes from 'prop-types';
4
3
  import { useRadarSeriesData } from "./useRadarSeriesData.js";
5
4
  import { useInteractionAllItemProps } from "../../hooks/useInteractionItemProps.js";
@@ -52,7 +51,7 @@ function RadarSeriesPlot(props) {
52
51
  }, interactionProps[seriesIndex]), seriesId), !hideMark && points.map((point, index) => /*#__PURE__*/_jsx("circle", _extends({}, getCircleProps({
53
52
  seriesId,
54
53
  point,
55
- color,
54
+ color: point.color,
56
55
  fillArea,
57
56
  isFaded,
58
57
  isHighlighted,
@@ -14,11 +14,14 @@ export declare function useRadarSeriesData(querySeriesId?: SeriesId): {
14
14
  isItemHighlighted: boolean;
15
15
  isItemFaded: boolean;
16
16
  dataIndex: number;
17
+ value: number;
18
+ color: string;
17
19
  }[];
18
20
  type: "radar";
19
21
  label?: string | ((location: "tooltip" | "legend") => string) | undefined;
20
22
  labelMarkType?: import("../../internals/index.js").ChartsLabelMarkType | undefined;
21
23
  highlightScope?: import("../../index.js").HighlightScope | undefined;
24
+ colorGetter?: ((data: import("../../internals/index.js").ColorCallbackValue<number>) => string) | undefined;
22
25
  hideMark?: boolean | undefined;
23
26
  fillArea?: boolean | undefined;
24
27
  data: number[];
@@ -4,6 +4,7 @@ import { useRadarSeries } from "../../hooks/useRadarSeries.js";
4
4
  import { useRadiusAxes } from "../../hooks/useAxis.js";
5
5
  import { useItemHighlightedGetter } from "../../hooks/useItemHighlightedGetter.js";
6
6
  import { useChartContext } from "../../context/ChartProvider/useChartContext.js";
7
+ import { getSeriesColorFn } from "../../internals/getSeriesColorFn.js";
7
8
 
8
9
  /**
9
10
  * This hook provides all the data needed to display radar series.
@@ -33,6 +34,7 @@ export function useRadarSeriesData(querySeriesId) {
33
34
  const isSeriesFaded = !isSeriesHighlighted && isItemFaded({
34
35
  seriesId
35
36
  });
37
+ const getColor = getSeriesColorFn(series);
36
38
  return _extends({}, series, {
37
39
  seriesId: series.id,
38
40
  isSeriesHighlighted,
@@ -54,7 +56,12 @@ export function useRadarSeriesData(querySeriesId) {
54
56
  y,
55
57
  isItemHighlighted: highlighted,
56
58
  isItemFaded: faded,
57
- dataIndex
59
+ dataIndex,
60
+ value,
61
+ color: getColor({
62
+ value,
63
+ dataIndex
64
+ })
58
65
  };
59
66
  })
60
67
  });
@@ -1,4 +1,15 @@
1
+ import { getSeriesColorFn } from "../../internals/getSeriesColorFn.js";
1
2
  const getColor = series => {
2
- return () => series.color;
3
+ const getSeriesColor = getSeriesColorFn(series);
4
+ return dataIndex => {
5
+ if (dataIndex === undefined) {
6
+ return series.color;
7
+ }
8
+ const value = series.data[dataIndex];
9
+ return getSeriesColor({
10
+ value,
11
+ dataIndex
12
+ });
13
+ };
3
14
  };
4
15
  export default getColor;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { DefaultizedScatterSeriesType } from "../models/seriesType/scatter.js";
3
2
  import { D3Scale } from "../models/axis.js";
4
3
  import { ScatterClasses } from "./scatterClasses.js";
@@ -29,4 +28,4 @@ export interface BatchScatterPathsProps {
29
28
  *
30
29
  * You can read about all the limitations [here](https://mui.com/x/react-charts/scatter/#performance).
31
30
  */
32
- export declare function BatchScatter(props: BatchScatterProps): React.JSX.Element;
31
+ export declare function BatchScatter(props: BatchScatterProps): import("react/jsx-runtime").JSX.Element;
@@ -119,10 +119,10 @@ export function BatchScatter(props) {
119
119
  const {
120
120
  store
121
121
  } = useChartContext();
122
- const isSeriesHighlighted = useSelector(store, selectorChartIsSeriesHighlighted, [series.id]);
123
- const isSeriesFaded = useSelector(store, selectorChartIsSeriesFaded, [series.id]);
124
- const seriesHighlightedItem = useSelector(store, selectorChartSeriesHighlightedItem, [series.id]);
125
- const seriesUnfadedItem = useSelector(store, selectorChartSeriesUnfadedItem, [series.id]);
122
+ const isSeriesHighlighted = useSelector(store, selectorChartIsSeriesHighlighted, series.id);
123
+ const isSeriesFaded = useSelector(store, selectorChartIsSeriesFaded, series.id);
124
+ const seriesHighlightedItem = useSelector(store, selectorChartSeriesHighlightedItem, series.id);
125
+ const seriesUnfadedItem = useSelector(store, selectorChartSeriesUnfadedItem, series.id);
126
126
  const highlightedModifier = 1.2;
127
127
  const markerSize = series.markerSize * (isSeriesHighlighted ? highlightedModifier : 1);
128
128
  const classes = useUtilityClasses(inClasses);
@@ -9,7 +9,12 @@ export interface ScatterProps {
9
9
  xScale: D3Scale;
10
10
  yScale: D3Scale;
11
11
  color: string;
12
- colorGetter?: ColorGetter<'scatter'>;
12
+ /**
13
+ * Function to get the color of a scatter item given its data index.
14
+ * The data index argument is optional. If not provided, the color for the entire series is returned.
15
+ * If provided, the color for the specific scatter item is returned.
16
+ */
17
+ colorGetter: ColorGetter<'scatter'>;
13
18
  /**
14
19
  * Callback fired when clicking on a scatter item.
15
20
  * @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
@@ -32,7 +37,7 @@ export interface ScatterSlotProps extends ScatterMarkerSlotProps {}
32
37
  *
33
38
  * - [Scatter API](https://mui.com/x/api/charts/scatter/)
34
39
  */
35
- declare function Scatter(props: ScatterProps): React.JSX.Element;
40
+ declare function Scatter(props: ScatterProps): import("react/jsx-runtime").JSX.Element;
36
41
  declare namespace Scatter {
37
42
  var propTypes: any;
38
43
  }
@@ -32,7 +32,6 @@ function Scatter(props) {
32
32
  series,
33
33
  xScale,
34
34
  yScale,
35
- color,
36
35
  colorGetter,
37
36
  onItemClick,
38
37
  classes: inClasses,
@@ -76,7 +75,7 @@ function Scatter(props) {
76
75
  });
77
76
  return /*#__PURE__*/_jsx(Marker, _extends({
78
77
  dataIndex: dataPoint.dataIndex,
79
- color: colorGetter ? colorGetter(dataPoint.dataIndex) : color,
78
+ color: colorGetter(dataPoint.dataIndex),
80
79
  isHighlighted: isItemHighlighted,
81
80
  isFaded: isItemFaded,
82
81
  x: dataPoint.x,
@@ -100,7 +99,12 @@ process.env.NODE_ENV !== "production" ? Scatter.propTypes = {
100
99
  // ----------------------------------------------------------------------
101
100
  classes: PropTypes.object,
102
101
  color: PropTypes.string.isRequired,
103
- colorGetter: PropTypes.func,
102
+ /**
103
+ * Function to get the color of a scatter item given its data index.
104
+ * The data index argument is optional. If not provided, the color for the entire series is returned.
105
+ * If provided, the color for the specific scatter item is returned.
106
+ */
107
+ colorGetter: PropTypes.func.isRequired,
104
108
  /**
105
109
  * Callback fired when clicking on a scatter item.
106
110
  * @param {MouseEvent} event Mouse event recorded on the `<svg/>` element.
@@ -39,7 +39,7 @@ export interface ScatterMarkerProps {
39
39
  */
40
40
  onClick?: (event: React.MouseEvent<SVGElement, MouseEvent>) => void;
41
41
  }
42
- declare function ScatterMarker(props: ScatterMarkerProps): React.JSX.Element;
42
+ declare function ScatterMarker(props: ScatterMarkerProps): import("react/jsx-runtime").JSX.Element;
43
43
  declare namespace ScatterMarker {
44
44
  var propTypes: any;
45
45
  }
@@ -38,7 +38,7 @@ export interface ScatterPlotProps extends Pick<ScatterProps, 'onItemClick'> {
38
38
  *
39
39
  * - [ScatterPlot API](https://mui.com/x/api/charts/scatter-plot/)
40
40
  */
41
- declare function ScatterPlot(props: ScatterPlotProps): React.JSX.Element | null;
41
+ declare function ScatterPlot(props: ScatterPlotProps): import("react/jsx-runtime").JSX.Element | null;
42
42
  declare namespace ScatterPlot {
43
43
  var propTypes: any;
44
44
  }
@@ -7,7 +7,7 @@ import { Scatter } from "./Scatter.js";
7
7
  import { useScatterSeriesContext } from "../hooks/useScatterSeries.js";
8
8
  import { useXAxes, useYAxes } from "../hooks/index.js";
9
9
  import { useZAxes } from "../hooks/useZAxis.js";
10
- import { seriesConfig as scatterSeriesConfig } from "./seriesConfig/index.js";
10
+ import { scatterSeriesConfig } from "./seriesConfig/index.js";
11
11
  import { BatchScatter } from "./BatchScatter.js";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  /**