@mui/x-charts 8.0.0-beta.2 → 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 (345) 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/CHANGELOG.md +141 -0
  27. package/ChartContainer/ChartContainer.js +4 -0
  28. package/ChartsLabel/ChartsLabelMark.js +0 -4
  29. package/ChartsLabel/index.d.ts +1 -0
  30. package/ChartsLabel/index.js +7 -0
  31. package/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  32. package/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  33. package/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  34. package/ChartsTooltip/ChartsTooltip.js +2 -2
  35. package/ChartsTooltip/ChartsTooltipContainer.js +3 -8
  36. package/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  37. package/ChartsTooltip/ChartsTooltipTable.js +24 -9
  38. package/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  39. package/ChartsTooltip/chartsTooltipClasses.js +2 -2
  40. package/ChartsTooltip/index.d.ts +1 -0
  41. package/ChartsTooltip/index.js +12 -0
  42. package/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  43. package/ChartsTooltip/useAxesTooltip.js +18 -0
  44. package/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  45. package/ChartsTooltip/useAxisTooltip.js +71 -37
  46. package/ChartsTooltip/useItemTooltip.js +4 -1
  47. package/ChartsXAxis/ChartsXAxis.js +5 -2
  48. package/ChartsYAxis/ChartsYAxis.js +69 -17
  49. package/LineChart/AnimatedArea.js +5 -22
  50. package/LineChart/AnimatedLine.d.ts +1 -4
  51. package/LineChart/AnimatedLine.js +10 -25
  52. package/LineChart/AppearingMask.d.ts +5 -0
  53. package/LineChart/AppearingMask.js +25 -18
  54. package/LineChart/CircleMarkElement.js +16 -22
  55. package/LineChart/LineChart.js +2 -0
  56. package/LineChart/LineHighlightPlot.js +2 -3
  57. package/LineChart/MarkElement.js +16 -27
  58. package/LineChart/MarkPlot.js +0 -1
  59. package/LineChart/markElementClasses.d.ts +3 -0
  60. package/LineChart/markElementClasses.js +4 -3
  61. package/LineChart/seriesConfig/index.js +3 -1
  62. package/LineChart/seriesConfig/tooltip.d.ts +2 -1
  63. package/LineChart/seriesConfig/tooltip.js +8 -1
  64. package/PieChart/PieArc.d.ts +19 -11
  65. package/PieChart/PieArc.js +37 -24
  66. package/PieChart/PieArcLabel.d.ts +22 -13
  67. package/PieChart/PieArcLabel.js +52 -48
  68. package/PieChart/PieArcLabelPlot.js +16 -34
  69. package/PieChart/PieArcPlot.js +21 -34
  70. package/PieChart/seriesConfig/tooltip.js +3 -0
  71. package/ScatterChart/ScatterChart.js +2 -0
  72. package/SparkLineChart/SparkLineChart.js +2 -0
  73. package/colorPalettes/colorPalettes.js +2 -2
  74. package/constants/index.d.ts +1 -1
  75. package/constants/index.js +1 -1
  76. package/context/AnimationProvider/AnimationProvider.js +4 -6
  77. package/esm/BarChart/AnimatedBarElement.d.ts +38 -8
  78. package/esm/BarChart/AnimatedBarElement.js +5 -5
  79. package/esm/BarChart/BarChart.js +2 -0
  80. package/esm/BarChart/BarClipPath.d.ts +19 -1
  81. package/esm/BarChart/BarClipPath.js +84 -17
  82. package/esm/BarChart/BarElement.d.ts +9 -20
  83. package/esm/BarChart/BarElement.js +28 -23
  84. package/esm/BarChart/BarLabel/BarLabel.d.ts +27 -854
  85. package/esm/BarChart/BarLabel/BarLabel.js +32 -5
  86. package/esm/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
  87. package/esm/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
  88. package/esm/BarChart/BarLabel/BarLabelItem.js +18 -6
  89. package/esm/BarChart/BarLabel/BarLabelPlot.js +16 -46
  90. package/esm/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
  91. package/esm/BarChart/BarLabel/barLabelClasses.js +4 -3
  92. package/esm/BarChart/BarPlot.js +37 -61
  93. package/esm/BarChart/barElementClasses.d.ts +21 -0
  94. package/esm/BarChart/barElementClasses.js +19 -0
  95. package/esm/BarChart/getRadius.d.ts +1 -1
  96. package/esm/BarChart/index.d.ts +2 -1
  97. package/esm/BarChart/index.js +2 -1
  98. package/esm/BarChart/seriesConfig/index.js +2 -1
  99. package/esm/BarChart/seriesConfig/tooltip.d.ts +2 -1
  100. package/esm/BarChart/seriesConfig/tooltip.js +12 -0
  101. package/esm/BarChart/types.d.ts +2 -2
  102. package/esm/ChartContainer/ChartContainer.js +4 -0
  103. package/esm/ChartsLabel/ChartsLabelMark.js +0 -4
  104. package/esm/ChartsLabel/index.d.ts +1 -0
  105. package/esm/ChartsLabel/index.js +1 -0
  106. package/esm/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  107. package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  108. package/esm/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  109. package/esm/ChartsTooltip/ChartsTooltip.js +2 -2
  110. package/esm/ChartsTooltip/ChartsTooltipContainer.js +4 -9
  111. package/esm/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  112. package/esm/ChartsTooltip/ChartsTooltipTable.js +23 -9
  113. package/esm/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  114. package/esm/ChartsTooltip/chartsTooltipClasses.js +2 -2
  115. package/esm/ChartsTooltip/index.d.ts +1 -0
  116. package/esm/ChartsTooltip/index.js +1 -0
  117. package/esm/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  118. package/esm/ChartsTooltip/useAxesTooltip.js +12 -0
  119. package/esm/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  120. package/esm/ChartsTooltip/useAxisTooltip.js +72 -38
  121. package/esm/ChartsTooltip/useItemTooltip.js +4 -1
  122. package/esm/ChartsXAxis/ChartsXAxis.js +5 -2
  123. package/esm/ChartsYAxis/ChartsYAxis.js +69 -17
  124. package/esm/LineChart/AnimatedArea.js +5 -22
  125. package/esm/LineChart/AnimatedLine.d.ts +1 -4
  126. package/esm/LineChart/AnimatedLine.js +9 -24
  127. package/esm/LineChart/AppearingMask.d.ts +5 -0
  128. package/esm/LineChart/AppearingMask.js +23 -18
  129. package/esm/LineChart/CircleMarkElement.js +19 -25
  130. package/esm/LineChart/LineChart.js +2 -0
  131. package/esm/LineChart/LineHighlightPlot.js +3 -4
  132. package/esm/LineChart/MarkElement.js +17 -28
  133. package/esm/LineChart/MarkPlot.js +0 -1
  134. package/esm/LineChart/markElementClasses.d.ts +3 -0
  135. package/esm/LineChart/markElementClasses.js +4 -3
  136. package/esm/LineChart/seriesConfig/index.js +2 -1
  137. package/esm/LineChart/seriesConfig/tooltip.d.ts +2 -1
  138. package/esm/LineChart/seriesConfig/tooltip.js +6 -0
  139. package/esm/PieChart/PieArc.d.ts +19 -11
  140. package/esm/PieChart/PieArc.js +36 -23
  141. package/esm/PieChart/PieArcLabel.d.ts +22 -13
  142. package/esm/PieChart/PieArcLabel.js +51 -47
  143. package/esm/PieChart/PieArcLabelPlot.js +16 -34
  144. package/esm/PieChart/PieArcPlot.js +21 -34
  145. package/esm/PieChart/seriesConfig/tooltip.js +3 -0
  146. package/esm/ScatterChart/ScatterChart.js +2 -0
  147. package/esm/SparkLineChart/SparkLineChart.js +2 -0
  148. package/esm/colorPalettes/colorPalettes.js +2 -2
  149. package/esm/constants/index.d.ts +1 -1
  150. package/esm/constants/index.js +1 -1
  151. package/esm/context/AnimationProvider/AnimationProvider.js +3 -6
  152. package/esm/hooks/animation/index.d.ts +6 -0
  153. package/esm/hooks/animation/index.js +6 -0
  154. package/esm/hooks/animation/useAnimateArea.d.ts +15 -0
  155. package/esm/hooks/animation/useAnimateArea.js +27 -0
  156. package/esm/hooks/animation/useAnimateBar.d.ts +17 -0
  157. package/esm/hooks/animation/useAnimateBar.js +56 -0
  158. package/esm/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  159. package/esm/hooks/animation/useAnimateBarLabel.js +59 -0
  160. package/esm/hooks/animation/useAnimateLine.d.ts +14 -0
  161. package/esm/hooks/animation/useAnimateLine.js +26 -0
  162. package/esm/hooks/animation/useAnimatePieArc.d.ts +15 -0
  163. package/esm/hooks/animation/useAnimatePieArc.js +70 -0
  164. package/esm/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  165. package/esm/hooks/animation/useAnimatePieArcLabel.js +72 -0
  166. package/esm/hooks/index.d.ts +2 -1
  167. package/esm/hooks/index.js +2 -1
  168. package/esm/hooks/useInteractionItemProps.js +11 -0
  169. package/esm/index.js +1 -1
  170. package/esm/internals/animation/Transition.d.ts +37 -0
  171. package/esm/internals/animation/Transition.js +83 -0
  172. package/esm/internals/animation/animation.d.ts +4 -0
  173. package/esm/internals/animation/animation.js +4 -0
  174. package/esm/internals/animation/useAnimate.d.ts +19 -0
  175. package/esm/internals/animation/useAnimate.js +74 -0
  176. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  177. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  178. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  179. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
  180. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  181. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -1
  182. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +60 -26
  183. package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  184. package/esm/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  185. package/esm/internals/shallowEqual.d.ts +8 -0
  186. package/esm/internals/shallowEqual.js +31 -0
  187. package/esm/models/axis.d.ts +8 -0
  188. package/esm/themeAugmentation/overrides.d.ts +1 -1
  189. package/hooks/animation/index.d.ts +6 -0
  190. package/hooks/animation/index.js +71 -0
  191. package/hooks/animation/useAnimateArea.d.ts +15 -0
  192. package/hooks/animation/useAnimateArea.js +34 -0
  193. package/hooks/animation/useAnimateBar.d.ts +17 -0
  194. package/hooks/animation/useAnimateBar.js +62 -0
  195. package/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  196. package/hooks/animation/useAnimateBarLabel.js +65 -0
  197. package/hooks/animation/useAnimateLine.d.ts +14 -0
  198. package/hooks/animation/useAnimateLine.js +33 -0
  199. package/hooks/animation/useAnimatePieArc.d.ts +15 -0
  200. package/hooks/animation/useAnimatePieArc.js +77 -0
  201. package/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  202. package/hooks/animation/useAnimatePieArcLabel.js +79 -0
  203. package/hooks/index.d.ts +2 -1
  204. package/hooks/index.js +13 -1
  205. package/hooks/useInteractionItemProps.js +11 -0
  206. package/index.js +1 -1
  207. package/internals/animation/Transition.d.ts +37 -0
  208. package/internals/animation/Transition.js +89 -0
  209. package/internals/animation/animation.d.ts +4 -0
  210. package/internals/animation/animation.js +11 -0
  211. package/internals/animation/useAnimate.d.ts +19 -0
  212. package/internals/animation/useAnimate.js +80 -0
  213. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  214. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  215. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  216. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +28 -0
  217. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  218. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -1
  219. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +61 -27
  220. package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  221. package/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  222. package/internals/shallowEqual.d.ts +8 -0
  223. package/internals/shallowEqual.js +37 -0
  224. package/models/axis.d.ts +8 -0
  225. package/modern/BarChart/AnimatedBarElement.d.ts +38 -8
  226. package/modern/BarChart/AnimatedBarElement.js +5 -5
  227. package/modern/BarChart/BarChart.js +2 -0
  228. package/modern/BarChart/BarClipPath.d.ts +19 -1
  229. package/modern/BarChart/BarClipPath.js +84 -17
  230. package/modern/BarChart/BarElement.d.ts +9 -20
  231. package/modern/BarChart/BarElement.js +28 -23
  232. package/modern/BarChart/BarLabel/BarLabel.d.ts +27 -854
  233. package/modern/BarChart/BarLabel/BarLabel.js +32 -5
  234. package/modern/BarChart/BarLabel/BarLabel.types.d.ts +2 -0
  235. package/modern/BarChart/BarLabel/BarLabelItem.d.ts +24 -0
  236. package/modern/BarChart/BarLabel/BarLabelItem.js +18 -6
  237. package/modern/BarChart/BarLabel/BarLabelPlot.js +16 -46
  238. package/modern/BarChart/BarLabel/barLabelClasses.d.ts +3 -1
  239. package/modern/BarChart/BarLabel/barLabelClasses.js +4 -3
  240. package/modern/BarChart/BarPlot.js +37 -61
  241. package/modern/BarChart/barElementClasses.d.ts +21 -0
  242. package/modern/BarChart/barElementClasses.js +19 -0
  243. package/modern/BarChart/getRadius.d.ts +1 -1
  244. package/modern/BarChart/index.d.ts +2 -1
  245. package/modern/BarChart/index.js +2 -1
  246. package/modern/BarChart/seriesConfig/index.js +2 -1
  247. package/modern/BarChart/seriesConfig/tooltip.d.ts +2 -1
  248. package/modern/BarChart/seriesConfig/tooltip.js +12 -0
  249. package/modern/BarChart/types.d.ts +2 -2
  250. package/modern/ChartContainer/ChartContainer.js +4 -0
  251. package/modern/ChartsLabel/ChartsLabelMark.js +0 -4
  252. package/modern/ChartsLabel/index.d.ts +1 -0
  253. package/modern/ChartsLabel/index.js +1 -0
  254. package/modern/ChartsLegend/continuousColorLegendClasses.d.ts +1 -1
  255. package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +47 -55
  256. package/modern/ChartsTooltip/ChartsItemTooltipContent.js +11 -9
  257. package/modern/ChartsTooltip/ChartsTooltip.js +2 -2
  258. package/modern/ChartsTooltip/ChartsTooltipContainer.js +4 -9
  259. package/modern/ChartsTooltip/ChartsTooltipTable.d.ts +3 -1
  260. package/modern/ChartsTooltip/ChartsTooltipTable.js +23 -9
  261. package/modern/ChartsTooltip/chartsTooltipClasses.d.ts +4 -4
  262. package/modern/ChartsTooltip/chartsTooltipClasses.js +2 -2
  263. package/modern/ChartsTooltip/index.d.ts +1 -0
  264. package/modern/ChartsTooltip/index.js +1 -0
  265. package/modern/ChartsTooltip/useAxesTooltip.d.ts +7 -0
  266. package/modern/ChartsTooltip/useAxesTooltip.js +12 -0
  267. package/modern/ChartsTooltip/useAxisTooltip.d.ts +24 -3
  268. package/modern/ChartsTooltip/useAxisTooltip.js +72 -38
  269. package/modern/ChartsTooltip/useItemTooltip.js +4 -1
  270. package/modern/ChartsXAxis/ChartsXAxis.js +5 -2
  271. package/modern/ChartsYAxis/ChartsYAxis.js +69 -17
  272. package/modern/LineChart/AnimatedArea.js +5 -22
  273. package/modern/LineChart/AnimatedLine.d.ts +1 -4
  274. package/modern/LineChart/AnimatedLine.js +9 -24
  275. package/modern/LineChart/AppearingMask.d.ts +5 -0
  276. package/modern/LineChart/AppearingMask.js +23 -18
  277. package/modern/LineChart/CircleMarkElement.js +19 -25
  278. package/modern/LineChart/LineChart.js +2 -0
  279. package/modern/LineChart/LineHighlightPlot.js +3 -4
  280. package/modern/LineChart/MarkElement.js +17 -28
  281. package/modern/LineChart/MarkPlot.js +0 -1
  282. package/modern/LineChart/markElementClasses.d.ts +3 -0
  283. package/modern/LineChart/markElementClasses.js +4 -3
  284. package/modern/LineChart/seriesConfig/index.js +2 -1
  285. package/modern/LineChart/seriesConfig/tooltip.d.ts +2 -1
  286. package/modern/LineChart/seriesConfig/tooltip.js +6 -0
  287. package/modern/PieChart/PieArc.d.ts +19 -11
  288. package/modern/PieChart/PieArc.js +36 -23
  289. package/modern/PieChart/PieArcLabel.d.ts +22 -13
  290. package/modern/PieChart/PieArcLabel.js +51 -47
  291. package/modern/PieChart/PieArcLabelPlot.js +16 -34
  292. package/modern/PieChart/PieArcPlot.js +21 -34
  293. package/modern/PieChart/seriesConfig/tooltip.js +3 -0
  294. package/modern/ScatterChart/ScatterChart.js +2 -0
  295. package/modern/SparkLineChart/SparkLineChart.js +2 -0
  296. package/modern/colorPalettes/colorPalettes.js +2 -2
  297. package/modern/constants/index.d.ts +1 -1
  298. package/modern/constants/index.js +1 -1
  299. package/modern/context/AnimationProvider/AnimationProvider.js +3 -6
  300. package/modern/hooks/animation/index.d.ts +6 -0
  301. package/modern/hooks/animation/index.js +6 -0
  302. package/modern/hooks/animation/useAnimateArea.d.ts +15 -0
  303. package/modern/hooks/animation/useAnimateArea.js +27 -0
  304. package/modern/hooks/animation/useAnimateBar.d.ts +17 -0
  305. package/modern/hooks/animation/useAnimateBar.js +56 -0
  306. package/modern/hooks/animation/useAnimateBarLabel.d.ts +19 -0
  307. package/modern/hooks/animation/useAnimateBarLabel.js +59 -0
  308. package/modern/hooks/animation/useAnimateLine.d.ts +14 -0
  309. package/modern/hooks/animation/useAnimateLine.js +26 -0
  310. package/modern/hooks/animation/useAnimatePieArc.d.ts +15 -0
  311. package/modern/hooks/animation/useAnimatePieArc.js +70 -0
  312. package/modern/hooks/animation/useAnimatePieArcLabel.d.ts +15 -0
  313. package/modern/hooks/animation/useAnimatePieArcLabel.js +72 -0
  314. package/modern/hooks/index.d.ts +2 -1
  315. package/modern/hooks/index.js +2 -1
  316. package/modern/hooks/useInteractionItemProps.js +11 -0
  317. package/modern/index.js +1 -1
  318. package/modern/internals/animation/Transition.d.ts +37 -0
  319. package/modern/internals/animation/Transition.js +83 -0
  320. package/modern/internals/animation/animation.d.ts +4 -0
  321. package/modern/internals/animation/animation.js +4 -0
  322. package/modern/internals/animation/useAnimate.d.ts +19 -0
  323. package/modern/internals/animation/useAnimate.js +74 -0
  324. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +1 -1
  325. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +9 -3
  326. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +5 -0
  327. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.js +21 -0
  328. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +8 -32
  329. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.d.ts +9 -1
  330. package/modern/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianInteraction.selectors.js +60 -26
  331. package/modern/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +3 -1
  332. package/modern/internals/plugins/models/seriesConfig/tooltipGetter.types.d.ts +10 -4
  333. package/modern/internals/shallowEqual.d.ts +8 -0
  334. package/modern/internals/shallowEqual.js +31 -0
  335. package/modern/models/axis.d.ts +8 -0
  336. package/modern/themeAugmentation/overrides.d.ts +1 -1
  337. package/package.json +8 -9
  338. package/themeAugmentation/overrides.d.ts +1 -1
  339. package/tsconfig.build.tsbuildinfo +1 -1
  340. package/PieChart/dataTransform/transition.d.ts +0 -4
  341. package/PieChart/dataTransform/transition.js +0 -145
  342. package/esm/PieChart/dataTransform/transition.d.ts +0 -4
  343. package/esm/PieChart/dataTransform/transition.js +0 -137
  344. package/modern/PieChart/dataTransform/transition.d.ts +0 -4
  345. package/modern/PieChart/dataTransform/transition.js +0 -137
