@yamada-ui/charts 1.5.4-dev-20241005224505 → 1.5.4-dev-20241006000212

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. package/dist/area-chart-gradient.d.mts +1 -1
  2. package/dist/area-chart-gradient.d.ts +1 -1
  3. package/dist/area-chart-gradient.js +5 -5
  4. package/dist/area-chart-gradient.js.map +1 -1
  5. package/dist/area-chart-gradient.mjs +1 -1
  6. package/dist/area-chart-split.d.mts +1 -1
  7. package/dist/area-chart-split.d.ts +1 -1
  8. package/dist/area-chart-split.js +2 -2
  9. package/dist/area-chart-split.js.map +1 -1
  10. package/dist/area-chart-split.mjs +1 -1
  11. package/dist/area-chart.d.mts +8 -8
  12. package/dist/area-chart.d.ts +8 -8
  13. package/dist/area-chart.js +180 -175
  14. package/dist/area-chart.js.map +1 -1
  15. package/dist/area-chart.mjs +13 -13
  16. package/dist/bar-chart.d.mts +8 -8
  17. package/dist/bar-chart.d.ts +8 -8
  18. package/dist/bar-chart.js +137 -127
  19. package/dist/bar-chart.js.map +1 -1
  20. package/dist/bar-chart.mjs +11 -11
  21. package/dist/chart-legend.d.mts +1 -1
  22. package/dist/chart-legend.d.ts +1 -1
  23. package/dist/chart-legend.js +2 -2
  24. package/dist/chart-legend.js.map +1 -1
  25. package/dist/chart-legend.mjs +3 -3
  26. package/dist/chart-tooltip.d.mts +4 -4
  27. package/dist/chart-tooltip.d.ts +4 -4
  28. package/dist/chart-tooltip.js +7 -7
  29. package/dist/chart-tooltip.js.map +1 -1
  30. package/dist/chart-tooltip.mjs +3 -3
  31. package/dist/chart-utils.js.map +1 -1
  32. package/dist/chart-utils.mjs +1 -1
  33. package/dist/chart.types.d.mts +14 -14
  34. package/dist/chart.types.d.ts +14 -14
  35. package/dist/chart.types.js.map +1 -1
  36. package/dist/{chunk-YSPGYMRF.mjs → chunk-5VLSGWQD.mjs} +8 -8
  37. package/dist/{chunk-YSPGYMRF.mjs.map → chunk-5VLSGWQD.mjs.map} +1 -1
  38. package/dist/{chunk-XYUYAHJX.mjs → chunk-6JRMEI6J.mjs} +2 -2
  39. package/dist/chunk-6JRMEI6J.mjs.map +1 -0
  40. package/dist/{chunk-VKBRU4Z4.mjs → chunk-AYVTBRCS.mjs} +29 -28
  41. package/dist/chunk-AYVTBRCS.mjs.map +1 -0
  42. package/dist/{chunk-6O5G3WYP.mjs → chunk-EZG52466.mjs} +29 -21
  43. package/dist/chunk-EZG52466.mjs.map +1 -0
  44. package/dist/{chunk-VEFEKDMH.mjs → chunk-FDALM73K.mjs} +15 -14
  45. package/dist/chunk-FDALM73K.mjs.map +1 -0
  46. package/dist/{chunk-2GQHI23M.mjs → chunk-GU4SGNWX.mjs} +5 -5
  47. package/dist/chunk-GU4SGNWX.mjs.map +1 -0
  48. package/dist/{chunk-MVRWZTQ5.mjs → chunk-NLXYCM5J.mjs} +2 -2
  49. package/dist/chunk-NLXYCM5J.mjs.map +1 -0
  50. package/dist/{chunk-54WAXZP7.mjs → chunk-NMPNNSBN.mjs} +74 -74
  51. package/dist/chunk-NMPNNSBN.mjs.map +1 -0
  52. package/dist/{chunk-OEM3VCHN.mjs → chunk-NQPC5LPY.mjs} +82 -82
  53. package/dist/chunk-NQPC5LPY.mjs.map +1 -0
  54. package/dist/{chunk-AYVZF37W.mjs → chunk-OG5CVPPV.mjs} +3 -3
  55. package/dist/chunk-OG5CVPPV.mjs.map +1 -0
  56. package/dist/{chunk-X6CD7LHX.mjs → chunk-OUIKA4AX.mjs} +3 -3
  57. package/dist/{chunk-X6CD7LHX.mjs.map → chunk-OUIKA4AX.mjs.map} +1 -1
  58. package/dist/{chunk-3EHZJFIA.mjs → chunk-PKQB4BFG.mjs} +28 -28
  59. package/dist/chunk-PKQB4BFG.mjs.map +1 -0
  60. package/dist/{chunk-C3ZYUDXE.mjs → chunk-QPMW56KA.mjs} +52 -48
  61. package/dist/chunk-QPMW56KA.mjs.map +1 -0
  62. package/dist/{chunk-IJRYXT4V.mjs → chunk-R2LOTDR3.mjs} +2 -2
  63. package/dist/{chunk-IJRYXT4V.mjs.map → chunk-R2LOTDR3.mjs.map} +1 -1
  64. package/dist/{chunk-6OYWQ3NO.mjs → chunk-SCY5V45W.mjs} +56 -56
  65. package/dist/chunk-SCY5V45W.mjs.map +1 -0
  66. package/dist/{chunk-CQTRL3BW.mjs → chunk-SYBJTMPL.mjs} +90 -90
  67. package/dist/chunk-SYBJTMPL.mjs.map +1 -0
  68. package/dist/{chunk-XKVM7WUW.mjs → chunk-TA7YJAW4.mjs} +47 -47
  69. package/dist/{chunk-XKVM7WUW.mjs.map → chunk-TA7YJAW4.mjs.map} +1 -1
  70. package/dist/{chunk-O3LMKYXK.mjs → chunk-TU6MKMMV.mjs} +29 -28
  71. package/dist/chunk-TU6MKMMV.mjs.map +1 -0
  72. package/dist/{chunk-QL3DB7OJ.mjs → chunk-TXNC7GLT.mjs} +1 -1
  73. package/dist/{chunk-QL3DB7OJ.mjs.map → chunk-TXNC7GLT.mjs.map} +1 -1
  74. package/dist/{chunk-EE6KEX6V.mjs → chunk-U325CYNR.mjs} +6 -6
  75. package/dist/chunk-U325CYNR.mjs.map +1 -0
  76. package/dist/{chunk-OPPMMNGP.mjs → chunk-UER5GW4M.mjs} +33 -24
  77. package/dist/chunk-UER5GW4M.mjs.map +1 -0
  78. package/dist/{chunk-FYAC4RRZ.mjs → chunk-UTD4XZDM.mjs} +11 -10
  79. package/dist/chunk-UTD4XZDM.mjs.map +1 -0
  80. package/dist/{chunk-A3IWA366.mjs → chunk-VK65X6Q2.mjs} +4 -4
  81. package/dist/chunk-VK65X6Q2.mjs.map +1 -0
  82. package/dist/{chunk-OJ2MLZZ7.mjs → chunk-X6PIY2M3.mjs} +7 -7
  83. package/dist/chunk-X6PIY2M3.mjs.map +1 -0
  84. package/dist/{chunk-MSG3WFBO.mjs → chunk-YIAK5DIM.mjs} +7 -6
  85. package/dist/chunk-YIAK5DIM.mjs.map +1 -0
  86. package/dist/{chunk-NETTMC2D.mjs → chunk-YTUEG4IY.mjs} +45 -45
  87. package/dist/chunk-YTUEG4IY.mjs.map +1 -0
  88. package/dist/{chunk-VUTCH2CU.mjs → chunk-YX23LEQ7.mjs} +13 -13
  89. package/dist/chunk-YX23LEQ7.mjs.map +1 -0
  90. package/dist/{chunk-DZL5KQOJ.mjs → chunk-ZRV4LO67.mjs} +42 -42
  91. package/dist/chunk-ZRV4LO67.mjs.map +1 -0
  92. package/dist/donut-chart.js +91 -89
  93. package/dist/donut-chart.js.map +1 -1
  94. package/dist/donut-chart.mjs +10 -10
  95. package/dist/index.d.mts +14 -14
  96. package/dist/index.d.ts +14 -14
  97. package/dist/index.js +2069 -2043
  98. package/dist/index.js.map +1 -1
  99. package/dist/index.mjs +28 -28
  100. package/dist/index.mjs.map +1 -1
  101. package/dist/line-chart.d.mts +7 -7
  102. package/dist/line-chart.d.ts +7 -7
  103. package/dist/line-chart.js +140 -138
  104. package/dist/line-chart.js.map +1 -1
  105. package/dist/line-chart.mjs +11 -11
  106. package/dist/pie-chart-label.d.mts +9 -9
  107. package/dist/pie-chart-label.d.ts +9 -9
  108. package/dist/pie-chart-label.js +14 -13
  109. package/dist/pie-chart-label.js.map +1 -1
  110. package/dist/pie-chart-label.mjs +1 -1
  111. package/dist/pie-chart.d.mts +11 -11
  112. package/dist/pie-chart.d.ts +11 -11
  113. package/dist/pie-chart.js +89 -87
  114. package/dist/pie-chart.js.map +1 -1
  115. package/dist/pie-chart.mjs +9 -9
  116. package/dist/radar-chart.d.mts +11 -11
  117. package/dist/radar-chart.d.ts +11 -11
  118. package/dist/radar-chart.js +81 -73
  119. package/dist/radar-chart.js.map +1 -1
  120. package/dist/radar-chart.mjs +9 -9
  121. package/dist/radial-chart.d.mts +10 -10
  122. package/dist/radial-chart.d.ts +10 -10
  123. package/dist/radial-chart.js +63 -62
  124. package/dist/radial-chart.js.map +1 -1
  125. package/dist/radial-chart.mjs +10 -10
  126. package/dist/use-area-chart.d.mts +53 -53
  127. package/dist/use-area-chart.d.ts +53 -53
  128. package/dist/use-area-chart.js +50 -46
  129. package/dist/use-area-chart.js.map +1 -1
  130. package/dist/use-area-chart.mjs +2 -2
  131. package/dist/use-bar-chart.d.mts +32 -32
  132. package/dist/use-bar-chart.d.ts +32 -32
  133. package/dist/use-bar-chart.js +30 -21
  134. package/dist/use-bar-chart.js.map +1 -1
  135. package/dist/use-bar-chart.mjs +2 -2
  136. package/dist/use-chart-axis.d.mts +27 -27
  137. package/dist/use-chart-axis.d.ts +27 -27
  138. package/dist/use-chart-axis.js +26 -26
  139. package/dist/use-chart-axis.js.map +1 -1
  140. package/dist/use-chart-axis.mjs +2 -2
  141. package/dist/use-chart-grid.d.mts +8 -8
  142. package/dist/use-chart-grid.d.ts +8 -8
  143. package/dist/use-chart-grid.js +3 -3
  144. package/dist/use-chart-grid.js.map +1 -1
  145. package/dist/use-chart-grid.mjs +2 -2
  146. package/dist/use-chart-label-list.d.mts +4 -4
  147. package/dist/use-chart-label-list.d.ts +4 -4
  148. package/dist/use-chart-label-list.js +5 -4
  149. package/dist/use-chart-label-list.js.map +1 -1
  150. package/dist/use-chart-label-list.mjs +2 -2
  151. package/dist/use-chart-label.d.mts +1 -1
  152. package/dist/use-chart-label.d.ts +1 -1
  153. package/dist/use-chart-label.js.map +1 -1
  154. package/dist/use-chart-label.mjs +2 -2
  155. package/dist/use-chart-legend.d.mts +1 -1
  156. package/dist/use-chart-legend.d.ts +1 -1
  157. package/dist/use-chart-legend.js +1 -1
  158. package/dist/use-chart-legend.js.map +1 -1
  159. package/dist/use-chart-legend.mjs +1 -1
  160. package/dist/use-chart-reference-line.d.mts +4 -4
  161. package/dist/use-chart-reference-line.d.ts +4 -4
  162. package/dist/use-chart-reference-line.js +8 -7
  163. package/dist/use-chart-reference-line.js.map +1 -1
  164. package/dist/use-chart-reference-line.mjs +2 -2
  165. package/dist/use-chart-tooltip.d.mts +7 -7
  166. package/dist/use-chart-tooltip.d.ts +7 -7
  167. package/dist/use-chart-tooltip.js +4 -4
  168. package/dist/use-chart-tooltip.js.map +1 -1
  169. package/dist/use-chart-tooltip.mjs +2 -2
  170. package/dist/use-chart.d.mts +6 -10
  171. package/dist/use-chart.d.ts +6 -10
  172. package/dist/use-chart.js +2 -2
  173. package/dist/use-chart.js.map +1 -1
  174. package/dist/use-chart.mjs +2 -2
  175. package/dist/use-line-chart.d.mts +43 -43
  176. package/dist/use-line-chart.d.ts +43 -43
  177. package/dist/use-line-chart.js +26 -25
  178. package/dist/use-line-chart.js.map +1 -1
  179. package/dist/use-line-chart.mjs +2 -2
  180. package/dist/use-pie-chart.d.mts +47 -47
  181. package/dist/use-pie-chart.d.ts +47 -47
  182. package/dist/use-pie-chart.js +40 -38
  183. package/dist/use-pie-chart.js.map +1 -1
  184. package/dist/use-pie-chart.mjs +3 -3
  185. package/dist/use-polar-grid.d.mts +5 -5
  186. package/dist/use-polar-grid.d.ts +5 -5
  187. package/dist/use-polar-grid.js.map +1 -1
  188. package/dist/use-polar-grid.mjs +2 -2
  189. package/dist/use-radar-chart.d.mts +41 -41
  190. package/dist/use-radar-chart.d.ts +41 -41
  191. package/dist/use-radar-chart.js +27 -19
  192. package/dist/use-radar-chart.js.map +1 -1
  193. package/dist/use-radar-chart.mjs +2 -2
  194. package/dist/use-radial-chart.d.mts +17 -17
  195. package/dist/use-radial-chart.d.ts +17 -17
  196. package/dist/use-radial-chart.js +11 -11
  197. package/dist/use-radial-chart.js.map +1 -1
  198. package/dist/use-radial-chart.mjs +2 -2
  199. package/package.json +3 -3
  200. package/dist/chunk-2GQHI23M.mjs.map +0 -1
  201. package/dist/chunk-3EHZJFIA.mjs.map +0 -1
  202. package/dist/chunk-54WAXZP7.mjs.map +0 -1
  203. package/dist/chunk-6O5G3WYP.mjs.map +0 -1
  204. package/dist/chunk-6OYWQ3NO.mjs.map +0 -1
  205. package/dist/chunk-A3IWA366.mjs.map +0 -1
  206. package/dist/chunk-AYVZF37W.mjs.map +0 -1
  207. package/dist/chunk-C3ZYUDXE.mjs.map +0 -1
  208. package/dist/chunk-CQTRL3BW.mjs.map +0 -1
  209. package/dist/chunk-DZL5KQOJ.mjs.map +0 -1
  210. package/dist/chunk-EE6KEX6V.mjs.map +0 -1
  211. package/dist/chunk-FYAC4RRZ.mjs.map +0 -1
  212. package/dist/chunk-MSG3WFBO.mjs.map +0 -1
  213. package/dist/chunk-MVRWZTQ5.mjs.map +0 -1
  214. package/dist/chunk-NETTMC2D.mjs.map +0 -1
  215. package/dist/chunk-O3LMKYXK.mjs.map +0 -1
  216. package/dist/chunk-OEM3VCHN.mjs.map +0 -1
  217. package/dist/chunk-OJ2MLZZ7.mjs.map +0 -1
  218. package/dist/chunk-OPPMMNGP.mjs.map +0 -1
  219. package/dist/chunk-VEFEKDMH.mjs.map +0 -1
  220. package/dist/chunk-VKBRU4Z4.mjs.map +0 -1
  221. package/dist/chunk-VUTCH2CU.mjs.map +0 -1
  222. package/dist/chunk-XYUYAHJX.mjs.map +0 -1
