@mui/x-charts 8.23.0 → 8.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/BarChart/BarChart.js +39 -0
  2. package/BarChart/BarChart.plugins.d.ts +2 -1
  3. package/BarChart/BarChart.plugins.js +2 -1
  4. package/BarChart/BarLabel/BarLabel.d.ts +2 -0
  5. package/BarChart/BarLabel/BarLabel.js +8 -3
  6. package/BarChart/BarLabel/BarLabelItem.d.ts +2 -0
  7. package/BarChart/BarLabel/BarLabelItem.js +4 -2
  8. package/BarChart/BarPlot.d.ts +12 -2
  9. package/BarChart/BarPlot.js +29 -86
  10. package/BarChart/BatchBarPlot/BarGroup.d.ts +15 -0
  11. package/BarChart/BatchBarPlot/BarGroup.js +142 -0
  12. package/BarChart/BatchBarPlot/BatchBarPlot.d.ts +12 -0
  13. package/BarChart/BatchBarPlot/BatchBarPlot.js +140 -0
  14. package/BarChart/BatchBarPlot/index.d.ts +1 -0
  15. package/BarChart/BatchBarPlot/index.js +12 -0
  16. package/BarChart/BatchBarPlot/useCreateBarPaths.d.ts +8 -0
  17. package/BarChart/BatchBarPlot/useCreateBarPaths.js +53 -0
  18. package/BarChart/FocusedBar.js +5 -1
  19. package/BarChart/IndividualBarPlot.d.ts +21 -0
  20. package/BarChart/IndividualBarPlot.js +106 -0
  21. package/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -1
  22. package/BarChart/seriesConfig/bar/legend.js +1 -0
  23. package/BarChart/seriesConfig/index.js +3 -1
  24. package/BarChart/types.d.ts +2 -0
  25. package/BarChart/useBarChartProps.d.ts +6 -2
  26. package/BarChart/useBarChartProps.js +4 -2
  27. package/BarChart/useBarPlotData.d.ts +1 -1
  28. package/BarChart/useBarPlotData.js +23 -4
  29. package/BarChart/useRegisterItemClickHandlers.d.ts +6 -0
  30. package/BarChart/useRegisterItemClickHandlers.js +72 -0
  31. package/CHANGELOG.md +111 -1
  32. package/ChartContainer/ChartContainer.js +34 -0
  33. package/ChartContainer/useChartContainerProps.js +6 -2
  34. package/ChartsLegend/ChartsLegend.js +2 -2
  35. package/ChartsLegend/legendContext.types.d.ts +12 -0
  36. package/ChartsLegend/onClickContextBuilder.js +2 -1
  37. package/ChartsOverlay/ChartsLoadingOverlay.js +4 -1
  38. package/ChartsOverlay/ChartsNoDataOverlay.js +4 -1
  39. package/ChartsReferenceLine/common.d.ts +1 -1
  40. package/ChartsReferenceLine/common.js +4 -1
  41. package/ChartsTooltip/ChartsTooltipContainer.js +25 -21
  42. package/Gauge/GaugeContainer.js +4 -1
  43. package/LineChart/AnimatedLine.js +7 -3
  44. package/LineChart/AppearingMask.js +4 -1
  45. package/LineChart/CircleMarkElement.d.ts +5 -0
  46. package/LineChart/CircleMarkElement.js +13 -5
  47. package/LineChart/FocusedLineMark.js +5 -1
  48. package/LineChart/LineChart.js +30 -0
  49. package/LineChart/LineChart.plugins.d.ts +2 -1
  50. package/LineChart/LineChart.plugins.js +2 -1
  51. package/LineChart/LineElement.d.ts +4 -0
  52. package/LineChart/LineElement.js +7 -3
  53. package/LineChart/MarkElement.d.ts +5 -0
  54. package/LineChart/MarkElement.js +17 -10
  55. package/LineChart/markElementClasses.d.ts +0 -1
  56. package/LineChart/seriesConfig/index.js +3 -1
  57. package/LineChart/seriesConfig/legend.js +1 -0
  58. package/PieChart/FocusedPieArc.js +5 -2
  59. package/PieChart/PieArcLabel.d.ts +2 -0
  60. package/PieChart/PieArcLabel.js +5 -2
  61. package/PieChart/PieChart.js +35 -5
  62. package/PieChart/PieChart.plugins.d.ts +2 -1
  63. package/PieChart/PieChart.plugins.js +2 -1
  64. package/PieChart/seriesConfig/index.js +3 -1
  65. package/PieChart/seriesConfig/legend.js +6 -3
  66. package/RadarChart/RadarChart.js +30 -0
  67. package/RadarChart/RadarChart.plugins.d.ts +3 -2
  68. package/RadarChart/RadarChart.plugins.js +2 -1
  69. package/RadarChart/seriesConfig/index.js +3 -1
  70. package/RadarChart/seriesConfig/legend.js +1 -0
  71. package/ScatterChart/BatchScatter.js +8 -14
  72. package/ScatterChart/ScatterChart.js +30 -0
  73. package/ScatterChart/ScatterChart.plugins.d.ts +2 -1
  74. package/ScatterChart/ScatterChart.plugins.js +2 -1
  75. package/ScatterChart/seriesConfig/index.js +3 -1
  76. package/ScatterChart/seriesConfig/legend.js +1 -0
  77. package/SparkLineChart/SparkLineChart.js +46 -0
  78. package/esm/BarChart/BarChart.js +39 -0
  79. package/esm/BarChart/BarChart.plugins.d.ts +2 -1
  80. package/esm/BarChart/BarChart.plugins.js +2 -1
  81. package/esm/BarChart/BarLabel/BarLabel.d.ts +2 -0
  82. package/esm/BarChart/BarLabel/BarLabel.js +8 -3
  83. package/esm/BarChart/BarLabel/BarLabelItem.d.ts +2 -0
  84. package/esm/BarChart/BarLabel/BarLabelItem.js +4 -2
  85. package/esm/BarChart/BarPlot.d.ts +12 -2
  86. package/esm/BarChart/BarPlot.js +29 -86
  87. package/esm/BarChart/BatchBarPlot/BarGroup.d.ts +15 -0
  88. package/esm/BarChart/BatchBarPlot/BarGroup.js +134 -0
  89. package/esm/BarChart/BatchBarPlot/BatchBarPlot.d.ts +12 -0
  90. package/esm/BarChart/BatchBarPlot/BatchBarPlot.js +133 -0
  91. package/esm/BarChart/BatchBarPlot/index.d.ts +1 -0
  92. package/esm/BarChart/BatchBarPlot/index.js +1 -0
  93. package/esm/BarChart/BatchBarPlot/useCreateBarPaths.d.ts +8 -0
  94. package/esm/BarChart/BatchBarPlot/useCreateBarPaths.js +46 -0
  95. package/esm/BarChart/FocusedBar.js +5 -1
  96. package/esm/BarChart/IndividualBarPlot.d.ts +21 -0
  97. package/esm/BarChart/IndividualBarPlot.js +98 -0
  98. package/esm/BarChart/seriesConfig/bar/getSeriesWithDefaultValues.d.ts +1 -1
  99. package/esm/BarChart/seriesConfig/bar/legend.js +1 -0
  100. package/esm/BarChart/seriesConfig/index.js +3 -1
  101. package/esm/BarChart/types.d.ts +2 -0
  102. package/esm/BarChart/useBarChartProps.d.ts +6 -2
  103. package/esm/BarChart/useBarChartProps.js +4 -3
  104. package/esm/BarChart/useBarPlotData.d.ts +1 -1
  105. package/esm/BarChart/useBarPlotData.js +20 -1
  106. package/esm/BarChart/useRegisterItemClickHandlers.d.ts +6 -0
  107. package/esm/BarChart/useRegisterItemClickHandlers.js +67 -0
  108. package/esm/ChartContainer/ChartContainer.js +34 -0
  109. package/esm/ChartContainer/useChartContainerProps.js +6 -2
  110. package/esm/ChartsLegend/ChartsLegend.js +2 -2
  111. package/esm/ChartsLegend/legendContext.types.d.ts +12 -0
  112. package/esm/ChartsLegend/onClickContextBuilder.js +2 -1
  113. package/esm/ChartsOverlay/ChartsLoadingOverlay.js +4 -1
  114. package/esm/ChartsOverlay/ChartsNoDataOverlay.js +4 -1
  115. package/esm/ChartsReferenceLine/common.d.ts +1 -1
  116. package/esm/ChartsReferenceLine/common.js +4 -1
  117. package/esm/ChartsTooltip/ChartsTooltipContainer.js +26 -22
  118. package/esm/Gauge/GaugeContainer.js +4 -1
  119. package/esm/LineChart/AnimatedLine.js +7 -3
  120. package/esm/LineChart/AppearingMask.js +4 -1
  121. package/esm/LineChart/CircleMarkElement.d.ts +5 -0
  122. package/esm/LineChart/CircleMarkElement.js +13 -5
  123. package/esm/LineChart/FocusedLineMark.js +5 -1
  124. package/esm/LineChart/LineChart.js +30 -0
  125. package/esm/LineChart/LineChart.plugins.d.ts +2 -1
  126. package/esm/LineChart/LineChart.plugins.js +2 -1
  127. package/esm/LineChart/LineElement.d.ts +4 -0
  128. package/esm/LineChart/LineElement.js +7 -3
  129. package/esm/LineChart/MarkElement.d.ts +5 -0
  130. package/esm/LineChart/MarkElement.js +17 -10
  131. package/esm/LineChart/markElementClasses.d.ts +0 -1
  132. package/esm/LineChart/seriesConfig/index.js +3 -1
  133. package/esm/LineChart/seriesConfig/legend.js +1 -0
  134. package/esm/PieChart/FocusedPieArc.js +4 -1
  135. package/esm/PieChart/PieArcLabel.d.ts +2 -0
  136. package/esm/PieChart/PieArcLabel.js +5 -2
  137. package/esm/PieChart/PieChart.js +35 -5
  138. package/esm/PieChart/PieChart.plugins.d.ts +2 -1
  139. package/esm/PieChart/PieChart.plugins.js +2 -1
  140. package/esm/PieChart/seriesConfig/index.js +3 -1
  141. package/esm/PieChart/seriesConfig/legend.js +6 -3
  142. package/esm/RadarChart/RadarChart.js +30 -0
  143. package/esm/RadarChart/RadarChart.plugins.d.ts +3 -2
  144. package/esm/RadarChart/RadarChart.plugins.js +2 -1
  145. package/esm/RadarChart/seriesConfig/index.js +3 -1
  146. package/esm/RadarChart/seriesConfig/legend.js +1 -0
  147. package/esm/ScatterChart/BatchScatter.js +5 -11
  148. package/esm/ScatterChart/ScatterChart.js +30 -0
  149. package/esm/ScatterChart/ScatterChart.plugins.d.ts +2 -1
  150. package/esm/ScatterChart/ScatterChart.plugins.js +2 -1
  151. package/esm/ScatterChart/seriesConfig/index.js +3 -1
  152. package/esm/ScatterChart/seriesConfig/legend.js +1 -0
  153. package/esm/SparkLineChart/SparkLineChart.js +46 -0
  154. package/esm/index.js +1 -1
  155. package/esm/internals/appendAtKey.d.ts +8 -0
  156. package/esm/internals/appendAtKey.js +17 -0
  157. package/esm/internals/commonNextFocusItem.js +12 -8
  158. package/esm/internals/getBarDimensions.d.ts +1 -2
  159. package/esm/internals/identifierSerializer.d.ts +9 -0
  160. package/esm/internals/identifierSerializer.js +6 -0
  161. package/esm/internals/index.d.ts +6 -2
  162. package/esm/internals/index.js +6 -2
  163. package/esm/internals/invertScale.d.ts +6 -2
  164. package/esm/internals/invertScale.js +9 -1
  165. package/esm/internals/plugins/allPlugins.d.ts +4 -3
  166. package/esm/internals/plugins/allPlugins.js +2 -1
  167. package/esm/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.d.ts +14 -0
  168. package/esm/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.js +18 -0
  169. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +8 -1
  170. package/esm/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +12 -1
  171. package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +11 -0
  172. package/esm/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +74 -0
  173. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +20 -3
  174. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -3
  175. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +4 -0
  176. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +83 -0
  177. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.d.ts +3 -0
  178. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js +6 -0
  179. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js +7 -34
  180. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.d.ts +7 -0
  181. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js +9 -0
  182. package/esm/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js +10 -32
  183. package/esm/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -2
  184. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/index.d.ts +3 -0
  185. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/index.js +3 -0
  186. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +4 -0
  187. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +5 -0
  188. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.d.ts +3 -0
  189. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +78 -0
  190. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +16 -0
  191. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +19 -0
  192. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +90 -0
  193. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.js +1 -0
  194. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +4 -0
  195. package/esm/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +11 -0
  196. package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +2 -0
  197. package/esm/internals/plugins/models/seriesConfig/identifierSerializer.types.js +1 -0
  198. package/esm/internals/plugins/models/seriesConfig/index.d.ts +2 -1
  199. package/esm/internals/plugins/models/seriesConfig/index.js +2 -1
  200. package/esm/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +7 -0
  201. package/esm/models/axis.d.ts +5 -4
  202. package/esm/models/featureFlags.d.ts +1 -0
  203. package/esm/models/featureFlags.js +1 -0
  204. package/esm/models/index.d.ts +1 -0
  205. package/esm/models/index.js +1 -0
  206. package/esm/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +13 -0
  207. package/esm/moduleAugmentation/barChartBatchRendererOnItemClick.js +1 -0
  208. package/index.js +1 -1
  209. package/internals/appendAtKey.d.ts +8 -0
  210. package/internals/appendAtKey.js +23 -0
  211. package/internals/commonNextFocusItem.js +12 -8
  212. package/internals/getBarDimensions.d.ts +1 -2
  213. package/internals/identifierSerializer.d.ts +9 -0
  214. package/internals/identifierSerializer.js +16 -0
  215. package/internals/index.d.ts +6 -2
  216. package/internals/index.js +51 -7
  217. package/internals/invertScale.d.ts +6 -2
  218. package/internals/invertScale.js +10 -1
  219. package/internals/plugins/allPlugins.d.ts +4 -3
  220. package/internals/plugins/allPlugins.js +2 -1
  221. package/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.d.ts +14 -0
  222. package/internals/plugins/corePlugins/useChartSeries/serializeIdentifier.js +25 -0
  223. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.js +8 -1
  224. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +12 -1
  225. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.d.ts +11 -0
  226. package/internals/plugins/featurePlugins/shared/useRegisterPointerInteractions.js +81 -0
  227. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +20 -3
  228. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.js +10 -3
  229. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.d.ts +4 -0
  230. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisPosition.selectors.js +89 -0
  231. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.d.ts +3 -0
  232. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getMaxSeriesLength.js +12 -0
  233. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNextNonEmptySeries.js +6 -34
  234. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.d.ts +7 -0
  235. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getNonEmptySeriesArray.js +15 -0
  236. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/utils/getPreviousNonEmptySeries.js +9 -32
  237. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.selectors.d.ts +2 -2
  238. package/internals/plugins/featurePlugins/useChartVisibilityManager/index.d.ts +3 -0
  239. package/internals/plugins/featurePlugins/useChartVisibilityManager/index.js +39 -0
  240. package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.d.ts +4 -0
  241. package/internals/plugins/featurePlugins/useChartVisibilityManager/isIdentifierVisible.js +12 -0
  242. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.d.ts +3 -0
  243. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.js +85 -0
  244. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.d.ts +16 -0
  245. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.selectors.js +25 -0
  246. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +90 -0
  247. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.js +5 -0
  248. package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.d.ts +4 -0
  249. package/internals/plugins/featurePlugins/useChartVisibilityManager/visibilityParamToMap.js +18 -0
  250. package/internals/plugins/models/seriesConfig/identifierSerializer.types.d.ts +2 -0
  251. package/internals/plugins/models/seriesConfig/identifierSerializer.types.js +5 -0
  252. package/internals/plugins/models/seriesConfig/index.d.ts +2 -1
  253. package/internals/plugins/models/seriesConfig/index.js +11 -0
  254. package/internals/plugins/models/seriesConfig/seriesConfig.types.d.ts +7 -0
  255. package/models/axis.d.ts +5 -4
  256. package/models/featureFlags.d.ts +1 -0
  257. package/models/featureFlags.js +5 -0
  258. package/models/index.d.ts +1 -0
  259. package/models/index.js +11 -0
  260. package/moduleAugmentation/barChartBatchRendererOnItemClick.d.ts +13 -0
  261. package/moduleAugmentation/barChartBatchRendererOnItemClick.js +5 -0
  262. package/package.json +13 -3
