@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
@@ -141,6 +141,31 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
141
141
  * The height of the chart in px. If not defined, it takes the height of the parent element.
142
142
  */
143
143
  height: _propTypes.default.number,
144
+ /**
145
+ * List of hidden series and/or items.
146
+ *
147
+ * Different chart types use different keys.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * [
152
+ * {
153
+ * type: 'pie',
154
+ * seriesId: 'series-1',
155
+ * dataIndex: 3,
156
+ * },
157
+ * {
158
+ * type: 'line',
159
+ * seriesId: 'series-2',
160
+ * }
161
+ * ]
162
+ * ```
163
+ */
164
+ hiddenItems: _propTypes.default.arrayOf(_propTypes.default.shape({
165
+ dataIndex: _propTypes.default.number,
166
+ seriesId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
167
+ type: _propTypes.default.oneOf(['bar']).isRequired
168
+ })),
144
169
  /**
145
170
  * If `true`, the legend is not rendered.
146
171
  */
@@ -199,6 +224,11 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
199
224
  * @param {null | ChartsAxisData} data The data about the clicked axis and items associated with it.
200
225
  */
201
226
  onAxisClick: _propTypes.default.func,
227
+ /**
228
+ * Callback fired when any hidden identifiers change.
229
+ * @param {VisibilityIdentifier[]} hiddenItems The new list of hidden identifiers.
230
+ */
231
+ onHiddenItemsChange: _propTypes.default.func,
202
232
  /**
203
233
  * The callback fired when the highlighted item changes.
204
234
  *
@@ -219,6 +249,15 @@ process.env.NODE_ENV !== "production" ? BarChart.propTypes = {
219
249
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
220
250
  */
221
251
  onItemClick: _propTypes.default.func,
252
+ /**
253
+ * The type of renderer to use for the bar plot.
254
+ * - `svg-single`: Renders every bar in a `<rect />` element.
255
+ * - `svg-batch`: Batch renders bars in `<path />` elements for better performance with large datasets, at the cost of some limitations.
256
+ * Read more: https://mui.com/x/react-charts/bars/#performance
257
+ *
258
+ * @default 'svg-single'
259
+ */
260
+ renderer: _propTypes.default.oneOf(['svg-batch', 'svg-single']),
222
261
  /**
223
262
  * The series to display in the bar chart.
224
263
  * An array of [[BarSeries]] objects.
@@ -6,5 +6,6 @@ import { type UseChartHighlightSignature } from "../internals/plugins/featurePlu
6
6
  import { type UseChartKeyboardNavigationSignature } from "../internals/plugins/featurePlugins/useChartKeyboardNavigation/index.js";
7
7
  import { type ConvertSignaturesIntoPlugins } from "../internals/plugins/models/helpers.js";
8
8
  import { type UseChartBrushSignature } from "../internals/plugins/featurePlugins/useChartBrush/index.js";
9
- export type BarChartPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartKeyboardNavigationSignature];
9
+ import { type UseChartVisibilityManagerSignature } from "../internals/plugins/featurePlugins/useChartVisibilityManager/index.js";
10
+ export type BarChartPluginSignatures = [UseChartZAxisSignature, UseChartBrushSignature, UseChartTooltipSignature, UseChartInteractionSignature, UseChartCartesianAxisSignature<'bar'>, UseChartHighlightSignature, UseChartVisibilityManagerSignature<'bar'>, UseChartKeyboardNavigationSignature];
10
11
  export declare const BAR_CHART_PLUGINS: ConvertSignaturesIntoPlugins<BarChartPluginSignatures>;
@@ -11,4 +11,5 @@ var _useChartInteraction = require("../internals/plugins/featurePlugins/useChart
11
11
  var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
12
12
  var _useChartKeyboardNavigation = require("../internals/plugins/featurePlugins/useChartKeyboardNavigation");
13
13
  var _useChartBrush = require("../internals/plugins/featurePlugins/useChartBrush");
14
- const BAR_CHART_PLUGINS = exports.BAR_CHART_PLUGINS = [_useChartZAxis.useChartZAxis, _useChartBrush.useChartBrush, _useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartCartesianAxis.useChartCartesianAxis, _useChartHighlight.useChartHighlight, _useChartKeyboardNavigation.useChartKeyboardNavigation];
14
+ var _useChartVisibilityManager = require("../internals/plugins/featurePlugins/useChartVisibilityManager");
15
+ const BAR_CHART_PLUGINS = exports.BAR_CHART_PLUGINS = [_useChartZAxis.useChartZAxis, _useChartBrush.useChartBrush, _useChartTooltip.useChartTooltip, _useChartInteraction.useChartInteraction, _useChartCartesianAxis.useChartCartesianAxis, _useChartHighlight.useChartHighlight, _useChartVisibilityManager.useChartVisibilityManager, _useChartKeyboardNavigation.useChartKeyboardNavigation];
@@ -32,6 +32,8 @@ export type BarLabelProps = Omit<React.SVGProps<SVGTextElement>, 'ref' | 'id' |
32
32
  * @default 'center'
33
33
  */
