@mui/x-charts 8.0.0-beta.1 → 8.0.0-beta.3

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 (450) hide show
  1. package/BarChart/AnimatedBarElement.d.ts +38 -8
  2. package/BarChart/AnimatedBarElement.js +5 -5
  3. package/BarChart/BarChart.js +2 -0
  4. package/BarChart/BarClipPath.d.ts +19 -1
  5. package/BarChart/BarClipPath.js +84 -17
  6. package/BarChart/BarElement.d.ts +9 -20
  7. package/BarChart/BarElement.js +29 -26
  8. package/BarChart/BarLabel/BarLabel.d.ts +27 -854
  9. package/BarChart/BarLabel/BarLabel.js +32 -5
  10. package/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
  11. package/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
  12. package/BarChart/BarLabel/BarLabelItem.js +18 -6
  13. package/BarChart/BarLabel/BarLabelPlot.js +16 -46
  14. package/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
  15. package/BarChart/BarLabel/barLabelClasses.js +4 -3
  16. package/BarChart/BarPlot.js +37 -61
  17. package/BarChart/barElementClasses.d.ts +21 -0
  18. package/BarChart/barElementClasses.js +29 -0
  19. package/BarChart/getRadius.d.ts +1 -1
  20. package/BarChart/index.d.ts +2 -1
  21. package/BarChart/index.js +11 -0
  22. package/BarChart/seriesConfig/index.js +3 -1
  23. package/BarChart/seriesConfig/tooltip.d.ts +2 -1
  24. package/BarChart/seriesConfig/tooltip.js +14 -1
  25. package/BarChart/types.d.ts +2 -2
  26. package/BarChart/useBarChartProps.d.ts +2 -1
  27. package/BarChart/useBarChartProps.js +20 -13
  28. package/CHANGELOG.md +235 -0
  29. package/ChartContainer/ChartContainer.js +4 -0
  30. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  31. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  32. package/ChartsLabel/ChartsLabelMark.js +0 -4
  33. package/ChartsLabel/index.d.ts +1 -0
  34. package/ChartsLabel/index.js +7 -0
  35. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  36. package/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  37. package/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  38. package/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  39. package/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  40. package/ChartsTooltip/ChartsTooltip.js +2 -2
  41. package/ChartsTooltip/ChartsTooltipContainer.js +4 -8
  42. package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  43. package/ChartsTooltip/ChartsTooltipTable.js +24 -9
  44. package/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  45. package/ChartsTooltip/chartsTooltipClasses.js +2 -2
  46. package/ChartsTooltip/index.d.ts +1 -0
  47. package/ChartsTooltip/index.js +12 -0
  48. package/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  49. package/ChartsTooltip/useAxesTooltip.js +18 -0
  50. package/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  51. package/ChartsTooltip/useAxisTooltip.js +72 -38
  52. package/ChartsTooltip/useItemTooltip.js +4 -1
  53. package/ChartsXAxis/ChartsXAxis.js +5 -2
  54. package/ChartsYAxis/ChartsYAxis.js +69 -17
  55. package/LineChart/AnimatedArea.js +5 -22
  56. package/LineChart/AnimatedLine.d.ts +1 -4
  57. package/LineChart/AnimatedLine.js +10 -25
  58. package/LineChart/AppearingMask.d.ts +5 -0
  59. package/LineChart/AppearingMask.js +25 -18
  60. package/LineChart/CircleMarkElement.js +17 -23
  61. package/LineChart/LineChart.js +2 -0
  62. package/LineChart/LineHighlightPlot.js +3 -4
  63. package/LineChart/MarkElement.js +16 -27
  64. package/LineChart/MarkPlot.js +0 -1
  65. package/LineChart/markElementClasses.d.ts +3 -0
  66. package/LineChart/markElementClasses.js +4 -3
  67. package/LineChart/seriesConfig/index.js +3 -1
  68. package/LineChart/seriesConfig/tooltip.d.ts +2 -1
  69. package/LineChart/seriesConfig/tooltip.js +8 -1
  70. package/LineChart/useLineChartProps.d.ts +2 -1
  71. package/LineChart/useLineChartProps.js +7 -4
  72. package/PieChart/PieArc.d.ts +19 -11
  73. package/PieChart/PieArc.js +37 -24
  74. package/PieChart/PieArcLabel.d.ts +22 -13
  75. package/PieChart/PieArcLabel.js +52 -48
  76. package/PieChart/PieArcLabelPlot.js +16 -34
  77. package/PieChart/PieArcPlot.js +21 -34
  78. package/PieChart/seriesConfig/tooltip.js +3 -0
  79. package/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  80. package/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  81. package/RadarChart/RadarGrid/RadarGrid.js +5 -1
  82. package/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  83. package/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  84. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  85. package/ScatterChart/ScatterChart.js +2 -0
  86. package/ScatterChart/useScatterChartProps.d.ts +2 -1
  87. package/ScatterChart/useScatterChartProps.js +6 -3
  88. package/SparkLineChart/SparkLineChart.js +2 -0
  89. package/colorPalettes/colorPalettes.js +2 -2
  90. package/constants/index.d.ts +1 -1
  91. package/constants/index.js +1 -1
  92. package/context/AnimationProvider/AnimationProvider.js +4 -6
  93. package/esm/BarChart/AnimatedBarElement.d.ts +38 -8
  94. package/esm/BarChart/AnimatedBarElement.js +5 -5
  95. package/esm/BarChart/BarChart.js +2 -0
  96. package/esm/BarChart/BarClipPath.d.ts +19 -1
  97. package/esm/BarChart/BarClipPath.js +84 -17
  98. package/esm/BarChart/BarElement.d.ts +9 -20
  99. package/esm/BarChart/BarElement.js +28 -23
  100. package/esm/BarChart/BarLabel/BarLabel.d.ts +27 -854
  101. package/esm/BarChart/BarLabel/BarLabel.js +32 -5
  102. package/esm/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
  103. package/esm/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
  104. package/esm/BarChart/BarLabel/BarLabelItem.js +18 -6
  105. package/esm/BarChart/BarLabel/BarLabelPlot.js +16 -46
  106. package/esm/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
  107. package/esm/BarChart/BarLabel/barLabelClasses.js +4 -3
  108. package/esm/BarChart/BarPlot.js +37 -61
  109. package/esm/BarChart/barElementClasses.d.ts +21 -0
  110. package/esm/BarChart/barElementClasses.js +19 -0
  111. package/esm/BarChart/getRadius.d.ts +1 -1
  112. package/esm/BarChart/index.d.ts +2 -1
  113. package/esm/BarChart/index.js +2 -1
  114. package/esm/BarChart/seriesConfig/index.js +2 -1
  115. package/esm/BarChart/seriesConfig/tooltip.d.ts +2 -1
  116. package/esm/BarChart/seriesConfig/tooltip.js +12 -0
  117. package/esm/BarChart/types.d.ts +2 -2
  118. package/esm/BarChart/useBarChartProps.d.ts +2 -1
  119. package/esm/BarChart/useBarChartProps.js +19 -13
  120. package/esm/ChartContainer/ChartContainer.js +4 -0
  121. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  122. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  123. package/esm/ChartsLabel/ChartsLabelMark.js +0 -4
  124. package/esm/ChartsLabel/index.d.ts +1 -0
  125. package/esm/ChartsLabel/index.js +1 -0
  126. package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  127. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  128. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  129. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  130. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  131. package/esm/ChartsTooltip/ChartsTooltip.js +2 -2
  132. package/esm/ChartsTooltip/ChartsTooltipContainer.js +5 -9
  133. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  134. package/esm/ChartsTooltip/ChartsTooltipTable.js +23 -9
  135. package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  136. package/esm/ChartsTooltip/chartsTooltipClasses.js +2 -2
  137. package/esm/ChartsTooltip/index.d.ts +1 -0
  138. package/esm/ChartsTooltip/index.js +1 -0
  139. package/esm/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  140. package/esm/ChartsTooltip/useAxesTooltip.js +12 -0
  141. package/esm/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  142. package/esm/ChartsTooltip/useAxisTooltip.js +72 -38
  143. package/esm/ChartsTooltip/useItemTooltip.js +4 -1
  144. package/esm/ChartsXAxis/ChartsXAxis.js +5 -2
  145. package/esm/ChartsYAxis/ChartsYAxis.js +69 -17
  146. package/esm/LineChart/AnimatedArea.js +5 -22
  147. package/esm/LineChart/AnimatedLine.d.ts +1 -4
  148. package/esm/LineChart/AnimatedLine.js +9 -24
  149. package/esm/LineChart/AppearingMask.d.ts +5 -0
  150. package/esm/LineChart/AppearingMask.js +23 -18
  151. package/esm/LineChart/CircleMarkElement.js +19 -25
  152. package/esm/LineChart/LineChart.js +2 -0
  153. package/esm/LineChart/LineHighlightPlot.js +3 -4
  154. package/esm/LineChart/MarkElement.js +17 -28
  155. package/esm/LineChart/MarkPlot.js +0 -1
  156. package/esm/LineChart/markElementClasses.d.ts +3 -0
  157. package/esm/LineChart/markElementClasses.js +4 -3
  158. package/esm/LineChart/seriesConfig/index.js +2 -1
  159. package/esm/LineChart/seriesConfig/tooltip.d.ts +2 -1
  160. package/esm/LineChart/seriesConfig/tooltip.js +6 -0
  161. package/esm/LineChart/useLineChartProps.d.ts +2 -1
  162. package/esm/LineChart/useLineChartProps.js +6 -4
  163. package/esm/PieChart/PieArc.d.ts +19 -11
  164. package/esm/PieChart/PieArc.js +36 -23
  165. package/esm/PieChart/PieArcLabel.d.ts +22 -13
  166. package/esm/PieChart/PieArcLabel.js +51 -47
  167. package/esm/PieChart/PieArcLabelPlot.js +16 -34
  168. package/esm/PieChart/PieArcPlot.js +21 -34
  169. package/esm/PieChart/seriesConfig/tooltip.js +3 -0
  170. package/esm/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  171. package/esm/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  172. package/esm/RadarChart/RadarGrid/RadarGrid.js +5 -1
  173. package/esm/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  174. package/esm/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  175. package/esm/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  176. package/esm/ScatterChart/ScatterChart.js +2 -0
  177. package/esm/ScatterChart/useScatterChartProps.d.ts +2 -1
  178. package/esm/ScatterChart/useScatterChartProps.js +5 -3
  179. package/esm/SparkLineChart/SparkLineChart.js +2 -0
  180. package/esm/colorPalettes/colorPalettes.js +2 -2
  181. package/esm/constants/index.d.ts +1 -1
  182. package/esm/constants/index.js +1 -1
  183. package/esm/context/AnimationProvider/AnimationProvider.js +3 -6
  184. package/esm/hooks/animation/index.d.ts +6 -0
  185. package/esm/hooks/animation/index.js +6 -0
  186. package/esm/hooks/animation/useAnimateArea.d.ts +15 -0
  187. package/esm/hooks/animation/useAnimateArea.js +27 -0
  188. package/esm/hooks/animation/useAnimateBar.d.ts +17 -0
  189. package/esm/hooks/animation/useAnimateBar.js +56 -0
  190. package/esm/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  191. package/esm/hooks/animation/useAnimateBarLabel.js +59 -0
  192. package/esm/hooks/animation/useAnimateLine.d.ts +14 -0
  193. package/esm/hooks/animation/useAnimateLine.js +26 -0
  194. package/esm/hooks/animation/useAnimatePieArc.d.ts +15 -0
  195. package/esm/hooks/animation/useAnimatePieArc.js +70 -0
  196. package/esm/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  197. package/esm/hooks/animation/useAnimatePieArcLabel.js +72 -0
  198. package/esm/hooks/index.d.ts +2 -1
  199. package/esm/hooks/index.js +2 -1
  200. package/esm/hooks/useAxis.d.ts +5 -5
  201. package/esm/hooks/useInteractionItemProps.js +11 -0
  202. package/esm/hooks/useScale.d.ts +2 -2
  203. package/esm/hooks/useScale.js +2 -2
  204. package/esm/index.js +1 -1
  205. package/esm/internals/animation/Transition.d.ts +37 -0
  206. package/esm/internals/animation/Transition.js +83 -0
  207. package/esm/internals/animation/animation.d.ts +4 -0
  208. package/esm/internals/animation/animation.js +4 -0
  209. package/esm/internals/animation/useAnimate.d.ts +19 -0
  210. package/esm/internals/animation/useAnimate.js +74 -0
  211. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  212. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  213. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  214. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
  215. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  216. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
  217. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  218. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  219. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +9 -42
  220. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  221. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
  222. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +75 -0
  223. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  224. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  225. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
  226. package/esm/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  227. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  228. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
  229. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  230. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
  231. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
  232. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  233. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
  234. package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  235. package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  236. package/esm/internals/shallowEqual.d.ts +8 -0
  237. package/esm/internals/shallowEqual.js +31 -0
  238. package/esm/models/axis.d.ts +8 -0
  239. package/esm/themeAugmentation/overrides.d.ts +1 -1
  240. package/hooks/animation/index.d.ts +6 -0
  241. package/hooks/animation/index.js +71 -0
  242. package/hooks/animation/useAnimateArea.d.ts +15 -0
  243. package/hooks/animation/useAnimateArea.js +34 -0
  244. package/hooks/animation/useAnimateBar.d.ts +17 -0
  245. package/hooks/animation/useAnimateBar.js +62 -0
  246. package/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  247. package/hooks/animation/useAnimateBarLabel.js +65 -0
  248. package/hooks/animation/useAnimateLine.d.ts +14 -0
  249. package/hooks/animation/useAnimateLine.js +33 -0
  250. package/hooks/animation/useAnimatePieArc.d.ts +15 -0
  251. package/hooks/animation/useAnimatePieArc.js +77 -0
  252. package/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  253. package/hooks/animation/useAnimatePieArcLabel.js +79 -0
  254. package/hooks/index.d.ts +2 -1
  255. package/hooks/index.js +13 -1
  256. package/hooks/useAxis.d.ts +5 -5
  257. package/hooks/useInteractionItemProps.js +11 -0
  258. package/hooks/useScale.d.ts +2 -2
  259. package/hooks/useScale.js +2 -2
  260. package/index.js +1 -1
  261. package/internals/animation/Transition.d.ts +37 -0
  262. package/internals/animation/Transition.js +89 -0
  263. package/internals/animation/animation.d.ts +4 -0
  264. package/internals/animation/animation.js +11 -0
  265. package/internals/animation/useAnimate.d.ts +19 -0
  266. package/internals/animation/useAnimate.js +80 -0
  267. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  268. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  269. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  270. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +28 -0
  271. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  272. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +29 -22
  273. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  274. package/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +12 -0
  275. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +7 -40
  276. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  277. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
  278. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +81 -0
  279. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  280. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  281. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +5 -11
  282. package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  283. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  284. package/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +17 -0
  285. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  286. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +19 -13
  287. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
  288. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  289. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +28 -0
  290. package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  291. package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  292. package/internals/shallowEqual.d.ts +8 -0
  293. package/internals/shallowEqual.js +37 -0
  294. package/models/axis.d.ts +8 -0
  295. package/modern/BarChart/AnimatedBarElement.d.ts +38 -8
  296. package/modern/BarChart/AnimatedBarElement.js +5 -5
  297. package/modern/BarChart/BarChart.js +2 -0
  298. package/modern/BarChart/BarClipPath.d.ts +19 -1
  299. package/modern/BarChart/BarClipPath.js +84 -17
  300. package/modern/BarChart/BarElement.d.ts +9 -20
  301. package/modern/BarChart/BarElement.js +28 -23
  302. package/modern/BarChart/BarLabel/BarLabel.d.ts +27 -854
  303. package/modern/BarChart/BarLabel/BarLabel.js +32 -5
  304. package/modern/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
  305. package/modern/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
  306. package/modern/BarChart/BarLabel/BarLabelItem.js +18 -6
  307. package/modern/BarChart/BarLabel/BarLabelPlot.js +16 -46
  308. package/modern/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
  309. package/modern/BarChart/BarLabel/barLabelClasses.js +4 -3
  310. package/modern/BarChart/BarPlot.js +37 -61
  311. package/modern/BarChart/barElementClasses.d.ts +21 -0
  312. package/modern/BarChart/barElementClasses.js +19 -0
  313. package/modern/BarChart/getRadius.d.ts +1 -1
  314. package/modern/BarChart/index.d.ts +2 -1
  315. package/modern/BarChart/index.js +2 -1
  316. package/modern/BarChart/seriesConfig/index.js +2 -1
  317. package/modern/BarChart/seriesConfig/tooltip.d.ts +2 -1
  318. package/modern/BarChart/seriesConfig/tooltip.js +12 -0
  319. package/modern/BarChart/types.d.ts +2 -2
  320. package/modern/BarChart/useBarChartProps.d.ts +2 -1
  321. package/modern/BarChart/useBarChartProps.js +19 -13
  322. package/modern/ChartContainer/ChartContainer.js +4 -0
  323. package/modern/ChartsAxisHighlight/ChartsXAxisHighlight.js +8 -8
  324. package/modern/ChartsAxisHighlight/ChartsYAxisHighlight.js +8 -8
  325. package/modern/ChartsLabel/ChartsLabelMark.js +0 -4
  326. package/modern/ChartsLabel/index.d.ts +1 -0
  327. package/modern/ChartsLabel/index.js +1 -0
  328. package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  329. package/modern/ChartsOverlay/ChartsLoadingOverlay.js +1 -1
  330. package/modern/ChartsOverlay/ChartsNoDataOverlay.js +1 -1
  331. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  332. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  333. package/modern/ChartsTooltip/ChartsTooltip.js +2 -2
  334. package/modern/ChartsTooltip/ChartsTooltipContainer.js +5 -9
  335. package/modern/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  336. package/modern/ChartsTooltip/ChartsTooltipTable.js +23 -9
  337. package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  338. package/modern/ChartsTooltip/chartsTooltipClasses.js +2 -2
  339. package/modern/ChartsTooltip/index.d.ts +1 -0
  340. package/modern/ChartsTooltip/index.js +1 -0
  341. package/modern/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  342. package/modern/ChartsTooltip/useAxesTooltip.js +12 -0
  343. package/modern/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  344. package/modern/ChartsTooltip/useAxisTooltip.js +72 -38
  345. package/modern/ChartsTooltip/useItemTooltip.js +4 -1
  346. package/modern/ChartsXAxis/ChartsXAxis.js +5 -2
  347. package/modern/ChartsYAxis/ChartsYAxis.js +69 -17
  348. package/modern/LineChart/AnimatedArea.js +5 -22
  349. package/modern/LineChart/AnimatedLine.d.ts +1 -4
  350. package/modern/LineChart/AnimatedLine.js +9 -24
  351. package/modern/LineChart/AppearingMask.d.ts +5 -0
  352. package/modern/LineChart/AppearingMask.js +23 -18
  353. package/modern/LineChart/CircleMarkElement.js +19 -25
  354. package/modern/LineChart/LineChart.js +2 -0
  355. package/modern/LineChart/LineHighlightPlot.js +3 -4
  356. package/modern/LineChart/MarkElement.js +17 -28
  357. package/modern/LineChart/MarkPlot.js +0 -1
  358. package/modern/LineChart/markElementClasses.d.ts +3 -0
  359. package/modern/LineChart/markElementClasses.js +4 -3
  360. package/modern/LineChart/seriesConfig/index.js +2 -1
  361. package/modern/LineChart/seriesConfig/tooltip.d.ts +2 -1
  362. package/modern/LineChart/seriesConfig/tooltip.js +6 -0
  363. package/modern/LineChart/useLineChartProps.d.ts +2 -1
  364. package/modern/LineChart/useLineChartProps.js +6 -4
  365. package/modern/PieChart/PieArc.d.ts +19 -11
  366. package/modern/PieChart/PieArc.js +36 -23
  367. package/modern/PieChart/PieArcLabel.d.ts +22 -13
  368. package/modern/PieChart/PieArcLabel.js +51 -47
  369. package/modern/PieChart/PieArcLabelPlot.js +16 -34
  370. package/modern/PieChart/PieArcPlot.js +21 -34
  371. package/modern/PieChart/seriesConfig/tooltip.js +3 -0
  372. package/modern/RadarChart/RadarAxisHighlight/useRadarAxisHighlight.js +9 -5
  373. package/modern/RadarChart/RadarGrid/RadarGrid.d.ts +1 -1
  374. package/modern/RadarChart/RadarGrid/RadarGrid.js +5 -1
  375. package/modern/RadarChart/RadarGrid/useRadarGridData.d.ts +1 -1
  376. package/modern/RadarChart/RadarGrid/useRadarGridData.js +3 -0
  377. package/modern/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +2 -2
  378. package/modern/ScatterChart/ScatterChart.js +2 -0
  379. package/modern/ScatterChart/useScatterChartProps.d.ts +2 -1
  380. package/modern/ScatterChart/useScatterChartProps.js +5 -3
  381. package/modern/SparkLineChart/SparkLineChart.js +2 -0
  382. package/modern/colorPalettes/colorPalettes.js +2 -2
  383. package/modern/constants/index.d.ts +1 -1
  384. package/modern/constants/index.js +1 -1
  385. package/modern/context/AnimationProvider/AnimationProvider.js +3 -6
  386. package/modern/hooks/animation/index.d.ts +6 -0
  387. package/modern/hooks/animation/index.js +6 -0
  388. package/modern/hooks/animation/useAnimateArea.d.ts +15 -0
  389. package/modern/hooks/animation/useAnimateArea.js +27 -0
  390. package/modern/hooks/animation/useAnimateBar.d.ts +17 -0
  391. package/modern/hooks/animation/useAnimateBar.js +56 -0
  392. package/modern/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  393. package/modern/hooks/animation/useAnimateBarLabel.js +59 -0
  394. package/modern/hooks/animation/useAnimateLine.d.ts +14 -0
  395. package/modern/hooks/animation/useAnimateLine.js +26 -0
  396. package/modern/hooks/animation/useAnimatePieArc.d.ts +15 -0
  397. package/modern/hooks/animation/useAnimatePieArc.js +70 -0
  398. package/modern/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  399. package/modern/hooks/animation/useAnimatePieArcLabel.js +72 -0
  400. package/modern/hooks/index.d.ts +2 -1
  401. package/modern/hooks/index.js +2 -1
  402. package/modern/hooks/useAxis.d.ts +5 -5
  403. package/modern/hooks/useInteractionItemProps.js +11 -0
  404. package/modern/hooks/useScale.d.ts +2 -2
  405. package/modern/hooks/useScale.js +2 -2
  406. package/modern/index.js +1 -1
  407. package/modern/internals/animation/Transition.d.ts +37 -0
  408. package/modern/internals/animation/Transition.js +83 -0
  409. package/modern/internals/animation/animation.d.ts +4 -0
  410. package/modern/internals/animation/animation.js +4 -0
  411. package/modern/internals/animation/useAnimate.d.ts +19 -0
  412. package/modern/internals/animation/useAnimate.js +74 -0
  413. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  414. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  415. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  416. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
  417. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.d.ts +8 -6
  418. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +28 -22
  419. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.d.ts +1 -0
  420. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/index.js +1 -0
  421. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +9 -42
  422. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  423. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -0
  424. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +75 -0
  425. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.js +7 -20
  426. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +36 -242
  427. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.js +4 -10
  428. package/modern/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.types.d.ts +9 -15
  429. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.d.ts +12 -0
  430. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/coordinateTransformation.js +8 -0
  431. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.d.ts +6 -4
  432. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/getAxisValue.js +18 -13
  433. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarAxis.js +16 -32
  434. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.d.ts +3669 -0
  435. package/modern/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +22 -0
  436. package/modern/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  437. package/modern/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  438. package/modern/internals/shallowEqual.d.ts +8 -0
  439. package/modern/internals/shallowEqual.js +31 -0
  440. package/modern/models/axis.d.ts +8 -0
  441. package/modern/themeAugmentation/overrides.d.ts +1 -1
  442. package/package.json +8 -9
  443. package/themeAugmentation/overrides.d.ts +1 -1
  444. package/tsconfig.build.tsbuildinfo +1 -1
  445. package/PieChart/dataTransform/transition.d.ts +0 -4
  446. package/PieChart/dataTransform/transition.js +0 -145
  447. package/esm/PieChart/dataTransform/transition.d.ts +0 -4
  448. package/esm/PieChart/dataTransform/transition.js +0 -137
  449. package/modern/PieChart/dataTransform/transition.d.ts +0 -4
  450. package/modern/PieChart/dataTransform/transition.js +0 -137