@@ -1,6 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type MarkElementOwnerState } from "./markElementClasses.js";
3
3
  export type MarkElementProps = Omit<MarkElementOwnerState, 'isFaded' | 'isHighlighted'> & Omit<React.SVGProps<SVGPathElement>, 'ref' | 'id'> & {
4
+ /**
5
+ * If `true`, the marker is hidden.
6
+ * @default false
7
+ */
8
+ hidden?: boolean;
4
9
  /**
5
10
  * If `true`, animations are skipped.
6
11
  * @default false
@@ -18,17 +18,14 @@ var _getSymbol = require("../internals/getSymbol");
18
18
  var _useInteractionItemProps = require("../hooks/useInteractionItemProps");
19
19
  var _markElementClasses = require("./markElementClasses");
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
- const _excluded = ["x", "y", "id", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted"];
21
+ const _excluded = ["x", "y", "id", "classes", "color", "shape", "dataIndex", "onClick", "skipAnimation", "isFaded", "isHighlighted", "hidden", "style"];
22
22
  const MarkElementPath = (0, _styles.styled)('path', {
23
23
  name: 'MuiMarkElement',
24
24
  slot: 'Root'
25
25
  })(({
26
- ownerState,
27
26
  theme
28
27
  }) => ({
29
28
  fill: (theme.vars || theme).palette.background.paper,
30
- stroke: ownerState.color,
31
- strokeWidth: 2,
32
29
  [`&.${_markElementClasses.markElementClasses.animate}`]: {
33
30
  transitionDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
34
31
  transitionProperty: 'transform, transform-origin, opacity',
@@ -57,7 +54,9 @@ function MarkElement(props) {
57
54
  onClick,
58
55
  skipAnimation,
59
56
  isFaded = false,
60
- isHighlighted = false
57
+ isHighlighted = false,
58
+ hidden,
59
+ style
61
60
  } = props,
62
61
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
63
62
  const interactionProps = (0, _useInteractionItemProps.useInteractionItemProps)({
@@ -70,23 +69,26 @@ function MarkElement(props) {
70
69
  classes: innerClasses,
71
70
  isHighlighted,
72
71
  isFaded,
73
- color,
74
72
  skipAnimation
75
73
  };
76
74
  const classes = (0, _markElementClasses.useUtilityClasses)(ownerState);
77
75
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(MarkElementPath, (0, _extends2.default)({}, other, {
78
- style: {
76
+ style: (0, _extends2.default)({}, style, {
79
77
  transform: `translate(${x}px, ${y}px)`,
80
78
  transformOrigin: `${x}px ${y}px`
81
- },
79
+ }),
82
80
  ownerState: ownerState,
83
81
  className: classes.root,
84
82
  d: (0, _d3Shape.symbol)(_d3Shape.symbolsFill[(0, _getSymbol.getSymbol)(shape)])(),
85
83
  onClick: onClick,
86
- cursor: onClick ? 'pointer' : 'unset'
84
+ cursor: onClick ? 'pointer' : 'unset',
85
+ pointerEvents: hidden ? 'none' : undefined
87
86
  }, interactionProps, {
88
87
  "data-highlighted": isHighlighted || undefined,
89
- "data-faded": isFaded || undefined
88
+ "data-faded": isFaded || undefined,
89
+ opacity: hidden ? 0 : 1,
90
+ strokeWidth: 2,
91
+ stroke: color
90
92
  }));
91
93
  }
92
94
  process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
@@ -99,6 +101,11 @@ process.env.NODE_ENV !== "production" ? MarkElement.propTypes = {
99
101
  * The index to the element in the series' data array.
100
102
  */
101
103
  dataIndex: _propTypes.default.number.isRequired,
104
+ /**
105
+ * If `true`, the marker is hidden.
106
+ * @default false
107
+ */
108
+ hidden: _propTypes.default.bool,
102
109
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
103
110
  /**
104
111
  * If `true`, the marker is faded.
@@ -17,7 +17,6 @@ export interface MarkElementClasses {
17
17
  export type MarkElementClassKey = keyof MarkElementClasses;
18
18
  export interface MarkElementOwnerState {
19
19
  id: SeriesId;
20
- color: string;
21
20
  isFaded: boolean;
22
21
  isHighlighted: boolean;
23
22
  classes?: Partial<MarkElementClasses>;
@@ -14,6 +14,7 @@ var _tooltip = _interopRequireWildcard(require("./tooltip"));
14
14
  var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
15
15
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
16
16
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
17
+ var _identifierSerializer = require("../../internals/identifierSerializer");
17
18
  const lineSeriesConfig = exports.lineSeriesConfig = {
18
19
  colorProcessor: _getColor.default,
19
20
  seriesProcessor: _seriesProcessor.default,
@@ -24,5 +25,6 @@ const lineSeriesConfig = exports.lineSeriesConfig = {
24
25
  xExtremumGetter: _extremums.getExtremumX,
25
26
  yExtremumGetter: _extremums.getExtremumY,
26
27
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
27
- keyboardFocusHandler: _keyboardFocusHandler.default
28
+ keyboardFocusHandler: _keyboardFocusHandler.default,
29
+ identifierSerializer: _identifierSerializer.identifierSerializerSeriesIdDataIndex
28
30
  };
@@ -16,6 +16,7 @@ const legendGetter = params => {
16
16
  return acc;
17
17
  }
18
18
  acc.push({
19
+ type: 'line',
19
20
  markType: series[seriesId].labelMarkType,
20
21
  id: seriesId,
21
22
  seriesId,
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  'use client';
3
3
 
4
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
6
6
  Object.defineProperty(exports, "__esModule", {
7
7
  value: true
8
8
  });
9
9
  exports.FocusedPieArc = FocusedPieArc;
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
12
  var React = _interopRequireWildcard(require("react"));
12
13
  var _styles = require("@mui/material/styles");
13
14
  var _useFocusedItem = require("../hooks/useFocusedItem");
@@ -16,6 +17,7 @@ var _PieArc = require("./PieArc");
16
17
  var _useItemHighlighted = require("../hooks/useItemHighlighted");
17
18
  var _getModifiedArcProperties = require("./dataTransform/getModifiedArcProperties");
18
19
  var _jsxRuntime = require("react/jsx-runtime");
20
+ const _excluded = ["arcLabelRadius"];
19
21
  function FocusedPieArc(props) {
20
22
  const theme = (0, _styles.useTheme)();
21
23
  const focusedItem = (0, _useFocusedItem.useFocusedItem)();
@@ -37,7 +39,8 @@ function FocusedPieArc(props) {
37
39
  return null;
38
40
  }
39
41
  const item = series.data[focusedItem.dataIndex];
40
- const arcSizes = (0, _getModifiedArcProperties.getModifiedArcProperties)(series, pieSeriesLayout[focusedItem.seriesId], isHighlighted, isFaded);
42
+ const _getModifiedArcProper = (0, _getModifiedArcProperties.getModifiedArcProperties)(series, pieSeriesLayout[focusedItem.seriesId], isHighlighted, isFaded),
43
+ arcSizes = (0, _objectWithoutPropertiesLoose2.default)(_getModifiedArcProper, _excluded);
41
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PieArc.PieArc, (0, _extends2.default)({
42
45
  transform: `translate(${pieSeriesLayout[series.id].center.x}, ${pieSeriesLayout[series.id].center.y})`,
43
46
  startAngle: item.startAngle,
@@ -36,6 +36,7 @@ export type PieArcLabelProps = PieArcLabelOwnerState & Omit<React.SVGProps<SVGTe
36
36
  paddingAngle: number;
37
37
  skipAnimation: boolean;
38
38
  formattedArcLabel?: string | null;
39
+ hidden?: boolean;
39
40
  };
40
41
  declare const PieArcLabel: React.ForwardRefExoticComponent<PieArcLabelOwnerState & Omit<React.SVGProps<SVGTextElement>, "ref" | "color" | "id"> & {
41
42
  startAngle: number;
@@ -47,5 +48,6 @@ declare const PieArcLabel: React.ForwardRefExoticComponent<PieArcLabelOwnerState
47
48
  paddingAngle: number;
48
49
  skipAnimation: boolean;
49
50
  formattedArcLabel?: string | null;
51
+ hidden?: boolean;
50
52
  } & React.RefAttributes<SVGTextElement>>;
51
53
  export { PieArcLabel };
@@ -20,7 +20,7 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
20
20
  var _animation = require("../internals/animation/animation");
21
21
  var _useAnimatePieArcLabel = require("../hooks/animation/useAnimatePieArcLabel");
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
- const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "skipAnimation"];
23
+ const _excluded = ["id", "classes", "color", "startAngle", "endAngle", "paddingAngle", "arcLabelRadius", "innerRadius", "outerRadius", "cornerRadius", "formattedArcLabel", "isHighlighted", "isFaded", "skipAnimation", "hidden"];
24
24
  function getPieArcLabelUtilityClass(slot) {
25
25
  return (0, _generateUtilityClass.default)('MuiPieArcLabel', slot);
26
26
  }
@@ -76,7 +76,8 @@ const PieArcLabel = exports.PieArcLabel = /*#__PURE__*/React.forwardRef(function
76
76
  formattedArcLabel,
77
77
  isHighlighted,
78
78
  isFaded,
79
- skipAnimation
79
+ skipAnimation,
80
+ hidden
80
81
  } = props,
81
82
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
82
83
  const ownerState = {
@@ -101,6 +102,7 @@ const PieArcLabel = exports.PieArcLabel = /*#__PURE__*/React.forwardRef(function
101
102
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(PieArcLabelRoot, (0, _extends2.default)({
102
103
  className: classes.root
103
104
  }, other, animatedProps, {
105
+ opacity: hidden ? 0 : 1,
104
106
  children: formattedArcLabel
105
107
  }));
106
108
  });
@@ -116,6 +118,7 @@ process.env.NODE_ENV !== "production" ? PieArcLabel.propTypes = {
116
118
  cornerRadius: _propTypes.default.number.isRequired,
117
119
  endAngle: _propTypes.default.number.isRequired,
118
120
  formattedArcLabel: _propTypes.default.string,
121
+ hidden: _propTypes.default.bool,
119
122
  id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
120
123
  innerRadius: _propTypes.default.number.isRequired,
121
124
  isFaded: _propTypes.default.bool.isRequired,
@@ -80,15 +80,15 @@ const PieChart = exports.PieChart = /*#__PURE__*/React.forwardRef(function PieCh
80
80
  plugins: _PieChart2.PIE_CHART_PLUGINS
81
81
  }), ref);