@@ -2,13 +2,14 @@ import { getExtremumX, getExtremumY } from "./extremums.js";
2
2
  import seriesProcessor from "./seriesProcessor.js";
3
3
  import getColor from "./getColor.js";
4
4
  import legendGetter from "./legend.js";
5
- import tooltipGetter from "./tooltip.js";
5
+ import tooltipGetter, { axisTooltipGetter } from "./tooltip.js";
6
6
  import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
7
7
  export const seriesConfig = {
8
8
  colorProcessor: getColor,
9
9
  seriesProcessor,
10
10
  legendGetter,
11
11
  tooltipGetter,
12
+ axisTooltipGetter,
12
13
  xExtremumGetter: getExtremumX,
13
14
  yExtremumGetter: getExtremumY,
14
15
  getSeriesWithDefaultValues
@@ -1,3 +1,4 @@
1
- import type { TooltipGetter } from '../../internals/plugins/models';
1
+ import type { AxisTooltipGetter, TooltipGetter } from '../../internals/plugins/models';
2
2
  declare const tooltipGetter: TooltipGetter<'line'>;
3
+ export declare const axisTooltipGetter: AxisTooltipGetter<'line', 'x' | 'y'>;
3
4
  export default tooltipGetter;
@@ -22,4 +22,10 @@ const tooltipGetter = params => {
22
22
  markType: series.labelMarkType
23
23
  };
24
24
  };