34
34
  placement?: 'center' | 'outside';
35
+ /** If true, the bar label is hidden. */
36
+ hidden?: boolean;
35
37
  };
36
38
  declare function BarLabel(inProps: BarLabelProps): React.JSX.Element;
37
39
  declare namespace BarLabel {
@@ -17,7 +17,7 @@ var _useAnimateBarLabel = require("../../hooks/animation/useAnimateBarLabel");
17
17
  var _barLabelClasses = require("./barLabelClasses");
18
18
  var _animation = require("../../internals/animation/animation");
19
19
  var _jsxRuntime = require("react/jsx-runtime");
20
- const _excluded = ["seriesId", "dataIndex", "color", "isFaded", "isHighlighted", "classes", "skipAnimation", "layout", "xOrigin", "yOrigin", "placement"];
20
+ const _excluded = ["seriesId", "dataIndex", "color", "isFaded", "isHighlighted", "classes", "skipAnimation", "layout", "xOrigin", "yOrigin", "placement", "hidden"];
21
21
  const BarLabelComponent = exports.BarLabelComponent = (0, _styles.styled)('text', {
22
22
  name: 'MuiBarLabel',
23
23
  slot: 'Root',
@@ -42,7 +42,8 @@ function BarLabel(inProps) {
42
42
  name: 'MuiBarLabel'
43
43
  });
44
44
  const {
45
- isFaded
45
+ isFaded,
46
+ hidden
46
47
  } = props,
47
48
  otherProps = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
48
49
  const animatedProps = (0, _useAnimateBarLabel.useAnimateBarLabel)(props);
@@ -52,7 +53,7 @@ function BarLabel(inProps) {
52
53
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(BarLabelComponent, (0, _extends2.default)({
53
54
  textAnchor: textAnchor,
54
55
  dominantBaseline: dominantBaseline,
55
- opacity: fadedOpacity
56
+ opacity: hidden ? 0 : fadedOpacity
56
57
  }, otherProps, animatedProps));
57
58
  }
58
59
  function getTextAnchor({
@@ -94,6 +95,10 @@ process.env.NODE_ENV !== "production" ? BarLabel.propTypes = {
94
95
  * Height of the bar this label belongs to.
95
96
  */
96
97
  height: _propTypes.default.number.isRequired,
98
+ /**
99
+ * If true, the bar label is hidden.
100
+ */
101
+ hidden: _propTypes.default.bool,
97
102
  isFaded: _propTypes.default.bool.isRequired,
98
103
  isHighlighted: _propTypes.default.bool.isRequired,
99
104
  layout: _propTypes.default.oneOf(['horizontal', 'vertical']).isRequired,
@@ -74,6 +74,8 @@ export type BarLabelItemProps<V extends BarValueType | null> = Omit<BarLabelOwne
74
74
  * @default 'center'
75
75
  */
76
76
  barLabelPlacement?: BarLabelProps['placement'];
77
+ /** If true, the bar label is hidden. */
78
+ hidden?: boolean;
77
79
  };
78
80
  /**
79
81
  * @ignore - internal component.
@@ -16,7 +16,7 @@ var _getBarLabel = require("./getBarLabel");
16
16
  var _BarLabel = require("./BarLabel");
17
17
  var _useItemHighlighted = require("../../hooks/useItemHighlighted");
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
- const _excluded = ["seriesId", "classes", "color", "dataIndex", "barLabel", "slots", "slotProps", "xOrigin", "yOrigin", "x", "y", "width", "height", "value", "skipAnimation", "layout", "barLabelPlacement"],
19
+ const _excluded = ["seriesId", "classes", "color", "dataIndex", "barLabel", "slots", "slotProps", "xOrigin", "yOrigin", "x", "y", "width", "height", "value", "skipAnimation", "layout", "barLabelPlacement", "hidden"],
20
20
  _excluded2 = ["ownerState"];
21
21
  /**
22
22
  * @ignore - internal component.
@@ -39,7 +39,8 @@ function BarLabelItem(props) {
39
39
  value,
40
40
  skipAnimation,
41
41
  layout,
42
- barLabelPlacement
42
+ barLabelPlacement,
43
+ hidden
43
44
  } = props,
44
45
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
45
46
  const {
@@ -95,6 +96,7 @@ function BarLabelItem(props) {
95
96
  return null;
96
97
  }
97
98
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, (0, _extends2.default)({}, barLabelProps, barLabelOwnerState, {
99
+ hidden: hidden,
98
100
  children: formattedLabelText
99
101
  }));
100
102
  }
@@ -3,6 +3,7 @@ import { type BarElementSlotProps, type BarElementSlots } from "./BarElement.js"
3
3
  import { type BarItemIdentifier } from "../models/index.js";
4
4
  import { type BarLabelSlotProps, type BarLabelSlots } from "./BarLabel/BarLabelItem.js";
5
5
  import type { BarItem, BarLabelContext } from "./BarLabel/index.js";
6
+ import { type RendererType } from "../ScatterChart/index.js";
6
7
  export interface BarPlotSlots extends BarElementSlots, BarLabelSlots {}
7
8
  export interface BarPlotSlotProps extends BarElementSlotProps, BarLabelSlotProps {}
8
9
  export interface BarPlotProps {
@@ -16,7 +17,7 @@ export interface BarPlotProps {
16
17
  * @param {React.MouseEvent<SVGElement, MouseEvent>} event The event source of the callback.
17
18
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
18
19
  */
19
- onItemClick?: (event: React.MouseEvent<SVGElement, MouseEvent>, barItemIdentifier: BarItemIdentifier) => void;
20
+ onItemClick?(event: React.MouseEvent<SVGElement, MouseEvent>, barItemIdentifier: BarItemIdentifier): void;
20
21
  /**
21
22
  * Defines the border radius of the bar element.
22
23
  */
@@ -30,6 +31,15 @@ export interface BarPlotProps {
30
31
  * @returns {string} The formatted label.
31
32
  */
32
33
  barLabel?: 'value' | ((item: BarItem, context: BarLabelContext) => string | null | undefined);
34
+ /**
35
+ * The type of renderer to use for the bar plot.
36
+ * - `svg-single`: Renders every bar in a `<rect />` element.
37
+ * - `svg-batch`: Batch renders bars in `<path />` elements for better performance with large datasets, at the cost of some limitations.
38
+ * Read more: https://mui.com/x/react-charts/bars/#performance
39
+ *
40
+ * @default 'svg-single'
41
+ */
42
+ renderer?: RendererType;
33
43
  /**
34
44
  * The props used for each component slot.
35
45
  * @default {}
@@ -52,7 +62,7 @@ export interface BarPlotProps {
52
62
  *
53
63
  * - [BarPlot API](https://mui.com/x/api/charts/bar-plot/)
54
64
  */
55
- declare function BarPlot(props: BarPlotProps): import("react/jsx-runtime").JSX.Element;
65
+ declare function BarPlot(props: BarPlotProps): React.JSX.Element;
56
66
  declare namespace BarPlot {
57
67
  var propTypes: any;
58
68
  }
@@ -13,17 +13,17 @@ var React = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _styles = require("@mui/material/styles");
15
15
  var _barElementClasses = require("./barElementClasses");
16
- var _BarElement = require("./BarElement");
17
16
  var _hooks = require("../hooks");
18
- var _BarClipPath = require("./BarClipPath");
19
17
  var _BarLabelPlot = require("./BarLabel/BarLabelPlot");
20
18
  var _useSkipAnimation = require("../hooks/useSkipAnimation");
21
19
  var _useInternalIsZoomInteracting = require("../internals/plugins/featurePlugins/useChartCartesianAxis/useInternalIsZoomInteracting");
22
20
  var _useBarPlotData = require("./useBarPlotData");
23
21
  var _barClasses = require("./barClasses");
24
22
  var _animation = require("../internals/animation/animation");
23
+ var _IndividualBarPlot = require("./IndividualBarPlot");
24
+ var _BatchBarPlot = require("./BatchBarPlot");
25
25
  var _jsxRuntime = require("react/jsx-runtime");
26
- const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel"];
26
+ const _excluded = ["skipAnimation", "onItemClick", "borderRadius", "barLabel", "renderer"];
27
27
  const BarPlotRoot = (0, _styles.styled)('g', {
28
28
  name: 'MuiBarPlot',
29
29
  slot: 'Root'
@@ -51,11 +51,13 @@ function BarPlot(props) {
51
51
  skipAnimation: inSkipAnimation,
52
52
  onItemClick,
53
53
  borderRadius,
54
- barLabel
54
+ barLabel,
55
+ renderer
55
56
  } = props,
56
57
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
57
58
  const isZoomInteracting = (0, _useInternalIsZoomInteracting.useInternalIsZoomInteracting)();
58
59
  const skipAnimation = (0, _useSkipAnimation.useSkipAnimation)(isZoomInteracting || inSkipAnimation);
60
+ const batchSkipAnimation = (0, _useSkipAnimation.useSkipAnimation)(inSkipAnimation);
59
61
  const {
60
62
  xAxis: xAxes
61
63
  } = (0, _hooks.useXAxes)();
@@ -66,86 +68,22 @@ function BarPlot(props) {
66
68
  completedData,
67
69
  masksData
68
70
  } = (0, _useBarPlotData.useBarPlotData)((0, _hooks.useDrawingArea)(), xAxes, yAxes);
69
- const withoutBorderRadius = !borderRadius || borderRadius <= 0;
70
71
  const classes = (0, _barClasses.useUtilityClasses)();
72
+ const BarElementPlot = renderer === 'svg-batch' ? _BatchBarPlot.BatchBarPlot : _IndividualBarPlot.IndividualBarPlot;
71
73
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(BarPlotRoot, {
72
74
  className: classes.root,
73
- children: [!withoutBorderRadius && masksData.map(({
74
- id,
75
- x,
76
- y,
77
- xOrigin,
78
- yOrigin,
79
- width,
80
- height,
81
- hasPositive,
82
- hasNegative,
83
- layout
84
- }) => {
85
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarClipPath.BarClipPath, {
86
- maskId: id,
87
- borderRadius: borderRadius,
88
- hasNegative: hasNegative,
89
- hasPositive: hasPositive,
90
- layout: layout,
91
- x: x,
92
- y: y,
93
- xOrigin: xOrigin,
94
- yOrigin: yOrigin,
95
- width: width,
96
- height: height,
97
- skipAnimation: skipAnimation ?? false
98
- }, id);
99
- }), completedData.map(({
100
- seriesId,
101
- layout,
102
- xOrigin,
103
- yOrigin,
104
- data
105
- }) => {
106
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
107
- "data-series": seriesId,
108
- className: classes.series,
109
- children: data.map(({
110
- dataIndex,
111
- color,
112
- maskId,
113
- x,
114
- y,
115
- width,
116
- height
117
- }) => {
118
- const barElement = /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarElement.BarElement, (0, _extends2.default)({
119
- id: seriesId,
120
- dataIndex: dataIndex,
121
- color: color,
122
- skipAnimation: skipAnimation ?? false,
123
- layout: layout ?? 'vertical',
124
- x: x,
125
- xOrigin: xOrigin,
126
- y: y,
127
- yOrigin: yOrigin,
128
- width: width,
129
- height: height
130
- }, other, {
131
- onClick: onItemClick && (event => {
132
- onItemClick(event, {
133
- type: 'bar',
134
- seriesId,
135
- dataIndex
136
- });
137
- })
138
- }), dataIndex);
139
- if (withoutBorderRadius) {
140
- return barElement;
141
- }
142
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
143
- clipPath: `url(#${maskId})`,
144
- children: barElement
145
- }, dataIndex);
146
- })
147
- }, seriesId);
148
- }), completedData.map(processedSeries => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarLabelPlot.BarLabelPlot, (0, _extends2.default)({
75
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BarElementPlot, (0, _extends2.default)({
76
+ completedData: completedData,
77
+ masksData: masksData
78
+ /* The batch renderer doesn't animate bars after the initial mount. Providing skipAnimation was causing an issue
79
+ * where bars would animate again after a zoom interaction because skipAnimation would change from true to false. */,
80
+ skipAnimation: renderer === 'svg-batch' ? batchSkipAnimation : skipAnimation,
81
+ onItemClick:
82
+ /* `onItemClick` accepts a `MouseEvent` when the renderer is "svg-batch" and a `React.MouseEvent` otherwise,
83
+ * so we need this cast to prevent TypeScript from complaining. */
84
+ onItemClick,
85
+ borderRadius: borderRadius
86
+ }, other)), completedData.map(processedSeries => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BarLabelPlot.BarLabelPlot, (0, _extends2.default)({
149
87
  className: classes.seriesLabels,
150
88
  processedSeries: processedSeries,
151
89
  skipAnimation: skipAnimation,
@@ -159,6 +97,7 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
159
97
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
160
98
  // ----------------------------------------------------------------------
161
99
  /**
100
+ * @deprecated Use `barLabel` in the chart series instead.
162
101
  * If provided, the function will be used to format the label of the bar.
163
102
  * It can be set to 'value' to display the current value.
164
103
  * @param {BarItem} item The item to format.
@@ -166,11 +105,6 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
166
105
  * @returns {string} The formatted label.
167
106
  */
168
107
  barLabel: _propTypes.default.oneOfType([_propTypes.default.oneOf(['value']), _propTypes.default.func]),
169
- /**
170
- * The placement of the bar label.
171
- * It controls whether the label is rendered inside or outside the bar.
172
- */
173
- barLabelPlacement: _propTypes.default.oneOf(['outside', 'inside']),
174
108
  /**
175
109
  * Defines the border radius of the bar element.
176
110
  */
@@ -181,6 +115,15 @@ process.env.NODE_ENV !== "production" ? BarPlot.propTypes = {
181
115
  * @param {BarItemIdentifier} barItemIdentifier The bar item identifier.
182
116
  */
183
117
  onItemClick: _propTypes.default.func,
118
+ /**
119
+ * The type of renderer to use for the bar plot.
120
+ * - `svg-single`: Renders every bar in a `<rect />` element.
121
+ * - `svg-batch`: Batch renders bars in `<path />` elements for better performance with large datasets, at the cost of some limitations.
122
+ * Read more: https://mui.com/x/react-charts/bars/#performance
123
+ *
124
+ * @default 'svg-single'
125
+ */
126
+ renderer: _propTypes.default.oneOf(['svg-batch', 'svg-single']),
184
127
  /**
185
128
  * If `true`, animations are skipped.
186
129
  * @default undefined
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ interface BarGroupProps extends React.HTMLAttributes<SVGGElement> {
3
+ skipAnimation: boolean;
4
+ layout: 'horizontal' | 'vertical' | undefined;
5
+ xOrigin: number;
6
+ yOrigin: number;
7
+ }
8
+ export declare function BarGroup({
9
+ skipAnimation,
10
+ layout,
11
+ xOrigin,
12
+ yOrigin,
13
+ ...props
14
+ }: BarGroupProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.BarGroup = BarGroup;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var _styles = require("@mui/material/styles");
12
+ var React = _interopRequireWildcard(require("react"));
13
+ var _useId = _interopRequireDefault(require("@mui/utils/useId"));
14
+ var _useStore = require("../../internals/store/useStore");
15
+ var _useChartDimensions = require("../../internals/plugins/corePlugins/useChartDimensions");
16
+ var _animation = require("../../internals/animation/animation");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ const _excluded = ["skipAnimation", "layout", "xOrigin", "yOrigin"],
19
+ _excluded2 = ["children", "layout", "xOrigin", "yOrigin"];
20
+ const PathGroup = (0, _styles.styled)('g')({
21
+ '&[data-faded="true"]': {
22
+ opacity: 0.3
23
+ },
24
+ '& path': {
25
+ /* The browser must do hit testing to know which element a pointer is interacting with.
26
+ * With many data points, we create many paths causing significant time to be spent in the hit test phase.
27
+ * To fix this issue, we disable pointer events for the descendant paths.
28
+ *
29
+ * Ideally, users should be able to override this in case they need pointer events to be enabled,
30
+ * but it can affect performance negatively, especially with many data points. */
31
+ pointerEvents: 'none'
32
+ }
33
+ });
34
+ function BarGroup(_ref) {
35
+ let {
36
+ skipAnimation,
37
+ layout,
38
+ xOrigin,
39
+ yOrigin
40
+ } = _ref,
41
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
42
+ if (skipAnimation) {
43
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(PathGroup, (0, _extends2.default)({}, props));
44
+ }
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedGroup, (0, _extends2.default)({}, props, {
46
+ layout: layout,
47
+ xOrigin: xOrigin,
48
+ yOrigin: yOrigin
49
+ }));
50
+ }
51
+ const AnimatedRect = (0, _styles.styled)('rect')({
52
+ '@keyframes scaleInX': {
53
+ from: {
54
+ transform: 'scaleX(0)'
55
+ },
56
+ to: {
57
+ transform: 'scaleX(1)'
58
+ }
59
+ },
60
+ '@keyframes scaleInY': {
61
+ from: {
62
+ transform: 'scaleY(0)'
63
+ },
64
+ to: {
65
+ transform: 'scaleY(1)'
66
+ }
67
+ },
68
+ animationDuration: `${_animation.ANIMATION_DURATION_MS}ms`,
69
+ animationFillMode: 'forwards',
70
+ '&[data-orientation="horizontal"]': {
71
+ animationName: 'scaleInX'
72
+ },
73
+ '&[data-orientation="vertical"]': {
74
+ animationName: 'scaleInY'
75
+ }
76
+ });
77
+ function AnimatedGroup(_ref2) {
78
+ let {
79
+ children,
80
+ layout,
81
+ xOrigin,
82
+ yOrigin
83
+ } = _ref2,
84
+ props = (0, _objectWithoutPropertiesLoose2.default)(_ref2, _excluded2);
85
+ const store = (0, _useStore.useStore)();
86
+ const drawingArea = store.use(_useChartDimensions.selectorChartDrawingArea);
87
+ const clipPathId = (0, _useId.default)();
88
+ const animateChildren = [];
89
+ if (layout === 'horizontal') {
90
+ animateChildren.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedRect, {
91
+ "data-orientation": "horizontal",
92
+ x: drawingArea.left,
93
+ width: xOrigin - drawingArea.left,
94
+ y: drawingArea.top,
95
+ height: drawingArea.height,
96
+ style: {
97
+ transformOrigin: `${xOrigin}px ${drawingArea.top + drawingArea.height / 2}px`
98
+ }
99
+ }, "left"));
100
+ animateChildren.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedRect, {
101
+ "data-orientation": "horizontal",
102
+ x: xOrigin,
103
+ width: drawingArea.left + drawingArea.width - xOrigin,
104
+ y: drawingArea.top,
105
+ height: drawingArea.height,
106
+ style: {
107
+ transformOrigin: `${xOrigin}px ${drawingArea.top + drawingArea.height / 2}px`
108
+ }
109
+ }, "right"));
110
+ } else {
111
+ animateChildren.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedRect, {
112
+ "data-orientation": "vertical",
113
+ x: drawingArea.left,
114
+ width: drawingArea.width,
115
+ y: drawingArea.top,
116
+ height: yOrigin - drawingArea.top,
117
+ style: {
118
+ transformOrigin: `${drawingArea.left + drawingArea.width / 2}px ${yOrigin}px`
119
+ }
120
+ }, "top"));
121
+ animateChildren.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedRect, {
122
+ "data-orientation": "vertical",
123
+ x: drawingArea.left,
124
+ width: drawingArea.width,
125
+ y: yOrigin,
126
+ height: drawingArea.top + drawingArea.height - yOrigin,
127
+ style: {
128
+ transformOrigin: `${drawingArea.left + drawingArea.width / 2}px ${yOrigin}px`
129
+ }
130
+ }, "bottom"));
131
+ }
132
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
133
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("clipPath", {
134
+ id: clipPathId,
135
+ children: animateChildren
136
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PathGroup, (0, _extends2.default)({
137
+ clipPath: `url(#${clipPathId})`
138
+ }, props, {
139
+ children: children
140
+ }))]
141
+ });
142
+ }
@@ -0,0 +1,12 @@
1
+ import type { BarItemIdentifier } from "../../models/index.js";
2
+ import { type IndividualBarPlotProps } from "../IndividualBarPlot.js";
3
+ interface BatchBarPlotProps extends Omit<IndividualBarPlotProps, 'onItemClick'> {
4
+ onItemClick?: (event: MouseEvent, barItemIdentifier: BarItemIdentifier) => void;
5
+ }
6
+ export declare function BatchBarPlot({
7
+ completedData,
8
+ borderRadius,
9
+ onItemClick,
10
+ skipAnimation
11
+ }: BatchBarPlotProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};