82
82
  const Tooltip = slots?.tooltip ?? _ChartsTooltip.ChartsTooltip;
83
- const Toolbar = props.slots?.toolbar;
83
+ const Toolbar = slots?.toolbar;
84
84
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartDataProvider.ChartDataProvider, (0, _extends2.default)({}, chartDataProviderProps, {
85
85
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsWrapper.ChartsWrapper, {
86
- legendPosition: props.slotProps?.legend?.position,
87
- legendDirection: props.slotProps?.legend?.direction ?? 'vertical',
86
+ legendPosition: slotProps?.legend?.position,
87
+ legendDirection: slotProps?.legend?.direction ?? 'vertical',
88
88
  sx: sx,
89
89
  hideLegend: hideLegend ?? false,
90
- children: [showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, props.slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
91
- direction: props.slotProps?.legend?.direction ?? 'vertical',
90
+ children: [showToolbar && Toolbar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Toolbar, (0, _extends2.default)({}, slotProps?.toolbar)) : null, !hideLegend && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLegend.ChartsLegend, {
91
+ direction: slotProps?.legend?.direction ?? 'vertical',
92
92
  slots: slots,
93
93
  slotProps: slotProps
94
94
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChartsSurface.ChartsSurface, (0, _extends2.default)({}, chartsSurfaceProps, {
@@ -133,6 +133,31 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
133
133
  * The height of the chart in px. If not defined, it takes the height of the parent element.
134
134
  */
135
135
  height: _propTypes.default.number,
136
+ /**
137
+ * List of hidden series and/or items.
138
+ *
139
+ * Different chart types use different keys.
140
+ *
141
+ * @example
142
+ * ```ts
143
+ * [
144
+ * {
145
+ * type: 'pie',
146
+ * seriesId: 'series-1',
147
+ * dataIndex: 3,
148
+ * },
149
+ * {
150
+ * type: 'line',
151
+ * seriesId: 'series-2',
152
+ * }
153
+ * ]
154
+ * ```
155
+ */
156
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
157
+ dataIndex: _propTypes.default.number,
158
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
159
+ type: _propTypes.default.oneOf(['pie']).isRequired
160
+ })),
136
161
  /**
137
162
  * If `true`, the legend is not rendered.
138
163
  */
@@ -171,6 +196,11 @@ process.env.NODE_ENV !== "production" ? PieChart.propTypes = {
171
196
  right: _propTypes.default.number,
172
197
  top: _propTypes.default.number
173
198
  })]),
199
+ /**
200
+ * Callback fired when any hidden identifiers change.
201
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
202
+ */
203
+ onHiddenItemsChange: _propTypes.default.func,
174
204
  /**
175
205
  * The callback fired when the highlighted item changes.
176
206
  *
@@ -3,5 +3,6 @@ import { type UseChartTooltipSignature } from "../internals/plugins/featurePlugi
3
3
  import { type UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
4
4
  import { type UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
5
5
  import { type ConvertSignaturesIntoPlugins } from "../internals/plugins/models/helpers.js";
6
- export type PieChartPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartKeyboardNavigationSignature];
6
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
7
+ export type PieChartPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'pie'>, UseChartKeyboardNavigationSignature];
7
8
  export declare const PIE_CHART_PLUGINS: ConvertSignaturesIntoPlugins<PieChartPluginSignatures>;
@@ -8,4 +8,5 @@ var _useChartInteraction = require("../internals/plugins/featurePlugins/useChart
8
8
  var _useChartTooltip = require("../internals/plugins/featurePlugins/useChartTooltip");
9
9
  var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
10
10
  var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
11
- const PIE_CHART_PLUGINS = exports.PIE_CHART_PLUGINS = [_useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartHighlight.useChartHighlight, _useChartKeyboardNavigation.useChartKeyboardNavigation];
11
+ var _useChartVisibilityManager = require("../internals/plugins/featurePlugins/useChartVisibilityManager");
12
+ const PIE_CHART_PLUGINS = exports.PIE_CHART_PLUGINS = [_useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartHighlight.useChartHighlight, _useChartVisibilityManager.useChartVisibilityManager, _useChartKeyboardNavigation.useChartKeyboardNavigation];
@@ -13,6 +13,7 @@ var _seriesLayout = _interopRequireDefault(require("./seriesLayout"));
13
13
  var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
14
14
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
15
15
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
16
+ var _identifierSerializer = require("../../internals/identifierSerializer");
16
17
  const pieSeriesConfig = exports.pieSeriesConfig = {
17
18
  colorProcessor: _getColor.default,
18
19
  seriesProcessor: _seriesProcessor.default,
@@ -21,5 +22,6 @@ const pieSeriesConfig = exports.pieSeriesConfig = {
21
22
  tooltipGetter: _tooltip.default,
22
23
  tooltipItemPositionGetter: _tooltipPosition.default,
23
24
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
24
- keyboardFocusHandler: _keyboardFocusHandler.default
25
+ keyboardFocusHandler: _keyboardFocusHandler.default,
26
+ identifierSerializer: _identifierSerializer.identifierSerializerSeriesIdDataIndex
25
27
  };
@@ -16,13 +16,16 @@ const legendGetter = params => {
16
16
  if (formattedLabel === undefined) {
17
17
  return;
18
18
  }
19
+ const id = item.id ?? dataIndex;
19
20
  acc.push({
21
+ type: 'pie',
20
22
  markType: item.labelMarkType ?? series[seriesId].labelMarkType,
21
- id: item.id ?? dataIndex,
22
23
  seriesId,
24
+ id,
25
+ itemId: id,
26
+ dataIndex,
23
27
  color: item.color,
24
- label: formattedLabel,
25
- itemId: item.id ?? dataIndex
28
+ label: formattedLabel
26
29
  });
27
30
  });
28
31
  return acc;
@@ -91,6 +91,31 @@ process.env.NODE_ENV !== "production" ? RadarChart.propTypes = {
91
91
  * The height of the chart in px. If not defined, it takes the height of the parent element.
92
92
  */
93
93
  height: _propTypes.default.number,
94
+ /**
95
+ * List of hidden series and/or items.
96
+ *
97
+ * Different chart types use different keys.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * [
102
+ * {
103
+ * type: 'pie',
104
+ * seriesId: 'series-1',
105
+ * dataIndex: 3,
106
+ * },
107
+ * {
108
+ * type: 'line',
109
+ * seriesId: 'series-2',
110
+ * }
111
+ * ]
112
+ * ```
113
+ */
114
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
115
+ dataIndex: _propTypes.default.number,
116
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
117
+ type: _propTypes.default.oneOf(['radar']).isRequired
118
+ })),
94
119
  /**
95
120
  * If `true`, the legend is not rendered.
96
121
  */