25
+ export const axisTooltipGetter = series => {
26
+ return Object.values(series).map(s => ({
27
+ direction: 'x',
28
+ axisId: s.xAxisId
29
+ }));
30
+ };
25
31
  export default tooltipGetter;
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { SpringValue } from '@react-spring/web';
3
2
  import { PieItemId } from "../models/index.js";
4
3
  export interface PieArcClasses {
5
4
  /** Styles applied to the root element. */
@@ -21,16 +20,25 @@ interface PieArcOwnerState {
21
20
  export declare function getPieArcUtilityClass(slot: string): string;
22
21
  export declare const pieArcClasses: PieArcClasses;
23
22
  export type PieArcProps = Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & PieArcOwnerState & {
24
- cornerRadius: SpringValue<number>;
25
- endAngle: SpringValue<number>;
26
- innerRadius: SpringValue<number>;
23
+ cornerRadius: number;
24
+ endAngle: number;
25
+ innerRadius: number;
27
26
  onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
28
- outerRadius: SpringValue<number>;
29
- paddingAngle: SpringValue<number>;
30
- startAngle: SpringValue<number>;
27
+ outerRadius: number;
28
+ paddingAngle: number;
29
+ startAngle: number;
30
+ /** @default false */
31
+ skipAnimation: boolean;
31
32
  };
32
- declare function PieArc(props: PieArcProps): React.JSX.Element;
33
- declare namespace PieArc {
34
- var propTypes: any;
35
- }
33
+ declare const PieArc: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGPathElement>, "ref" | "id"> & PieArcOwnerState & {
34
+ cornerRadius: number;
35
+ endAngle: number;
36
+ innerRadius: number;
37
+ onClick?: (event: React.MouseEvent<SVGPathElement, MouseEvent>) => void;
38
+ outerRadius: number;
39
+ paddingAngle: number;
40
+ startAngle: number;
41
+ /** @default false */
42
+ skipAnimation: boolean;
43
+ } & React.RefAttributes<SVGPathElement>>;
36
44
  export { PieArc };
@@ -2,15 +2,15 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["classes", "color", "cornerRadius", "dataIndex", "endAngle", "id", "innerRadius", "isFaded", "isHighlighted", "onClick", "outerRadius", "paddingAngle", "startAngle"];
5
+ const _excluded = ["classes", "color", "dataIndex", "id", "isFaded", "isHighlighted", "onClick", "cornerRadius", "startAngle", "endAngle", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
9
- import { animated, to } from '@react-spring/web';
10
8
  import composeClasses from '@mui/utils/composeClasses';
11
9
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
12
10
  import { styled } from '@mui/material/styles';
13
11
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
12
+ import { useAnimatePieArc } from "../hooks/index.js";
13
+ import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.js";
14
14
  import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  export function getPieArcUtilityClass(slot) {
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
30
30
  };
31
31
  return composeClasses(slots, getPieArcUtilityClass, classes);
32
32
  };
33
- const PieArcRoot = styled(animated.path, {
33
+ const PieArcRoot = styled('path', {
34
34
  name: 'MuiPieArc',
35
35
  slot: 'Root',
36
36
  overridesResolver: (_, styles) => styles.arc
@@ -39,23 +39,26 @@ const PieArcRoot = styled(animated.path, {
39
39
  }) => ({
40
40
  // Got to move stroke to an element prop instead of style.
41
41
  stroke: (theme.vars || theme).palette.background.paper,
42
- transition: 'opacity 0.2s ease-in, fill 0.2s ease-in, filter 0.2s ease-in'
42
+ transitionProperty: 'opacity, fill, filter',
43
+ transitionDuration: `${ANIMATION_DURATION_MS}ms`,
44
+ transitionTimingFunction: ANIMATION_TIMING_FUNCTION
43
45
  }));
44
- function PieArc(props) {
46
+ const PieArc = /*#__PURE__*/React.forwardRef(function PieArc(props, ref) {
45
47
  const {
46
48
  classes: innerClasses,
47
49
  color,
48
- cornerRadius,
49
50
  dataIndex,
50
- endAngle,
51
51
  id,
52
- innerRadius,
53
52
  isFaded,
54
53
  isHighlighted,
55
54
  onClick,
55
+ cornerRadius,
56
+ startAngle,
57
+ endAngle,
58
+ innerRadius,
56
59
  outerRadius,
57
60
  paddingAngle,
58
- startAngle
61
+ skipAnimation
59
62
  } = props,
60
63
  other = _objectWithoutPropertiesLoose(props, _excluded);
61
64
  const ownerState = {
@@ -72,17 +75,17 @@ function PieArc(props) {
72
75
  seriesId: id,
73
76
  dataIndex
74
77
  });
78
+ const animatedProps = useAnimatePieArc({
79
+ cornerRadius,
80
+ startAngle,
81
+ endAngle,
82
+ innerRadius,
83
+ outerRadius,
84
+ paddingAngle,
85
+ skipAnimation,
86
+ ref
87
+ });
75
88
  return /*#__PURE__*/_jsx(PieArcRoot, _extends({
76
- d: to([startAngle, endAngle, paddingAngle, innerRadius, outerRadius, cornerRadius], (sA, eA, pA, iR, oR, cR) => d3Arc().cornerRadius(cR)({
77
- padAngle: pA,
78
- startAngle: sA,
79
- endAngle: eA,
80
- innerRadius: iR,
81
- outerRadius: oR
82
- })),
83
- visibility: to([startAngle, endAngle], (sA, eA) => sA === eA ? 'hidden' : 'visible')
84
- // @ts-expect-error
85
- ,
86
89
  onClick: onClick,
87
90
  cursor: onClick ? 'pointer' : 'unset',
88
91
  ownerState: ownerState,
@@ -92,17 +95,27 @@ function PieArc(props) {
92
95
  filter: ownerState.isHighlighted ? 'brightness(120%)' : 'none',
93
96
  strokeWidth: 1,
94
97
  strokeLinejoin: "round"
95
- }, other, interactionProps));
96
- }
98
+ }, other, interactionProps, animatedProps));
99
+ });
97
100
  process.env.NODE_ENV !== "production" ? PieArc.propTypes = {
98
101
  // ----------------------------- Warning --------------------------------
99
102
  // | These PropTypes are generated from the TypeScript type definitions |
100
103
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
101
104
  // ----------------------------------------------------------------------
102
105
  classes: PropTypes.object,
106
+ cornerRadius: PropTypes.number.isRequired,
103
107
  dataIndex: PropTypes.number.isRequired,
108
+ endAngle: PropTypes.number.isRequired,
104
109
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
110
+ innerRadius: PropTypes.number.isRequired,
105
111
  isFaded: PropTypes.bool.isRequired,
106
- isHighlighted: PropTypes.bool.isRequired
112
+ isHighlighted: PropTypes.bool.isRequired,
113
+ outerRadius: PropTypes.number.isRequired,
114
+ paddingAngle: PropTypes.number.isRequired,
115
+ /**
116
+ * @default false
117
+ */
118
+ skipAnimation: PropTypes.bool.isRequired,
119
+ startAngle: PropTypes.number.isRequired
107
120
  } : void 0;
108
121
  export { PieArc };
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { SpringValue } from '@react-spring/web';
3
2
  import { PieItemId } from "../models/seriesType/pie.js";
4
3
  export interface PieArcLabelClasses {
5
4
  /** Styles applied to the root element. */
@@ -8,6 +7,8 @@ export interface PieArcLabelClasses {
8
7
  highlighted: string;
9
8
  /** Styles applied to the root element when faded. */
10
9
  faded: string;
10
+ /** Styles applied to the root element when animation is not skipped. */
11
+ animate: string;
11
12
  }
12
13
  export type PieArcLabelClassKey = keyof PieArcLabelClasses;
13
14
  interface PieArcLabelOwnerState {
@@ -15,23 +16,31 @@ interface PieArcLabelOwnerState {
15
16
  color: string;
16
17
  isFaded: boolean;
17
18
  isHighlighted: boolean;
19
+ skipAnimation: boolean;
18
20
  classes?: Partial<PieArcLabelClasses>;
19
21
  }
20
22
  export declare function getPieArcLabelUtilityClass(slot: string): string;
21
23
  export declare const pieArcLabelClasses: PieArcLabelClasses;
22
24
  export type PieArcLabelProps = PieArcLabelOwnerState & Omit<React.SVGProps<SVGTextElement>, 'ref' | 'color' | 'id'> & {
23
- startAngle: SpringValue<number>;
24
- endAngle: SpringValue<number>;
25
- innerRadius: SpringValue<number>;
26
- outerRadius: SpringValue<number>;
27
- arcLabelRadius: SpringValue<number>;
28
- cornerRadius: SpringValue<number>;
29
- paddingAngle: SpringValue<number>;
30
- } & {
25
+ startAngle: number;
26
+ endAngle: number;
27
+ innerRadius: number;
28
+ outerRadius: number;
29
+ arcLabelRadius: number;
30
+ cornerRadius: number;
31
+ paddingAngle: number;
32
+ skipAnimation: boolean;
31
33
  formattedArcLabel?: string | null;
32
34
  };
33
- declare function PieArcLabel(props: PieArcLabelProps): React.JSX.Element;
34
- declare namespace PieArcLabel {
35
- var propTypes: any;
36
- }
35
+ declare const PieArcLabel: React.ForwardRefExoticComponent<PieArcLabelOwnerState & Omit<React.SVGProps<SVGTextElement>, "ref" | "color" | "id"> & {
36
+ startAngle: number;
37
+ endAngle: number;
38
+ innerRadius: number;
39
+ outerRadius: number;
40
+ arcLabelRadius: number;
41
+ cornerRadius: number;
42
+ paddingAngle: number;
43
+ skipAnimation: boolean;
44
+ formattedArcLabel?: string | null;
45
+ } & React.RefAttributes<SVGTextElement>>;
37
46
  export { PieArcLabel };
@@ -2,33 +2,34 @@
2
2
 
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
- const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style"];
5
+ const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "style", "skipAnimation"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { animated, to } from '@react-spring/web';
9
- import { arc as d3Arc } from '@mui/x-charts-vendor/d3-shape';
10
8
  import composeClasses from '@mui/utils/composeClasses';
11
9
  import generateUtilityClass from '@mui/utils/generateUtilityClass';
12
10
  import { styled } from '@mui/material/styles';
13
11
  import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
12
+ import { ANIMATION_DURATION_MS, ANIMATION_TIMING_FUNCTION } from "../internals/animation/animation.js";
13
+ import { useAnimatePieArcLabel } from "../hooks/animation/useAnimatePieArcLabel.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
15
  export function getPieArcLabelUtilityClass(slot) {
16
16
  return generateUtilityClass('MuiPieArcLabel', slot);
17
17
  }
18
- export const pieArcLabelClasses = generateUtilityClasses('MuiPieArcLabel', ['root', 'highlighted', 'faded']);
18
+ export const pieArcLabelClasses = generateUtilityClasses('MuiPieArcLabel', ['root', 'highlighted', 'faded', 'animate']);
19
19
  const useUtilityClasses = ownerState => {
20
20
  const {
21
21
  classes,
22
22
  id,
23
23
  isFaded,
24
- isHighlighted
24
+ isHighlighted,
25
+ skipAnimation
25
26
  } = ownerState;
26
27
  const slots = {
27
- root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded']
28
+ root: ['root', `series-${id}`, isHighlighted && 'highlighted', isFaded && 'faded', !skipAnimation && 'animate']
28
29
  };
29
30
  return composeClasses(slots, getPieArcLabelUtilityClass, classes);
30
31
  };
31
- const PieArcLabelRoot = styled(animated.text, {
32
+ const PieArcLabelRoot = styled('text', {
32
33
  name: 'MuiPieArcLabel',
33
34
  slot: 'Root',
34
35
  overridesResolver: (_, styles) => styles.root
@@ -38,29 +39,20 @@ const PieArcLabelRoot = styled(animated.text, {
38
39
  fill: (theme.vars || theme).palette.text.primary,
39
40
  textAnchor: 'middle',
40
41
  dominantBaseline: 'middle',
41
- pointerEvents: 'none'
42
- }));
43
- /**
44
- * Helper to compute label position.
45
- * It's not an inline function because we need it in interpolation.
46
- */
47
- const getLabelPosition = (formattedArcLabel, variable) => (startAngle, endAngle, padAngle, arcLabelRadius, cornerRadius) => {
48
- if (!formattedArcLabel) {
49
- return 0;
50
- }
51
- const [x, y] = d3Arc().cornerRadius(cornerRadius).centroid({
52
- padAngle,
53
- startAngle,
54
- endAngle,
55
- innerRadius: arcLabelRadius,
56
- outerRadius: arcLabelRadius
57
- });
58
- if (variable === 'x') {
59
- return x;
42
+ pointerEvents: 'none',
43
+ animationName: 'animate-opacity',
44
+ animationDuration: '0s',
45
+ animationTimingFunction: ANIMATION_TIMING_FUNCTION,
46
+ [`&.${pieArcLabelClasses.animate}`]: {
47
+ animationDuration: `${ANIMATION_DURATION_MS}ms`
48
+ },
49
+ '@keyframes animate-opacity': {
50
+ from: {
51
+ opacity: 0
52
+ }
60
53
  }
61
- return y;
62
- };
63
- function PieArcLabel(props) {
54
+ }));
55
+ const PieArcLabel = /*#__PURE__*/React.forwardRef(function PieArcLabel(props, ref) {
64
56
  const {
65
57
  id,
66
58
  classes: innerClasses,
@@ -68,12 +60,13 @@ function PieArcLabel(props) {
68
60
  startAngle,
69
61
  endAngle,
70
62
  paddingAngle,
71
- arcLabelRadius,
63
+ innerRadius,
64
+ outerRadius,
72
65
  cornerRadius,
73
66
  formattedArcLabel,
74
67
  isHighlighted,
75
68
  isFaded,
76
- style
69
+ skipAnimation
77
70
  } = props,
78
71
  other = _objectWithoutPropertiesLoose(props, _excluded);
79
72
  const ownerState = {
@@ -81,33 +74,44 @@ function PieArcLabel(props) {
81
74
  classes: innerClasses,
82
75
  color,
83
76
  isFaded,
84
- isHighlighted
77
+ isHighlighted,
78
+ skipAnimation
85
79
  };
86
80
  const classes = useUtilityClasses(ownerState);
87
- return (
88
- /*#__PURE__*/
89
- // @ts-expect-error
90
- _jsx(PieArcLabelRoot, _extends({
91
- className: classes.root
92
- }, other, {
93
- style: _extends({
94
- x: to([startAngle, endAngle, paddingAngle, arcLabelRadius, cornerRadius], getLabelPosition(formattedArcLabel, 'x')),
95
- y: to([startAngle, endAngle, paddingAngle, arcLabelRadius, cornerRadius], getLabelPosition(formattedArcLabel, 'y'))
96
- }, style),
97
- children: formattedArcLabel
98
- }))
99
- );
100
- }
81
+ const animatedProps = useAnimatePieArcLabel({
82
+ cornerRadius,
83
+ startAngle,
84
+ endAngle,
85
+ innerRadius,
86
+ outerRadius,
87
+ paddingAngle,
88
+ skipAnimation,
89
+ ref
90
+ });
91
+ return /*#__PURE__*/_jsx(PieArcLabelRoot, _extends({
92
+ className: classes.root
93
+ }, other, animatedProps, {
94
+ children: formattedArcLabel
95
+ }));
96
+ });
101
97
  process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
102
98
  // ----------------------------- Warning --------------------------------
103
99
  // | These PropTypes are generated from the TypeScript type definitions |
104
100
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
105
101
  // ----------------------------------------------------------------------
102
+ arcLabelRadius: PropTypes.number.isRequired,
106
103
  classes: PropTypes.object,
107
104
  color: PropTypes.string.isRequired,
105
+ cornerRadius: PropTypes.number.isRequired,
106
+ endAngle: PropTypes.number.isRequired,
108
107
  formattedArcLabel: PropTypes.string,
109
108
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
109
+ innerRadius: PropTypes.number.isRequired,
110
110
  isFaded: PropTypes.bool.isRequired,
111
- isHighlighted: PropTypes.bool.isRequired
111
+ isHighlighted: PropTypes.bool.isRequired,
112
+ outerRadius: PropTypes.number.isRequired,
113
+ paddingAngle: PropTypes.number.isRequired,
114
+ skipAnimation: PropTypes.bool.isRequired,
115
+ startAngle: PropTypes.number.isRequired
112
116
  } : void 0;
113
117
  export { PieArcLabel };
@@ -2,12 +2,9 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["arcLabel", "arcLabelMinAngle", "arcLabelRadius", "cornerRadius", "data", "faded", "highlighted", "id", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "slotProps", "slots"],
6
- _excluded2 = ["startAngle", "endAngle", "paddingAngle", "innerRadius", "outerRadius", "arcLabelRadius", "cornerRadius"];
5
+ const _excluded = ["arcLabel", "arcLabelMinAngle", "arcLabelRadius", "cornerRadius", "data", "faded", "highlighted", "id", "innerRadius", "outerRadius", "paddingAngle", "skipAnimation", "slotProps", "slots"];
7
6
  import * as React from 'react';
8
7
  import PropTypes from 'prop-types';
9
- import { useTransition } from '@react-spring/web';
10
- import { getDefaultLabelTransitionConfig } from "./dataTransform/transition.js";
11
8
  import { useTransformData } from "./dataTransform/useTransformData.js";
12
9
  import { PieArcLabel } from "./PieArcLabel.js";
13
10
  import { getLabel } from "../internals/getLabel.js";
@@ -65,41 +62,26 @@ function PieArcLabelPlot(props) {
65
62
  faded,
66
63
  data
67
64
  });
68
- const transition = useTransition(transformedData, _extends({}, getDefaultLabelTransitionConfig(skipAnimation), {
69
- immediate: skipAnimation
70
- }));
71
65
  if (data.length === 0) {
72
66
  return null;
73
67
  }
74
68
  const ArcLabel = slots?.pieArcLabel ?? PieArcLabel;
75
69
  return /*#__PURE__*/_jsx("g", _extends({}, other, {
76
- children: transition((_ref, item) => {
77
- let {
78
- startAngle,
79
- endAngle,
80
- paddingAngle: pA,
81
- innerRadius: iR,
82
- outerRadius: oR,
83
- arcLabelRadius: aLR,
84
- cornerRadius: cR
85
- } = _ref,
86
- style = _objectWithoutPropertiesLoose(_ref, _excluded2);
87
- return /*#__PURE__*/_jsx(ArcLabel, _extends({
88
- startAngle: startAngle,
89
- endAngle: endAngle,
90
- paddingAngle: pA,
91
- innerRadius: iR,
92
- outerRadius: oR,
93
- arcLabelRadius: aLR,
94
- cornerRadius: cR,
95
- style: style,
96
- id: id,
97
- color: item.color,
98
- isFaded: item.isFaded,
99
- isHighlighted: item.isHighlighted,
100
- formattedArcLabel: getItemLabel(arcLabel, arcLabelMinAngle, item)
101
- }, slotProps?.pieArcLabel));
102
- })
70
+ children: transformedData.map(item => /*#__PURE__*/_jsx(ArcLabel, _extends({
71
+ startAngle: item.startAngle,
72
+ endAngle: item.endAngle,
73
+ paddingAngle: item.paddingAngle,
74
+ innerRadius: item.innerRadius,
75
+ outerRadius: item.outerRadius,
76
+ arcLabelRadius: item.arcLabelRadius,
77
+ cornerRadius: item.cornerRadius,
78
+ id: id,
79
+ color: item.color,
80
+ isFaded: item.isFaded,
81
+ isHighlighted: item.isHighlighted,
82
+ formattedArcLabel: getItemLabel(arcLabel, arcLabelMinAngle, item),
83
+ skipAnimation: skipAnimation ?? false
84
+ }, slotProps?.pieArcLabel), item.id ?? item.dataIndex))
103
85
  }));
104
86
  }
105
87
  process.env.NODE_ENV !== "production" ? PieArcLabelPlot.propTypes = {
@@ -5,9 +5,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
5
5
  const _excluded = ["slots", "slotProps", "innerRadius", "outerRadius", "cornerRadius", "paddingAngle", "id", "highlighted", "faded", "data", "onItemClick", "skipAnimation"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
- import { useTransition } from '@react-spring/web';
9
8
  import { PieArc } from "./PieArc.js";
10
- import { getDefaultTransitionConfig } from "./dataTransform/transition.js";
11
9
  import { useTransformData } from "./dataTransform/useTransformData.js";
12
10
  import { jsx as _jsx } from "react/jsx-runtime";
13
11
  function PieArcPlot(props) {
@@ -38,43 +36,32 @@ function PieArcPlot(props) {
38
36
  faded,
39
37
  data
40
38
  });
41
- const transition = useTransition(transformedData, _extends({}, getDefaultTransitionConfig(skipAnimation), {
42
- immediate: skipAnimation
43
- }));
44
39
  if (data.length === 0) {
45
40
  return null;
46
41
  }
47
42
  const Arc = slots?.pieArc ?? PieArc;
48
43
  return /*#__PURE__*/_jsx("g", _extends({}, other, {
49
- children: transition(({
50
- startAngle,
51
- endAngle,
52
- paddingAngle: pA,
53
- innerRadius: iR,
54
- outerRadius: oR,
55
- cornerRadius: cR
56
- }, item, _, index) => {
57
- return /*#__PURE__*/_jsx(Arc, _extends({
58
- startAngle: startAngle,
59
- endAngle: endAngle,
60
- paddingAngle: pA,
61
- innerRadius: iR,
62
- outerRadius: oR,
63
- cornerRadius: cR,
64
- id: id,
65
- color: item.color,
66
- dataIndex: index,
67
- isFaded: item.isFaded,
68
- isHighlighted: item.isHighlighted,
69
- onClick: onItemClick && (event => {
70
- onItemClick(event, {
71
- type: 'pie',
72
- seriesId: id,
73
- dataIndex: index
74
- }, item);
75
- })
76
- }, slotProps?.pieArc));
77
- })
44
+ children: transformedData.map((item, index) => /*#__PURE__*/_jsx(Arc, _extends({
45
+ startAngle: item.startAngle,
46
+ endAngle: item.endAngle,
47
+ paddingAngle: item.paddingAngle,
48
+ innerRadius: item.innerRadius,
49
+ outerRadius: item.outerRadius,
50
+ cornerRadius: item.cornerRadius,
51
+ skipAnimation: skipAnimation ?? false,
52
+ id: id,
53
+ color: item.color,
54
+ dataIndex: index,
55
+ isFaded: item.isFaded,
56
+ isHighlighted: item.isHighlighted,
57
+ onClick: onItemClick && (event => {
58
+ onItemClick(event, {
59
+ type: 'pie',
60
+ seriesId: id,
61
+ dataIndex: index
62
+ }, item);
63
+ })
64
+ }, slotProps?.pieArc), item.dataIndex))
78
65
  }));
79
66
  }
80
67
  process.env.NODE_ENV !== "production" ? PieArcPlot.propTypes = {
@@ -10,6 +10,9 @@ const tooltipGetter = params => {
10
10
  return null;
11
11
  }
12
12
  const point = series.data[identifier.dataIndex];
13
+ if (point == null) {
14
+ return null;
15
+ }
13
16
  const label = getLabel(point.label, 'tooltip');
14
17
  const value = _extends({}, point, {
15
18
  label
@@ -229,6 +229,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
229
229
  height: PropTypes.number,
230
230
  hideTooltip: PropTypes.bool,
231
231
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
232
+ ignoreTooltip: PropTypes.bool,
232
233
  label: PropTypes.string,
233
234
  labelStyle: PropTypes.object,
234
235
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -284,6 +285,7 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
284
285
  fill: PropTypes.string,
285
286
  hideTooltip: PropTypes.bool,
286
287
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
288
+ ignoreTooltip: PropTypes.bool,
287
289
  label: PropTypes.string,
288
290
  labelStyle: PropTypes.object,
289
291
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -292,6 +292,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
292
292
  height: PropTypes.number,
293
293
  hideTooltip: PropTypes.bool,
294
294
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
295
+ ignoreTooltip: PropTypes.bool,
295
296
  label: PropTypes.string,
296
297
  labelStyle: PropTypes.object,
297
298
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -346,6 +347,7 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
346
347
  fill: PropTypes.string,
347
348
  hideTooltip: PropTypes.bool,
348
349
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
350
+ ignoreTooltip: PropTypes.bool,
349
351
  label: PropTypes.string,
350
352
  labelStyle: PropTypes.object,
351
353
  max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
@@ -1,5 +1,5 @@
1
- export const rainbowSurgePaletteLight = ['#4254FB', '#FFB219', '#54C690', '#FF5463', '#F287B3', '#2EAFFF', '#FD8731'];
2
- export const rainbowSurgePaletteDark = ['#273DFF', '#FAC04E', '#32ae6a', '#F3616E', '#F286B3', '#2EAFFF', '#FD8731'];
1
+ export const rainbowSurgePaletteLight = ['#4254FB', '#FFB422', '#FA4F58', '#0DBEFF', '#22BF75', '#FA83B4', '#FF7511'];
2
+ export const rainbowSurgePaletteDark = ['#495AFB', '#FFC758', '#F35865', '#30C8FF', '#44CE8D', '#F286B3', '#FF8C39'];
3
3
  export const rainbowSurgePalette = mode => mode === 'dark' ? rainbowSurgePaletteDark : rainbowSurgePaletteLight;
4
4
  export const blueberryTwilightPaletteLight = ['#02B2AF', '#2E96FF', '#B800D8', '#60009B', '#2731C8', '#03008D'];
5
5
  export const blueberryTwilightPaletteDark = ['#02B2AF', '#72CCFF', '#DA00FF', '#9001CB', '#2E96FF', '#3B48E0'];
@@ -8,6 +8,6 @@ export declare const DEFAULT_MARGINS: {
8
8
  left: number;
9
9
  right: number;
10
10
  };
11
- export declare const DEFAULT_AXIS_SIZE_WIDTH = 30;
11
+ export declare const DEFAULT_AXIS_SIZE_WIDTH = 45;
12
12
  export declare const DEFAULT_AXIS_SIZE_HEIGHT = 25;
13
13
  export declare const AXIS_LABEL_DEFAULT_HEIGHT = 20;
@@ -8,7 +8,7 @@ export const DEFAULT_MARGINS = {
8
8
  left: 20,
9
9
  right: 20
10
10
  };
11
- export const DEFAULT_AXIS_SIZE_WIDTH = 30;
11
+ export const DEFAULT_AXIS_SIZE_WIDTH = 45;
12
12
  export const DEFAULT_AXIS_SIZE_HEIGHT = 25;
13
13
 
14
14
  // How many pixels to add to the default axis size if that axis has a label