@@ -1,16 +1,16 @@
1
1
  "use client"
2
2
  import {
3
3
  RadarChart
4
- } from "./chunk-6OYWQ3NO.mjs";
5
- import "./chunk-6O5G3WYP.mjs";
6
- import "./chunk-XYUYAHJX.mjs";
7
- import "./chunk-OJ2MLZZ7.mjs";
8
- import "./chunk-IJRYXT4V.mjs";
9
- import "./chunk-X6CD7LHX.mjs";
10
- import "./chunk-YSPGYMRF.mjs";
11
- import "./chunk-A3IWA366.mjs";
4
+ } from "./chunk-SCY5V45W.mjs";
5
+ import "./chunk-EZG52466.mjs";
6
+ import "./chunk-6JRMEI6J.mjs";
7
+ import "./chunk-X6PIY2M3.mjs";
8
+ import "./chunk-R2LOTDR3.mjs";
9
+ import "./chunk-OUIKA4AX.mjs";
10
+ import "./chunk-5VLSGWQD.mjs";
11
+ import "./chunk-VK65X6Q2.mjs";
12
12
  import "./chunk-6YUJLLGN.mjs";
13
- import "./chunk-QL3DB7OJ.mjs";
13
+ import "./chunk-TXNC7GLT.mjs";
14
14
  export {
15
15
  RadarChart
16
16
  };