@@ -147,6 +172,11 @@ process.env.NODE_ENV !== "production" ? RadarChart.propTypes = {
147
172
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
148
173
  */
149
174
  onAxisClick: _propTypes.default.func,
175
+ /**
176
+ * Callback fired when any hidden identifiers change.
177
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
178
+ */
179
+ onHiddenItemsChange: _propTypes.default.func,
150
180
  /**
151
181
  * The callback fired when the highlighted item changes.
152
182
  *
@@ -2,5 +2,6 @@ import { type UseChartPolarAxisSignature } from "../internals/plugins/featurePlu
2
2
  import { type UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
3
3
  import { type UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
4
4
  import { type UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
5
- export declare const RADAR_PLUGINS: readonly [import("../internals/index.js").ChartPlugin<UseChartTooltipSignature>, import("../internals/index.js").ChartPlugin<UseChartInteractionSignature>, import("../internals/index.js").ChartPlugin<UseChartPolarAxisSignature<any>>, import("../internals/index.js").ChartPlugin<UseChartHighlightSignature>];
6
- export type RadarChartPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature];
5
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
6
+ export declare const RADAR_PLUGINS: readonly [import("../internals/index.js").ChartPlugin<UseChartTooltipSignature>, import("../internals/index.js").ChartPlugin<UseChartInteractionSignature>, import("../internals/index.js").ChartPlugin<UseChartPolarAxisSignature<any>>, import("../internals/index.js").ChartPlugin<UseChartHighlightSignature>, import("../internals/index.js").ChartPlugin<UseChartVisibilityManagerSignature<any>>];
7
+ export type RadarChartPluginSignatures = [UseChartTooltipSignature, UseChartInteractionSignature, UseChartPolarAxisSignature, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'radar'>];
@@ -8,4 +8,5 @@ var _useChartPolarAxis = require("../internals/plugins/featurePlugins/useChartPo
8
8
  var _useChartTooltip = require("../internals/plugins/featurePlugins/useChartTooltip");
9
9
  var _useChartInteraction = require("../internals/plugins/featurePlugins/useChartInteraction");
10
10
  var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
11
- const RADAR_PLUGINS = exports.RADAR_PLUGINS = [_useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartPolarAxis.useChartPolarAxis, _useChartHighlight.useChartHighlight];
11
+ var _useChartVisibilityManager = require("../internals/plugins/featurePlugins/useChartVisibilityManager");
12
+ const RADAR_PLUGINS = exports.RADAR_PLUGINS = [_useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartPolarAxis.useChartPolarAxis, _useChartHighlight.useChartHighlight, _useChartVisibilityManager.useChartVisibilityManager];
@@ -13,6 +13,7 @@ var _legend = _interopRequireDefault(require("./legend"));
13
13
  var _tooltip = _interopRequireWildcard(require("./tooltip"));
14
14
  var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
15
15
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
16
+ var _identifierSerializer = require("../../internals/identifierSerializer");
16
17
  const radarSeriesConfig = exports.radarSeriesConfig = {
17
18
  colorProcessor: _getColor.default,
18
19
  seriesProcessor: _seriesProcessor.default,
@@ -22,5 +23,6 @@ const radarSeriesConfig = exports.radarSeriesConfig = {
22
23
  axisTooltipGetter: _tooltip.axisTooltipGetter,
23
24
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
24
25
  radiusExtremumGetter: _extremums.radiusExtremumGetter,
25
- rotationExtremumGetter: _extremums.rotationExtremumGetter
26
+ rotationExtremumGetter: _extremums.rotationExtremumGetter,
27
+ identifierSerializer: _identifierSerializer.identifierSerializerSeriesIdDataIndex
26
28
  };
@@ -16,6 +16,7 @@ const legendGetter = params => {
16
16
  return acc;
17
17
  }
18
18
  acc.push({
19
+ type: 'radar',
19
20
  id: seriesId,
20
21
  seriesId,
21
22
  color: series[seriesId].color,
@@ -12,21 +12,12 @@ var _scatterClasses = require("./scatterClasses");
12
12
  var _ChartProvider = require("../context/ChartProvider");
13
13
  var _useScale = require("../hooks/useScale");
14
14
  var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
15
+ var _appendAtKey = require("../internals/appendAtKey");
15
16
  var _jsxRuntime = require("react/jsx-runtime");
16
17
  const MAX_POINTS_PER_PATH = 1000;
17
18
  /* In an SVG arc, if the arc starts and ends at the same point, it is not rendered, so we add a tiny
18
19
  * value to one of the coordinates to ensure that the arc is rendered. */
19
20
  const ALMOST_ZERO = 0.01;
20
- function appendAtKey(map, key, value) {
21
- let bucket = map.get(key);
22
- if (!bucket) {
23
- bucket = [value];
24
- map.set(key, bucket);
25
- } else {
26
- bucket.push(value);
27
- }
28
- return bucket;
29
- }
30
21
  function createPath(x, y, markerSize) {
31
22
  return `M${x - markerSize} ${y} a${markerSize} ${markerSize} 0 1 1 0 ${ALMOST_ZERO}`;
32
23
  }
@@ -47,15 +38,15 @@ function useCreatePaths(seriesData, markerSize, xScale, yScale, color, colorGett
47
38
  }
48
39
  const path = createPath(x, y, markerSize);
49
40
  const fill = colorGetter ? colorGetter(i) : color;
50
- const tempPath = appendAtKey(temporaryPaths, fill, path);
41
+ const tempPath = (0, _appendAtKey.appendAtKey)(temporaryPaths, fill, path);
51
42
  if (tempPath.length >= MAX_POINTS_PER_PATH) {
52
- appendAtKey(paths, fill, tempPath.join(''));
43
+ (0, _appendAtKey.appendAtKey)(paths, fill, tempPath.join(''));
53
44
  temporaryPaths.delete(fill);
54
45
  }
55
46
  }