@@ -151,6 +151,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
151
151
  height: PropTypes.number,
152
152
  hideTooltip: PropTypes.bool,
153
153
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
154
+ ignoreTooltip: PropTypes.bool,
154
155
  label: PropTypes.string,
155
156
  labelStyle: PropTypes.object,
156
157
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -208,6 +209,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
208
209
  height: PropTypes.number,
209
210
  hideTooltip: PropTypes.bool,
210
211
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
212
+ ignoreTooltip: PropTypes.bool,
211
213
  label: PropTypes.string,
212
214
  labelGap: PropTypes.number,
213
215
  labelStyle: PropTypes.object,
@@ -288,6 +290,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
288
290
  height: PropTypes.number,
289
291
  hideTooltip: PropTypes.bool,
290
292
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
293
+ ignoreTooltip: PropTypes.bool,
291
294
  label: PropTypes.string,
292
295
  labelStyle: PropTypes.object,
293
296
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -343,6 +346,7 @@ process.env.NODE_ENV !== "production" ? ChartContainer.propTypes = {
343
346
  fill: PropTypes.string,
344
347
  hideTooltip: PropTypes.bool,
345
348
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
349
+ ignoreTooltip: PropTypes.bool,
346
350
  label: PropTypes.string,
347
351
  labelStyle: PropTypes.object,
348
352
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -5,7 +5,7 @@ import { getValueToPositionMapper, useXScale } from "../hooks/useScale.js";
5
5
  import { isBandScale } from "../internals/isBandScale.js";
6
6
  import { useSelector } from "../internals/store/useSelector.js";
7
7
  import { useStore } from "../internals/store/useStore.js";
8
- import { selectorChartsInteractionXAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
8
+ import { selectorChartsInteractionXAxisValue } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
9
9
  import { useDrawingArea } from "../hooks/index.js";
10
10
  import { ChartsAxisHighlightPath } from "./ChartsAxisHighlightPath.js";
11
11
 
@@ -24,26 +24,26 @@ export default function ChartsXHighlight(props) {
24
24
  } = useDrawingArea();
25
25
  const xScale = useXScale();
26
26
  const store = useStore();
27
- const axisX = useSelector(store, selectorChartsInteractionXAxis);
27
+ const axisXValue = useSelector(store, selectorChartsInteractionXAxisValue);
28
28
  const getXPosition = getValueToPositionMapper(xScale);
29
- const isBandScaleX = type === 'band' && axisX !== null && isBandScale(xScale);
29
+ const isBandScaleX = type === 'band' && axisXValue !== null && isBandScale(xScale);
30
30
  if (process.env.NODE_ENV !== 'production') {
31
- const isError = isBandScaleX && xScale(axisX.value) === undefined;
31
+ const isError = isBandScaleX && xScale(axisXValue) === undefined;
32
32
  if (isError) {
33
33
  console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
34
34
  }
35
35
  }
36
36
  return /*#__PURE__*/_jsxs(React.Fragment, {
37
- children: [isBandScaleX && xScale(axisX.value) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath
37
+ children: [isBandScaleX && xScale(axisXValue) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath
38
38
  // @ts-expect-error, xScale value is checked in the statement above
39
39
  , {
40
- d: `M ${xScale(axisX.value) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
40
+ d: `M ${xScale(axisXValue) - (xScale.step() - xScale.bandwidth()) / 2} ${top} l ${xScale.step()} 0 l 0 ${height} l ${-xScale.step()} 0 Z`,
41
41
  className: classes.root,
42
42
  ownerState: {
43
43
  axisHighlight: 'band'
44
44
  }
45
- }), type === 'line' && axisX !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
46
- d: `M ${getXPosition(axisX.value)} ${top} L ${getXPosition(axisX.value)} ${top + height}`,
45
+ }), type === 'line' && axisXValue !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
46
+ d: `M ${getXPosition(axisXValue)} ${top} L ${getXPosition(axisXValue)} ${top + height}`,
47
47
  className: classes.root,
48
48
  ownerState: {
49
49
  axisHighlight: 'line'
@@ -5,7 +5,7 @@ import { getValueToPositionMapper, useYScale } from "../hooks/useScale.js";
5
5
  import { isBandScale } from "../internals/isBandScale.js";
6
6
  import { useSelector } from "../internals/store/useSelector.js";
7
7
  import { useStore } from "../internals/store/useStore.js";
8
- import { selectorChartsInteractionYAxis } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
8
+ import { selectorChartsInteractionYAxisValue } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
9
9
  import { useDrawingArea } from "../hooks/index.js";
10
10
  import { ChartsAxisHighlightPath } from "./ChartsAxisHighlightPath.js";
11
11
 
@@ -24,26 +24,26 @@ export default function ChartsYHighlight(props) {
24
24
  } = useDrawingArea();
25
25
  const yScale = useYScale();
26
26
  const store = useStore();
27
- const axisY = useSelector(store, selectorChartsInteractionYAxis);
27
+ const axisYValue = useSelector(store, selectorChartsInteractionYAxisValue);
28
28
  const getYPosition = getValueToPositionMapper(yScale);
29
- const isBandScaleY = type === 'band' && axisY !== null && isBandScale(yScale);
29
+ const isBandScaleY = type === 'band' && axisYValue !== null && isBandScale(yScale);
30
30
  if (process.env.NODE_ENV !== 'production') {
31
- const isError = isBandScaleY && yScale(axisY.value) === undefined;
31
+ const isError = isBandScaleY && yScale(axisYValue) === undefined;
32
32
  if (isError) {
33
33
  console.error([`MUI X: The position value provided for the axis is not valid for the current scale.`, `This probably means something is wrong with the data passed to the chart.`, `The ChartsAxisHighlight component will not be displayed.`].join('\n'));
34
34
  }
35
35
  }
36
36
  return /*#__PURE__*/_jsxs(React.Fragment, {
37
- children: [isBandScaleY && yScale(axisY.value) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
37
+ children: [isBandScaleY && yScale(axisYValue) !== undefined && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
38
38
  d: `M ${left} ${
39
39
  // @ts-expect-error, yScale value is checked in the statement above
40
- yScale(axisY.value) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
40
+ yScale(axisYValue) - (yScale.step() - yScale.bandwidth()) / 2} l 0 ${yScale.step()} l ${width} 0 l 0 ${-yScale.step()} Z`,
41
41
  className: classes.root,
42
42
  ownerState: {
43
43
  axisHighlight: 'band'
44
44
  }
45
- }), type === 'line' && axisY !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
46
- d: `M ${left} ${getYPosition(axisY.value)} L ${left + width} ${getYPosition(axisY.value)}`,
45
+ }), type === 'line' && axisYValue !== null && /*#__PURE__*/_jsx(ChartsAxisHighlightPath, {
46
+ d: `M ${left} ${getYPosition(axisYValue)} L ${left + width} ${getYPosition(axisYValue)}`,
47
47
  className: classes.root,
48
48
  ownerState: {
49
49
  axisHighlight: 'line'
@@ -17,15 +17,11 @@ const Root = styled('div', {
17
17
  })(() => {
18
18
  return {
19
19
  display: 'flex',
20
- alignItems: 'center',
21
- justifyContent: 'center',
22
- flexShrink: 0,
23
20
  width: 14,
24
21
  height: 14,
25
22
  [`&.${labelMarkClasses.line}`]: {
26
23
  width: 16,
27
24
  height: 'unset',
28
- display: 'flex',
29
25
  alignItems: 'center',
30
26
  [`.${labelMarkClasses.mask}`]: {
31
27
  height: 4,
@@ -1,4 +1,5 @@
1
1
  export type { ChartsLabelMarkProps, ChartsLabelCustomMarkProps } from './ChartsLabelMark';
2
+ export { ChartsLabelMark } from "./ChartsLabelMark.js";
2
3
  export { labelClasses } from "./labelClasses.js";
3
4
  export type { ChartsLabelClasses } from './labelClasses';
4
5
  export { labelMarkClasses } from "./labelMarkClasses.js";
@@ -1,3 +1,4 @@
1
+ export { ChartsLabelMark } from "./ChartsLabelMark.js";
1
2
  export { labelClasses } from "./labelClasses.js";
2
3
  export { labelMarkClasses } from "./labelMarkClasses.js";
3
4
  export { labelGradientClasses } from "./labelGradientClasses.js";
@@ -22,5 +22,5 @@ export interface ContinuousColorLegendClasses {
22
22
  /** Styles applied to the series label. */
23
23
  label: string;
24
24
  }
25
- export declare const useUtilityClasses: (props: ContinuousColorLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "minLabel" | "maxLabel" | "gradient", string>;
25
+ export declare const useUtilityClasses: (props: ContinuousColorLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "gradient" | "minLabel" | "maxLabel", string>;
26
26
  export declare const continuousColorLegendClasses: ContinuousColorLegendClasses;
@@ -11,7 +11,7 @@ const StyledText = styled('text')(({
11
11
  theme
12
12
  }) => _extends({}, theme.typography.body2, {
13
13
  stroke: 'none',
14
- fill: theme.palette.text.primary,
14
+ fill: (theme.vars || theme).palette.text.primary,
15
15
  shapeRendering: 'crispEdges',
16
16
  textAnchor: 'middle',
17
17
  dominantBaseline: 'middle'
@@ -11,7 +11,7 @@ const StyledText = styled('text')(({
11
11
  theme
12
12
  }) => _extends({}, theme.typography.body2, {
13
13
  stroke: 'none',
14
- fill: theme.palette.text.primary,
14
+ fill: (theme.vars || theme).palette.text.primary,
15
15
  shapeRendering: 'crispEdges',
16
16
  textAnchor: 'middle',
17
17
  dominantBaseline: 'middle'
@@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography';
6
6
  import clsx from 'clsx';
7
7
  import { useUtilityClasses } from "./chartsTooltipClasses.js";
8
8
  import { ChartsTooltipCell, ChartsTooltipPaper, ChartsTooltipRow, ChartsTooltipTable } from "./ChartsTooltipTable.js";
9
- import { useAxisTooltip } from "./useAxisTooltip.js";
9
+ import { useAxesTooltip } from "./useAxesTooltip.js";
10
10
  import { useXAxis, useYAxis } from "../hooks/index.js";
11
11
  import { ChartsLabelMark } from "../ChartsLabel/ChartsLabelMark.js";
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,70 +15,62 @@ function ChartsAxisTooltipContent(props) {
15
15
  classes: propClasses,
16
16
  sx
17
17
  } = props;
18
- const tooltipData = useAxisTooltip();
18
+ const tooltipData = useAxesTooltip();
19
19
  const xAxis = useXAxis();
20
20
  const yAxis = useYAxis();
21
21
  const classes = useUtilityClasses(propClasses);
22
22
  if (tooltipData === null) {
23
23
  return null;
24
24
  }
25
- const {
26
- axisDirection,
27
- axisValue,
28
- axisFormattedValue,
29
- seriesItems
30
- } = tooltipData;
31
- const axis = axisDirection === 'x' ? xAxis : yAxis;
32
25
  return /*#__PURE__*/_jsx(ChartsTooltipPaper, {
33
26
  sx: sx,
34
27
  className: classes.paper,
35
- children: /*#__PURE__*/_jsxs(ChartsTooltipTable, {
36
- className: classes.table,
37
- children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx("thead", {
38
- children: /*#__PURE__*/_jsx(ChartsTooltipRow, {
39
- className: classes.row,
40
- children: /*#__PURE__*/_jsx(ChartsTooltipCell, {
41
- colSpan: 3,
42
- className: clsx(classes.cell, classes.axisValueCell),
43
- children: /*#__PURE__*/_jsx(Typography, {
44
- children: axisFormattedValue
45
- })
46
- })
47
- })
48
- }), /*#__PURE__*/_jsx("tbody", {
49
- children: seriesItems.map(({
50
- seriesId,
51
- color,
52
- formattedValue,
53
- formattedLabel,
54
- markType
55
- }) => {
56
- if (formattedValue == null) {
57
- return null;
58
- }
59
- return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
60
- className: classes.row,
61
- children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
62
- className: clsx(classes.markCell, classes.cell),
63
- children: color && /*#__PURE__*/_jsx(ChartsLabelMark, {
64
- type: markType,
65
- color: color,
66
- className: classes.mark
67
- })
68
- }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
69
- className: clsx(classes.labelCell, classes.cell),
70
- children: formattedLabel ? /*#__PURE__*/_jsx(Typography, {
71
- children: formattedLabel
72
- }) : null
73
- }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
74
- className: clsx(classes.valueCell, classes.cell),
75
- children: /*#__PURE__*/_jsx(Typography, {
28
+ children: tooltipData.map(({
29
+ axisId,
30
+ axisDirection,
31
+ axisValue,
32
+ axisFormattedValue,
33
+ seriesItems
34
+ }) => {
35
+ const axis = axisDirection === 'x' ? xAxis : yAxis;
36
+ return /*#__PURE__*/_jsxs(ChartsTooltipTable, {
37
+ className: classes.table,
38
+ children: [axisValue != null && !axis.hideTooltip && /*#__PURE__*/_jsx(Typography, {
39
+ component: "caption",
40
+ children: axisFormattedValue
41
+ }), /*#__PURE__*/_jsx("tbody", {
42
+ children: seriesItems.map(({
43
+ seriesId,
44
+ color,
45
+ formattedValue,
46
+ formattedLabel,
47
+ markType
48
+ }) => {
49
+ if (formattedValue == null) {
50
+ return null;
51
+ }
52
+ return /*#__PURE__*/_jsxs(ChartsTooltipRow, {
53
+ className: classes.row,
54
+ children: [/*#__PURE__*/_jsxs(ChartsTooltipCell, {
55
+ className: clsx(classes.labelCell, classes.cell),
56
+ component: "th",
57
+ children: [/*#__PURE__*/_jsx("div", {
58
+ className: classes.markContainer,
59
+ children: /*#__PURE__*/_jsx(ChartsLabelMark, {
60
+ type: markType,
61
+ color: color,
62
+ className: classes.mark
63
+ })
64
+ }), formattedLabel || null]
65
+ }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
66
+ className: clsx(classes.valueCell, classes.cell),
67
+ component: "td",
76
68
  children: formattedValue
77
- })
78
- })]
79
- }, seriesId);
80
- })
81
- })]
69
+ })]
70
+ }, seriesId);
71
+ })
72
+ })]
73
+ }, axisId);
82
74
  })
83
75
  });
84
76
  }
@@ -32,18 +32,20 @@ function ChartsItemTooltipContent(props) {
32
32
  children: /*#__PURE__*/_jsx("tbody", {
33
33
  children: /*#__PURE__*/_jsxs(ChartsTooltipRow, {
34
34
  className: classes.row,
35
- children: [/*#__PURE__*/_jsx(ChartsTooltipCell, {
36
- className: clsx(classes.markCell, classes.cell),
37
- children: /*#__PURE__*/_jsx(ChartsLabelMark, {
38
- type: markType,
39
- color: color,
40
- className: classes.mark
41
- })
42
- }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
35
+ children: [/*#__PURE__*/_jsxs(ChartsTooltipCell, {
43
36
  className: clsx(classes.labelCell, classes.cell),
44
- children: label
37
+ component: "th",
38
+ children: [/*#__PURE__*/_jsx("div", {
39
+ className: classes.markContainer,
40
+ children: /*#__PURE__*/_jsx(ChartsLabelMark, {
41
+ type: markType,
42
+ color: color,
43
+ className: classes.mark
44
+ })
45
+ }), label]
45
46
  }), /*#__PURE__*/_jsx(ChartsTooltipCell, {
46
47
  className: clsx(classes.valueCell, classes.cell),
48
+ component: "td",
47
49
  children: formattedValue
48
50
  })]
49
51
  })
@@ -58,7 +58,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
58
58
  * The components used for each slot inside the Popper.
59
59
  * Either a string to use a HTML element or a component.
60
60
  *
61
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
61
+ * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
62
62
  * @default {}
63
63
  */
64
64
  components: PropTypes.shape({
@@ -67,7 +67,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltip.propTypes = {
67
67
  /**
68
68
  * The props used for each slot inside the Popper.
69
69
  *
70
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
70
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
71
71
  * @default {}
72
72
  */
73
73
  componentsProps: PropTypes.shape({
@@ -14,8 +14,8 @@ import { useSvgRef } from "../hooks/useSvgRef.js";
14
14
  import { usePointerType } from "./utils.js";
15
15
  import { useSelector } from "../internals/store/useSelector.js";
16
16
  import { useStore } from "../internals/store/useStore.js";
17
- import { useXAxis } from "../hooks/index.js";
18
- import { selectorChartsInteractionItemIsDefined, selectorChartsInteractionXAxisIsDefined, selectorChartsInteractionYAxisIsDefined } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
17
+ import { selectorChartsInteractionItemIsDefined } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
18
+ import { selectorChartsInteractionAxisTooltip } from "../internals/plugins/featurePlugins/useChartCartesianAxis/index.js";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  const ChartsTooltipRoot = styled(Popper, {
21
21
  name: 'MuiChartsTooltip',
@@ -27,7 +27,6 @@ const ChartsTooltipRoot = styled(Popper, {
27
27
  pointerEvents: 'none',
28
28
  zIndex: theme.zIndex.modal
29
29
  }));
30
- const axisHasData = axis => axis?.data !== undefined && axis.data.length !== 0;
31
30
 
32
31
  /**
33
32
  * Demos:
@@ -51,16 +50,13 @@ function ChartsTooltipContainer(inProps) {
51
50
  other = _objectWithoutPropertiesLoose(props, _excluded);
52
51
  const svgRef = useSvgRef();
53
52
  const pointerType = usePointerType();
54
- const xAxis = useXAxis();
55
53
  const popperRef = React.useRef(null);
56
54
  const positionRef = useLazyRef(() => ({
57
55
  x: 0,
58
56
  y: 0
59
57
  }));
60
58
  const store = useStore();
61
- const isOpen = useSelector(store,
62
- // eslint-disable-next-line no-nested-ternary
63
- trigger === 'axis' ? axisHasData(xAxis) ? selectorChartsInteractionXAxisIsDefined : selectorChartsInteractionYAxisIsDefined : selectorChartsInteractionItemIsDefined);
59
+ const isOpen = useSelector(store, trigger === 'axis' ? selectorChartsInteractionAxisTooltip : selectorChartsInteractionItemIsDefined);
64
60
  const popperOpen = pointerType !== null && isOpen; // tooltipHasData;
65
61
 
66
62
  React.useEffect(() => {
@@ -154,7 +150,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltipContainer.propTypes = {
154
150
  * The components used for each slot inside the Popper.
155
151
  * Either a string to use a HTML element or a component.
156
152
  *
157
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
153
+ * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
158
154
  * @default {}
159
155
  */
160
156
  components: PropTypes.shape({
@@ -163,7 +159,7 @@ process.env.NODE_ENV !== "production" ? ChartsTooltipContainer.propTypes = {
163
159
  /**
164
160
  * The props used for each slot inside the Popper.
165
161
  *
166
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
162
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
167
163
  * @default {}
168
164
  */
169
165
  componentsProps: PropTypes.shape({
@@ -13,4 +13,6 @@ export declare const ChartsTooltipRow: import("@emotion/styled").StyledComponent
13
13
  /**
14
14
  * @ignore - internal component.
15
15
  */
16
- export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, Pick<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, keyof import("react").ClassAttributes<HTMLTableDataCellElement> | keyof import("react").TdHTMLAttributes<HTMLTableDataCellElement>>, {}>;
16
+ export declare const ChartsTooltipCell: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "p" | "style" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "className" | "children" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping">, "p" | "slot" | "style" | "title" | "ref" | "typography" | "zIndex" | "classes" | "border" | "boxShadow" | "fontWeight" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "content" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "sx" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
17
+ component?: React.ElementType;
18
+ }, {}, {}>;
@@ -1,4 +1,5 @@
1
1
  import { styled } from '@mui/material/styles';
2
+ import Typography from '@mui/material/Typography';
2
3
  import { chartsTooltipClasses } from "./chartsTooltipClasses.js";
3
4
 
4
5
  /**
@@ -28,8 +29,14 @@ export const ChartsTooltipTable = styled('table', {
28
29
  theme
29
30
  }) => ({
30
31
  borderSpacing: 0,
31
- '& thead td': {
32
- borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`
32
+ '& caption': {
33
+ borderBottom: `solid ${(theme.vars || theme).palette.divider} 1px`,
34
+ padding: theme.spacing(0.5, 1.5),
35
+ textAlign: 'start',
36
+ whiteSpace: 'nowrap',
37
+ '& span': {
38
+ marginRight: theme.spacing(1.5)
39
+ }
33
40
  }
34
41
  }));
35
42
 
@@ -54,20 +61,27 @@ export const ChartsTooltipRow = styled('tr', {
54
61
  /**
55
62
  * @ignore - internal component.
56
63
  */
57
- export const ChartsTooltipCell = styled('td', {
64
+ export const ChartsTooltipCell = styled(Typography, {
58
65
  name: 'MuiChartsTooltip',
59
- slot: 'Cell',
60
- overridesResolver: (props, styles) => styles.cell
66
+ slot: 'Cell'
61
67
  })(({
62
68
  theme
63
69
  }) => ({
64
70
  verticalAlign: 'middle',
65
71
  color: (theme.vars || theme).palette.text.secondary,
66
- [`&.${chartsTooltipClasses.labelCell}`]: {
72
+ textAlign: 'start',
73
+ [`&.${chartsTooltipClasses.cell}`]: {
67
74
  paddingLeft: theme.spacing(1),
68
- paddingRight: theme.spacing(1.5),
75
+ paddingRight: theme.spacing(1)
76
+ },
77
+ [`&.${chartsTooltipClasses.labelCell}`]: {
69
78
  fontWeight: theme.typography.fontWeightRegular
70
79
  },
80
+ [`& .${chartsTooltipClasses.markContainer}`]: {
81
+ display: 'inline-block',
82
+ width: `calc(20px + ${theme.spacing(1.5)})`,
83
+ verticalAlign: 'middle'
84
+ },
71
85
  [`&.${chartsTooltipClasses.valueCell}, &.${chartsTooltipClasses.axisValueCell}`]: {
72
86
  color: (theme.vars || theme).palette.text.primary,
73
87
  fontWeight: theme.typography.fontWeightMedium
@@ -76,10 +90,10 @@ export const ChartsTooltipCell = styled('td', {
76
90
  paddingLeft: theme.spacing(1.5),
77
91
  paddingRight: theme.spacing(1.5)
78
92
  },
79
- 'td:first-of-type&': {
93
+ 'td:first-of-type&, th:first-of-type&': {
80
94
  paddingLeft: theme.spacing(1.5)
81
95
  },
82
- 'td:last-of-type&': {
96
+ 'td:last-of-type&, th:last-of-type&': {
83
97
  paddingRight: theme.spacing(1.5)
84
98
  }
85
99
  }));
@@ -11,8 +11,8 @@ export interface ChartsTooltipClasses {
11
11
  cell: string;
12
12
  /** Styles applied to the mark element. */
13
13
  mark: string;
14
- /** Styles applied to the markCell element. */
15
- markCell: string;
14
+ /** Styles applied to the markContainer element. */
15
+ markContainer: string;
16
16
  /** Styles applied to the labelCell element. */
17
17
  labelCell: string;
18
18
  /** Styles applied to the valueCell element. */
@@ -20,7 +20,7 @@ export interface ChartsTooltipClasses {
20
20
  /** Styles applied to the axisValueCell element. Only available for axis tooltip. */
21
21
  axisValueCell: string;
22
22
  }
23
- export type ChartsTooltipClassKey = keyof Omit<ChartsTooltipClasses, 'markCell' | 'labelCell' | 'valueCell'>;
23
+ export type ChartsTooltipClassKey = keyof Omit<ChartsTooltipClasses, 'markContainer' | 'labelCell' | 'valueCell'>;
24
24
  export declare function getChartsTooltipUtilityClass(slot: string): string;
25
25
  export declare const chartsTooltipClasses: ChartsTooltipClasses;
26
- export declare const useUtilityClasses: (classes?: Partial<ChartsTooltipClasses>) => Record<"root" | "mark" | "table" | "cell" | "row" | "markCell" | "labelCell" | "valueCell" | "paper" | "axisValueCell", string>;
26
+ export declare const useUtilityClasses: (classes?: Partial<ChartsTooltipClasses>) => Record<"root" | "mark" | "table" | "cell" | "row" | "markContainer" | "labelCell" | "valueCell" | "paper" | "axisValueCell", string>;
@@ -4,7 +4,7 @@ import composeClasses from '@mui/utils/composeClasses';
4
4
  export function getChartsTooltipUtilityClass(slot) {
5
5
  return generateUtilityClass('MuiChartsTooltip', slot);
6
6
  }
7
- export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', 'markCell', 'labelCell', 'valueCell', 'axisValueCell']);
7
+ export const chartsTooltipClasses = generateUtilityClasses('MuiChartsTooltip', ['root', 'paper', 'table', 'row', 'cell', 'mark', 'markContainer', 'labelCell', 'valueCell', 'axisValueCell']);
8
8
  export const useUtilityClasses = classes => {
9
9
  const slots = {
10
10
  root: ['root'],
@@ -13,7 +13,7 @@ export const useUtilityClasses = classes => {
13
13
  row: ['row'],
14
14
  cell: ['cell'],
15
15
  mark: ['mark'],
16
- markCell: ['markCell'],
16
+ markContainer: ['markContainer'],
17
17
  labelCell: ['labelCell'],
18
18
  valueCell: ['valueCell'],
19
19
  axisValueCell: ['axisValueCell']
@@ -7,5 +7,6 @@ export * from "./ChartsItemTooltipContent.js";
7
7
  export * from "./ChartsTooltipTable.js";
8
8
  export * from "./useItemTooltip.js";
9
9
  export * from "./useAxisTooltip.js";
10
+ export * from "./useAxesTooltip.js";
10
11
  export { useMouseTracker } from "./utils.js";
11
12
  export * from "./ChartTooltip.types.js";
@@ -6,5 +6,6 @@ export * from "./ChartsItemTooltipContent.js";
6
6
  export * from "./ChartsTooltipTable.js";
7
7
  export * from "./useItemTooltip.js";
8
8
  export * from "./useAxisTooltip.js";
9
+ export * from "./useAxesTooltip.js";
9
10
  export { useMouseTracker } from "./utils.js";
10
11
  export * from "./ChartTooltip.types.js";
@@ -0,0 +1,7 @@
1
+ import { UseAxisTooltipParams, UseAxisTooltipReturnValue } from "./useAxisTooltip.js";
2
+ type UseAxesTooltipParams = Omit<UseAxisTooltipParams, 'multipleAxes'>;
3
+ /**
4
+ * Returns the axes to display in the tooltip and the series item related to them.
5
+ */
6
+ export declare function useAxesTooltip(params?: UseAxesTooltipParams): UseAxisTooltipReturnValue[] | null;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import { useAxisTooltip } from "./useAxisTooltip.js";
5
+ /**
6
+ * Returns the axes to display in the tooltip and the series item related to them.
7
+ */
8
+ export function useAxesTooltip(params) {
9
+ return useAxisTooltip(_extends({}, params, {
10
+ multipleAxes: true
11
+ }));
12
+ }