@@ -14,11 +14,15 @@ import 'recharts/types/chart/generateCategoricalChart';
14
14
 
15
15
  interface RadialChartOptions {
16
16
  /**
17
- * If `true`, tooltip is visible.
17
+ * Determines which data is displayed in the tooltip.
18
18
  *
19
- * @default true
19
+ * @default 'all'
20
20
  */
21
- withTooltip?: boolean;
21
+ tooltipDataSource?: TooltipDataSourceType;
22
+ /**
23
+ * Unit displayed next to each value in tooltip.
24
+ */
25
+ unit?: string;
22
26
  /**
23
27
  * If `true`, legend is visible.
24
28
  *
@@ -32,15 +36,11 @@ interface RadialChartOptions {
32
36
  */
33
37
  withPolarGrid?: boolean;
34
38
  /**
35
- * Determines which data is displayed in the tooltip.
39
+ * If `true`, tooltip is visible.
36
40
  *
37
- * @default 'all'
38
- */
39
- tooltipDataSource?: TooltipDataSourceType;
40
- /**
41
- * Unit displayed next to each value in tooltip.
41
+ * @default true
42
42
  */
43
- unit?: string;
43
+ withTooltip?: boolean;
44
44
  }
45
45
  interface RadialChartProps extends Omit<HTMLUIProps, "fillOpacity" | "strokeDasharray">, ThemeProps<"radialChart">, RadialChartOptions, UseRadialChartOptions, UseChartTooltipOptions, UseChartLegendProps, UseChartLabelListOptions, UsePolarGridOptions, UseChartProps {
46
46
  }