56
47
  for (const [fill, tempPath] of temporaryPaths.entries()) {
57
48
  if (tempPath.length > 0) {
58
- appendAtKey(paths, fill, tempPath.join(''));
49
+ (0, _appendAtKey.appendAtKey)(paths, fill, tempPath.join(''));
59
50
  }
60
51
  }
61
52
  return paths;
@@ -87,7 +78,10 @@ function BatchScatterPaths(props) {
87
78
  }
88
79
  const MemoBatchScatterPaths = /*#__PURE__*/React.memo(BatchScatterPaths);
89
80
  if (process.env.NODE_ENV !== "production") MemoBatchScatterPaths.displayName = "MemoBatchScatterPaths";
90
- const Group = (0, _styles.styled)('g')({
81
+ const Group = (0, _styles.styled)('g', {
82
+ slot: 'internal',
83
+ shouldForwardProp: undefined
84
+ })({
91
85
  '&[data-faded="true"]': {
92
86
  opacity: 0.3
93
87
  },
@@ -131,6 +131,31 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
131
131
  * The height of the chart in px. If not defined, it takes the height of the parent element.
132
132
  */
133
133
  height: _propTypes.default.number,
134
+ /**
135
+ * List of hidden series and/or items.
136
+ *
137
+ * Different chart types use different keys.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * [
142
+ * {
143
+ * type: 'pie',
144
+ * seriesId: 'series-1',
145
+ * dataIndex: 3,
146
+ * },
147
+ * {
148
+ * type: 'line',
149
+ * seriesId: 'series-2',
150
+ * }
151
+ * ]
152
+ * ```
153
+ */
154
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
155
+ dataIndex: _propTypes.default.number,
156
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
157
+ type: _propTypes.default.oneOf(['scatter']).isRequired
158
+ })),
134
159
  /**
135
160
  * If `true`, the legend is not rendered.
136
161
  */
@@ -176,6 +201,11 @@ process.env.NODE_ENV !== "production" ? ScatterChart.propTypes = {
176
201
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
177
202
  */
178
203
  onAxisClick: _propTypes.default.func,
204
+ /**
205
+ * Callback fired when any hidden identifiers change.
206
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
207
+ */
208
+ onHiddenItemsChange: _propTypes.default.func,
179
209
  /**
180
210
  * The callback fired when the highlighted item changes.
181
211
  *
@@ -7,5 +7,6 @@ import { type ConvertSignaturesIntoPlugins } from "../internals/plugins/models/h
7
7
  import { type UseChartClosestPointSignature } from "../internals/plugins/featurePlugins/useChartClosestPoint/index.js";
8
8
  import { type UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
9
9
  import { type UseChartBrushSignature } from "../internals/plugins/featurePlugins/useChartBrush/index.js";
10
- export type ScatterChartPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartHighlightSignature, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
10
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
11
+ export type ScatterChartPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'scatter'>, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'scatter'>, UseChartClosestPointSignature, UseChartKeyboardNavigationSignature];
11
12
  export declare const SCATTER_CHART_PLUGINS: ConvertSignaturesIntoPlugins<ScatterChartPluginSignatures>;
@@ -12,4 +12,5 @@ var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHi
12
12
  var _useChartClosestPoint = require("../internals/plugins/featurePlugins/useChartClosestPoint");
13
13
  var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
14
14
  var _useChartBrush = require("../internals/plugins/featurePlugins/useChartBrush");
15
- const SCATTER_CHART_PLUGINS = exports.SCATTER_CHART_PLUGINS = [_useChartZAxis.useChartZAxis, _useChartBrush.useChartBrush, _useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartCartesianAxis.useChartCartesianAxis, _useChartHighlight.useChartHighlight, _useChartClosestPoint.useChartClosestPoint, _useChartKeyboardNavigation.useChartKeyboardNavigation];
15
+ var _useChartVisibilityManager = require("../internals/plugins/featurePlugins/useChartVisibilityManager");
16
+ const SCATTER_CHART_PLUGINS = exports.SCATTER_CHART_PLUGINS = [_useChartZAxis.useChartZAxis, _useChartBrush.useChartBrush, _useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartCartesianAxis.useChartCartesianAxis, _useChartHighlight.useChartHighlight, _useChartVisibilityManager.useChartVisibilityManager, _useChartClosestPoint.useChartClosestPoint, _useChartKeyboardNavigation.useChartKeyboardNavigation];
@@ -13,6 +13,7 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
13
13
  var _getSeriesWithDefaultValues = _interopRequireDefault(require("./getSeriesWithDefaultValues"));
14
14
  var _tooltipPosition = _interopRequireDefault(require("./tooltipPosition"));
15
15
  var _keyboardFocusHandler = _interopRequireDefault(require("./keyboardFocusHandler"));
16
+ var _identifierSerializer = require("../../internals/identifierSerializer");
16
17
  const scatterSeriesConfig = exports.scatterSeriesConfig = {
17
18
  seriesProcessor: _seriesProcessor.default,
18
19
  colorProcessor: _getColor.default,
@@ -22,5 +23,6 @@ const scatterSeriesConfig = exports.scatterSeriesConfig = {
22
23
  xExtremumGetter: _extremums.getExtremumX,
23
24
  yExtremumGetter: _extremums.getExtremumY,
24
25
  getSeriesWithDefaultValues: _getSeriesWithDefaultValues.default,
25
- keyboardFocusHandler: _keyboardFocusHandler.default
26
+ keyboardFocusHandler: _keyboardFocusHandler.default,
27
+ identifierSerializer: _identifierSerializer.identifierSerializerSeriesIdDataIndex
26
28
  };
@@ -16,6 +16,7 @@ const legendGetter = params => {
16
16
  return acc;
17
17
  }
18
18
  acc.push({
19
+ type: 'scatter',
19
20
  markType: series[seriesId].labelMarkType,
20
21
  id: seriesId,
21
22
  seriesId,
@@ -248,6 +248,47 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
248
248
  * The height of the chart in px. If not defined, it takes the height of the parent element.
249
249
  */
250
250
  height: _propTypes.default.number,
251
+ /**
252
+ * List of hidden series and/or items.
253
+ *
254
+ * Different chart types use different keys.
255
+ *
256
+ * @example
257
+ * ```ts
258
+ * [
259
+ * {
260
+ * type: 'pie',
261
+ * seriesId: 'series-1',
262
+ * dataIndex: 3,
263
+ * },
264
+ * {
265
+ * type: 'line',
266
+ * seriesId: 'series-2',
267
+ * }
268
+ * ]
269
+ * ```
270
+ */
271
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
272
+ dataIndex: _propTypes.default.number,
273
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
274
+ type: _propTypes.default.oneOf(['bar']).isRequired
275
+ }), _propTypes.default.shape({
276
+ dataIndex: _propTypes.default.number,
277
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
278
+ type: _propTypes.default.oneOf(['line']).isRequired
279
+ }), _propTypes.default.shape({
280
+ dataIndex: _propTypes.default.number,
281
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
282
+ type: _propTypes.default.oneOf(['scatter']).isRequired
283
+ }), _propTypes.default.shape({
284
+ dataIndex: _propTypes.default.number,
285
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
286
+ type: _propTypes.default.oneOf(['pie']).isRequired
287
+ }), _propTypes.default.shape({
288
+ dataIndex: _propTypes.default.number,
289
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
290
+ type: _propTypes.default.oneOf(['radar']).isRequired
291
+ })]).isRequired),
251
292
  /**
252
293
  * The controlled axis highlight.
253
294
  * Identified by the axis id, and data index.
@@ -293,6 +334,11 @@ process.env.NODE_ENV !== "production" ? SparkLineChart.propTypes = {
293
334
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
294
335
  */
295
336
  onAxisClick: _propTypes.default.func,
337
+ /**
338
+ * Callback fired when any hidden identifiers change.
339
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
340
+ */
341
+ onHiddenItemsChange: _propTypes.default.func,
296
342
  /**
297
343
  * The callback fired when the highlighted item changes.
298
344
  *