@@ -14,11 +14,15 @@ import 'recharts/types/chart/generateCategoricalChart';
14
14
 
15
15
  interface RadialChartOptions {
16
16
  /**
17
- * If `true`, tooltip is visible.
17
+ * Determines which data is displayed in the tooltip.
18
18
  *
19
- * @default true
19
+ * @default 'all'
20
20
  */
21
- withTooltip?: boolean;
21
+ tooltipDataSource?: TooltipDataSourceType;
22
+ /**
23
+ * Unit displayed next to each value in tooltip.
24
+ */
25
+ unit?: string;
22
26
  /**
23
27
  * If `true`, legend is visible.
24
28
  *
@@ -32,15 +36,11 @@ interface RadialChartOptions {
32
36
  */
33
37
  withPolarGrid?: boolean;
34
38
  /**
35
- * Determines which data is displayed in the tooltip.
39
+ * If `true`, tooltip is visible.
36
40
  *
37
- * @default 'all'
38
- */
39
- tooltipDataSource?: TooltipDataSourceType;
40
- /**
41
- * Unit displayed next to each value in tooltip.
41
+ * @default true
42
42
  */
43
- unit?: string;
43
+ withTooltip?: boolean;
44
44
  }
45
45
  interface RadialChartProps extends Omit<HTMLUIProps, "fillOpacity" | "strokeDasharray">, ThemeProps<"radialChart">, RadialChartOptions, UseRadialChartOptions, UseChartTooltipOptions, UseChartLegendProps, UseChartLabelListOptions, UsePolarGridOptions, UseChartProps {
46
46
  }
@@ -196,13 +196,13 @@ var useChart = ({ containerProps = {} }) => {
196
196
  getContainerProps
197
197
  };
198
198
  };
199
- var useLegend = ({} = {}) => {
199
+ var useLegend = () => {
200
200
  const { styles } = useChartContext();
201
201
  return {
202
202
  styles
203
203
  };
204
204
  };
205
- var useTooltip = ({} = {}) => {
205
+ var useTooltip = () => {
206
206
  const { styles } = useChartContext();
207
207
  return {
208
208
  styles
@@ -214,7 +214,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
214
214
  var ChartLegend = (0, import_core3.forwardRef)(
215
215
  ({ className, payload = [], onHighlight, ...rest }, ref) => {
216
216
  const { styles } = useLegend();
217
- const items = payload.map(({ dataKey, value: valueProp, color }, index) => {
217
+ const items = payload.map(({ color, dataKey, value: valueProp }, index) => {
218
218
  const value = dataKey != null ? dataKey : valueProp;
219
219
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
220
220
  import_core3.ui.div,
@@ -259,22 +259,22 @@ var import_utils4 = require("@yamada-ui/utils");
259
259
  var import_jsx_runtime2 = require("react/jsx-runtime");
260
260
  var ChartTooltip = (0, import_core4.forwardRef)(
261
261
  ({
262
- label,
263
- dataKey = "value",
264
262
  className,
265
- payload = [],
266
- valueFormatter,
263
+ dataKey = "value",
264
+ isRadialChart,
265
+ label,
267
266
  labelFormatter,
267
+ payload = [],
268
268
  unit,
269
- isRadialChart,
269
+ valueFormatter,
270
270
  ...rest
271
271
  }, ref) => {
272
272
  var _a;
273
273
  const { styles } = useTooltip();
274
274
  const items = payload.map(
275
275
  ({
276
- color: colorProp,
277
276
  name: nameProp,
277
+ color: colorProp,
278
278
  [dataKey]: valueProp,
279
279
  payload: payload2
280
280
  } = {}, index) => {
@@ -352,8 +352,8 @@ var import_core5 = require("@yamada-ui/core");
352
352
  var import_utils5 = require("@yamada-ui/utils");
353
353
  var import_react2 = require("react");
354
354
  var useChartLabelList = ({
355
- labelListProps = [],
356
- styles
355
+ styles,
356
+ labelListProps = []
357
357
  }) => {
358
358
  const { theme } = (0, import_core5.useTheme)();
359
359
  const styleClassName = (0, import_core5.getCSS)(styles.labelList)(theme);
@@ -367,8 +367,9 @@ var useChartLabelList = ({
367
367
  [labelListProps, styleClassName, theme]
368
368
  );
369
369
  const getLabelLineProps = (0, import_react2.useCallback)(
370
- ({ index, className, ...props }, ref = null) => {
371
- const { className: propClassName, ...rest } = propList[index];
370
+ ({ className, index, ...props }, ref = null) => {
371
+ var _a;
372
+ const { className: propClassName, ...rest } = (_a = propList[index]) != null ? _a : {};
372
373
  return {
373
374
  ref,
374
375
  className: (0, import_utils5.cx)(className, propClassName),
@@ -402,7 +403,7 @@ var useChartLegend = ({
402
403
  },
403
404
  [rest]
404
405
  );
405
- return { legendProps, getLegendProps };
406
+ return { getLegendProps, legendProps };
406
407
  };
407
408
 
408
409
  // src/use-chart-tooltip.ts
@@ -410,9 +411,9 @@ var import_core6 = require("@yamada-ui/core");
410
411
  var import_utils7 = require("@yamada-ui/utils");
411
412
  var import_react4 = require("react");
412
413
  var useChartTooltip = ({
413
- tooltipProps: _tooltipProps = {},
414
+ styles,
414
415
  tooltipAnimationDuration = 0,
415
- styles
416
+ tooltipProps: _tooltipProps = {}
416
417
  }) => {
417
418
  const { theme } = (0, import_core6.useTheme)();
418
419
  const { cursor, ...rest } = _tooltipProps;
@@ -428,16 +429,16 @@ var useChartTooltip = ({
428
429
  (props, ref = null) => ({
429
430
  ref,
430
431
  animationDuration: tooltipAnimationDuration,
431
- isAnimationActive: (tooltipAnimationDuration || 0) > 0,
432
432
  cursor: {
433
433
  className: (0, import_utils7.cx)("ui-chart__cursor", cursorClassName)
434
434
  },
435
+ isAnimationActive: (tooltipAnimationDuration || 0) > 0,
435
436
  ...props,
436
437
  ...tooltipProps
437
438
  }),
438
439
  [cursorClassName, tooltipAnimationDuration, tooltipProps]
439
440
  );
440
- return { tooltipProps: tooltipUIProps, getTooltipProps };
441
+ return { getTooltipProps, tooltipProps: tooltipUIProps };
441
442
  };
442
443
 
443
444
  // src/use-polar-grid.tsx
@@ -480,11 +481,11 @@ var import_react6 = require("react");
480
481
  var useRadialChart = ({
481
482
  data: dataProp,
482
483
  dataKey = "value",
484
+ endAngle = -180,
485
+ fillOpacity = 1,
483
486
  innerRadius = "10%",
484
487
  outerRadius = "80%",
485
488
  startAngle = 90,
486
- endAngle = -180,
487
- fillOpacity = 1,
488
489
  styles,
489
490
  ...rest
490
491
  }) => {
@@ -532,7 +533,7 @@ var useRadialChart = ({
532
533
  );
533
534
  const [radialBarProps, radialBarClassName] = (0, import_react6.useMemo)(
534
535
  () => getComponentProps(
535
- [computedRadialBarProps != null ? computedRadialBarProps : {}, radialBarProperties],
536
+ [computedRadialBarProps, radialBarProperties],
536
537
  styles.radialBar
537
538
  )(theme),
538
539
  [computedRadialBarProps, styles.radialBar, theme]
@@ -541,9 +542,9 @@ var useRadialChart = ({
541
542
  () => dataProp.map((props, index) => {
542
543
  const {
543
544
  name,
544
- value,
545
545
  color,
546
546
  dimRadialBar = {},
547
+ value,
547
548
  ...computedProps
548
549
  } = props;
549
550
  const dimmed = shouldHighlight && highlightedArea !== name;
@@ -556,11 +557,11 @@ var useRadialChart = ({
556
557
  dimmed ? dimRadialBarClassName : void 0
557
558
  )(theme);
558
559
  return {
560
+ name,
559
561
  className,
562
+ color,
560
563
  fill: (0, import_core8.getVar)(`radial-bar-${index}`)(theme),
561
- name,
562
- value,
563
- color
564
+ value
564
565
  };
565
566
  }),
566
567
  [
@@ -577,10 +578,10 @@ var useRadialChart = ({
577
578
  ref,
578
579
  className: (0, import_utils9.cx)(className, chartClassName),
579
580
  data,
581
+ endAngle,
580
582
  innerRadius,
581
583
  outerRadius,
582
584
  startAngle,
583
- endAngle,
584
585
  ...props,
585
586
  ...chartProps
586
587
  }),
@@ -598,9 +599,9 @@ var useRadialChart = ({
598
599
  ({ className, ...props }, ref = null) => ({
599
600
  ref,
600
601
  className: (0, import_utils9.cx)(className, radialBarClassName),
602
+ background,
601
603
  dataKey,
602
604
  isAnimationActive: false,
603
- background,
604
605
  ...props,
605
606
  ...radialBarProps
606
607
  }),
@@ -609,8 +610,8 @@ var useRadialChart = ({
609
610
  return {
610
611
  radialVars,
611
612
  setHighlightedArea,
612
- getRadialChartProps,
613
- getRadialBarProps
613
+ getRadialBarProps,
614
+ getRadialChartProps
614
615
  };
615
616
  };
616
617
 
@@ -622,67 +623,67 @@ var RadialChart = (0, import_core9.forwardRef)((props, ref) => {
622
623
  className,
623
624
  data,
624
625
  dataKey,
625
- chartProps,
626
- radialBarProps,
627
- containerProps,
628
- withPolarGrid = false,
629
- withTooltip = true,
630
- withLegend = false,
631
- tooltipProps,
632
- tooltipAnimationDuration,
633
- tooltipDataSource = "all",
634
- valueFormatter,
635
- unit,
636
- legendProps,
626
+ endAngle,
627
+ fillOpacity,
637
628
  innerRadius,
638
629
  outerRadius,
639
630
  startAngle,
640
- endAngle,
641
- fillOpacity,
631
+ strokeDasharray,
632
+ tooltipAnimationDuration,
633
+ tooltipDataSource = "all",
634
+ unit,
635
+ valueFormatter,
636
+ withLegend = false,
637
+ withPolarGrid = false,
638
+ withTooltip = true,
639
+ chartProps,
640
+ containerProps,
642
641
  labelListProps = [],
642
+ legendProps,
643
643
  polarGridProps,
644
- strokeDasharray,
644
+ radialBarProps,
645
+ tooltipProps,
645
646
  ...rest
646
647
  } = (0, import_core9.omitThemeProps)(mergedProps);
647
648
  const {
648
- getRadialChartProps,
649
- getRadialBarProps,
650
649
  radialVars,
651
- setHighlightedArea
650
+ setHighlightedArea,
651
+ getRadialBarProps,
652
+ getRadialChartProps
652
653
  } = useRadialChart({
653
654
  data,
654
655
  dataKey,
655
- styles,
656
- chartProps,
657
- radialBarProps,
656
+ endAngle,
657
+ fillOpacity,
658
658
  innerRadius,
659
659
  outerRadius,
660
660
  startAngle,
661
- endAngle,
662
- fillOpacity
661
+ styles,
662
+ chartProps,
663
+ radialBarProps
663
664
  });
664
665
  const { getContainerProps } = useChart({ containerProps });
665
- const { tooltipProps: computedTooltipProps, getTooltipProps } = useChartTooltip({
666
- tooltipProps,
666
+ const { getTooltipProps, tooltipProps: computedTooltipProps } = useChartTooltip({
667
+ styles,
667
668
  tooltipAnimationDuration,
668
- styles
669
+ tooltipProps
669
670
  });
670
- const { legendProps: computedLegendProps, getLegendProps } = useChartLegend({
671
+ const { getLegendProps, legendProps: computedLegendProps } = useChartLegend({
671
672
  legendProps
672
673
  });
673
- const { getLabelLineProps } = useChartLabelList({ labelListProps, styles });
674
+ const { getLabelLineProps } = useChartLabelList({ styles, labelListProps });
674
675
  const { getPolarGridProps } = usePolarGrid({
675
- polarGridProps,
676
676
  strokeDasharray,
677
- styles
677
+ styles,
678
+ polarGridProps
678
679
  });
679
680
  const labelLists = (0, import_react7.useMemo)(
680
681
  () => labelListProps.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
681
682
  import_recharts.LabelList,
682
683
  {
683
684
  ...getLabelLineProps({
684
- index,
685
- className: "ui-radial-chart__label-list"
685
+ className: "ui-radial-chart__label-list",
686
+ index
686
687
  })
687
688
  },
688
689
  `labelList-${index}`
@@ -748,8 +749,8 @@ var RadialChart = (0, import_core9.forwardRef)((props, ref) => {
748
749
  className: "ui-radial-chart__tooltip",
749
750
  isRadialChart: tooltipDataSource === "segment" ? true : false,
750
751
  payload: tooltipDataSource === "segment" ? payload : data,
751
- valueFormatter,
752
752
  unit,
753
+ valueFormatter,
753
754
  ...computedTooltipProps
754
755
  }
755
756
  ),