@yamada-ui/charts 1.5.4-next-20241005220055 → 1.5.4-next-20241008193728

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 (225) hide show
  1. package/dist/area-chart-gradient.d.mts +2 -2
  2. package/dist/area-chart-gradient.d.ts +2 -2
  3. package/dist/area-chart-gradient.js +7 -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 +2 -2
  7. package/dist/area-chart-split.d.ts +2 -2
  8. package/dist/area-chart-split.js +4 -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 +190 -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 +143 -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 +4 -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 +9 -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-UANITMH7.mjs → chunk-5VLSGWQD.mjs} +10 -8
  37. package/dist/chunk-5VLSGWQD.mjs.map +1 -0
  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-EXBYAVSP.mjs → chunk-NMPNNSBN.mjs} +76 -74
  51. package/dist/chunk-NMPNNSBN.mjs.map +1 -0
  52. package/dist/{chunk-AL4MDJ4U.mjs → chunk-NQPC5LPY.mjs} +84 -82
  53. package/dist/chunk-NQPC5LPY.mjs.map +1 -0
  54. package/dist/{chunk-MN7T76SY.mjs → chunk-OG5CVPPV.mjs} +5 -3
  55. package/dist/chunk-OG5CVPPV.mjs.map +1 -0
  56. package/dist/{chunk-LLOU2WIV.mjs → chunk-OUIKA4AX.mjs} +5 -3
  57. package/dist/chunk-OUIKA4AX.mjs.map +1 -0
  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-LSCPL7PM.mjs → chunk-SCY5V45W.mjs} +58 -56
  65. package/dist/chunk-SCY5V45W.mjs.map +1 -0
  66. package/dist/{chunk-VGNCWS23.mjs → chunk-SYBJTMPL.mjs} +92 -90
  67. package/dist/chunk-SYBJTMPL.mjs.map +1 -0
  68. package/dist/{chunk-ZGXEF3LO.mjs → chunk-TA7YJAW4.mjs} +49 -47
  69. package/dist/chunk-TA7YJAW4.mjs.map +1 -0
  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-NHHJ5XFF.mjs → chunk-U325CYNR.mjs} +8 -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-ZXBE4ERW.mjs → chunk-YTUEG4IY.mjs} +47 -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-BQT5TIKZ.mjs → chunk-ZRV4LO67.mjs} +44 -42
  91. package/dist/chunk-ZRV4LO67.mjs.map +1 -0
  92. package/dist/donut-chart.js +97 -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 +2084 -2036
  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 +146 -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 +95 -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 +87 -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 +69 -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-6O5G3WYP.mjs.map +0 -1
  203. package/dist/chunk-A3IWA366.mjs.map +0 -1
  204. package/dist/chunk-AL4MDJ4U.mjs.map +0 -1
  205. package/dist/chunk-BQT5TIKZ.mjs.map +0 -1
  206. package/dist/chunk-C3ZYUDXE.mjs.map +0 -1
  207. package/dist/chunk-EXBYAVSP.mjs.map +0 -1
  208. package/dist/chunk-FYAC4RRZ.mjs.map +0 -1
  209. package/dist/chunk-LLOU2WIV.mjs.map +0 -1
  210. package/dist/chunk-LSCPL7PM.mjs.map +0 -1
  211. package/dist/chunk-MN7T76SY.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-NHHJ5XFF.mjs.map +0 -1
  215. package/dist/chunk-O3LMKYXK.mjs.map +0 -1
  216. package/dist/chunk-OJ2MLZZ7.mjs.map +0 -1
  217. package/dist/chunk-OPPMMNGP.mjs.map +0 -1
  218. package/dist/chunk-UANITMH7.mjs.map +0 -1
  219. package/dist/chunk-VEFEKDMH.mjs.map +0 -1
  220. package/dist/chunk-VGNCWS23.mjs.map +0 -1
  221. package/dist/chunk-VKBRU4Z4.mjs.map +0 -1
  222. package/dist/chunk-VUTCH2CU.mjs.map +0 -1
  223. package/dist/chunk-XYUYAHJX.mjs.map +0 -1
  224. package/dist/chunk-ZGXEF3LO.mjs.map +0 -1
  225. package/dist/chunk-ZXBE4ERW.mjs.map +0 -1
@@ -312,13 +312,13 @@ var useChart = ({ containerProps = {} }) => {
312
312
  getContainerProps
313
313
  };
314
314
  };
315
- var useLegend = ({} = {}) => {
315
+ var useLegend = () => {
316
316
  const { styles } = useChartContext();
317
317
  return {
318
318
  styles
319
319
  };
320
320
  };
321
- var useTooltip = ({} = {}) => {
321
+ var useTooltip = () => {
322
322
  const { styles } = useChartContext();
323
323
  return {
324
324
  styles
@@ -330,7 +330,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
330
330
  var ChartLegend = (0, import_core3.forwardRef)(
331
331
  ({ className, payload = [], onHighlight, ...rest }, ref) => {
332
332
  const { styles } = useLegend();
333
- const items = payload.map(({ dataKey, value: valueProp, color }, index) => {
333
+ const items = payload.map(({ color, dataKey, value: valueProp }, index) => {
334
334
  const value = dataKey != null ? dataKey : valueProp;
335
335
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
336
336
  import_core3.ui.div,
@@ -366,6 +366,8 @@ var ChartLegend = (0, import_core3.forwardRef)(
366
366
  );
367
367
  }
368
368
  );
369
+ ChartLegend.displayName = "ChartLegend";
370
+ ChartLegend.__ui__ = "ChartLegend";
369
371
 
370
372
  // src/chart-tooltip.tsx
371
373
  var import_core4 = require("@yamada-ui/core");
@@ -373,22 +375,22 @@ var import_utils4 = require("@yamada-ui/utils");
373
375
  var import_jsx_runtime2 = require("react/jsx-runtime");
374
376
  var ChartTooltip = (0, import_core4.forwardRef)(
375
377
  ({
376
- label,
377
- dataKey = "value",
378
378
  className,
379
- payload = [],
380
- valueFormatter,
379
+ dataKey = "value",
380
+ isRadialChart,
381
+ label,
381
382
  labelFormatter,
383
+ payload = [],
382
384
  unit,
383
- isRadialChart,
385
+ valueFormatter,
384
386
  ...rest
385
387
  }, ref) => {
386
388
  var _a;
387
389
  const { styles } = useTooltip();
388
390
  const items = payload.map(
389
391
  ({
390
- color: colorProp,
391
392
  name: nameProp,
393
+ color: colorProp,
392
394
  [dataKey]: valueProp,
393
395
  payload: payload2
394
396
  } = {}, index) => {
@@ -458,25 +460,27 @@ var ChartTooltip = (0, import_core4.forwardRef)(
458
460
  );
459
461
  }
460
462
  );
463
+ ChartTooltip.displayName = "ChartTooltip";
464
+ ChartTooltip.__ui__ = "ChartTooltip";
461
465
 
462
466
  // src/use-chart-axis.ts
463
467
  var import_core5 = require("@yamada-ui/core");
464
468
  var import_utils5 = require("@yamada-ui/utils");
465
469
  var import_react2 = require("react");
466
470
  var useChartAxis = ({
467
- dataKey,
468
471
  type,
472
+ dataKey,
473
+ gridAxis = "x",
469
474
  layoutType = "horizontal",
475
+ styles,
470
476
  tickLine = "y",
471
- gridAxis = "x",
477
+ unit,
472
478
  withXAxis = true,
473
479
  withYAxis = true,
474
480
  xAxisLabel: xAxisLabelProp,
481
+ xAxisTickFormatter = type === "percent" && layoutType === "vertical" ? valueToPercent : void 0,
475
482
  yAxisLabel: yAxisLabelProp,
476
- unit,
477
483
  yAxisTickFormatter = type === "percent" && layoutType === "horizontal" ? valueToPercent : void 0,
478
- xAxisTickFormatter = type === "percent" && layoutType === "vertical" ? valueToPercent : void 0,
479
- styles,
480
484
  ...rest
481
485
  }) => {
482
486
  var _a, _b, _c, _d;
@@ -486,7 +490,7 @@ var useChartAxis = ({
486
490
  [dataKey, layoutType]
487
491
  );
488
492
  const yAxisKey = (0, import_react2.useMemo)(
489
- () => layoutType === "vertical" ? { dataKey, type: "category" } : { type: "number" },
493
+ () => layoutType === "vertical" ? { type: "category", dataKey } : { type: "number" },
490
494
  [dataKey, layoutType]
491
495
  );
492
496
  const withXTickLine = gridAxis !== "none" && (tickLine === "x" || tickLine === "xy");
@@ -517,15 +521,15 @@ var useChartAxis = ({
517
521
  className: (0, import_utils5.cx)(className, xAxisClassName),
518
522
  hide: !withXAxis,
519
523
  ...xAxisKey,
520
- tick: {
521
- transform: "translate(0, 10)",
522
- fill: "currentColor"
523
- },
524
- stroke: "",
525
524
  interval: "preserveStartEnd",
526
- tickLine: xTickLine,
527
525
  minTickGap: 5,
526
+ stroke: "",
527
+ tick: {
528
+ fill: "currentColor",
529
+ transform: "translate(0, 10)"
530
+ },
528
531
  tickFormatter: xAxisTickFormatter,
532
+ tickLine: xTickLine,
529
533
  ...props,
530
534
  ...xAxisProps
531
535
  }),
@@ -541,17 +545,17 @@ var useChartAxis = ({
541
545
  const getYAxisProps = (0, import_react2.useCallback)(
542
546
  ({ className, ...props } = {}) => ({
543
547
  className: (0, import_utils5.cx)(className, yAxisClassName),
544
- hide: !withYAxis,
545
548
  axisLine: false,
549
+ hide: !withYAxis,
546
550
  ...yAxisKey,
547
- tickLine: yTickLine,
551
+ allowDecimals: true,
548
552
  tick: {
549
- transform: "translate(-10, 0)",
550
- fill: "currentColor"
553
+ fill: "currentColor",
554
+ transform: "translate(-10, 0)"
551
555
  },
552
- allowDecimals: true,
553
- unit,
554
556
  tickFormatter: yAxisTickFormatter,
557
+ tickLine: yTickLine,
558
+ unit,
555
559
  ...props,
556
560
  ...yAxisProps
557
561
  }),
@@ -568,9 +572,9 @@ var useChartAxis = ({
568
572
  const getXAxisLabelProps = (0, import_react2.useCallback)(
569
573
  ({ className, ...props } = {}) => ({
570
574
  className: (0, import_utils5.cx)(className, xAxisLabelClassName),
571
- value: xAxisLabel,
572
- position: "insideBottom",
573
575
  offset: -20,
576
+ position: "insideBottom",
577
+ value: xAxisLabel,
574
578
  ...props,
575
579
  ...xAxisLabelProps
576
580
  }),
@@ -579,21 +583,21 @@ var useChartAxis = ({
579
583
  const getYAxisLabelProps = (0, import_react2.useCallback)(
580
584
  ({ className, ...props } = {}) => ({
581
585
  className: (0, import_utils5.cx)(className, yAxisLabelClassName),
582
- value: yAxisLabel,
583
- position: "insideLeft",
584
586
  angle: -90,
585
- textAnchor: "middle",
586
587
  offset: -5,
588
+ position: "insideLeft",
589
+ textAnchor: "middle",
590
+ value: yAxisLabel,
587
591
  ...props,
588
592
  ...yAxisLabelProps
589
593
  }),
590
594
  [yAxisLabel, yAxisLabelClassName, yAxisLabelProps]
591
595
  );
592
596
  return {
593
- getXAxisProps,
594
- getYAxisProps,
595
597
  getXAxisLabelProps,
596
- getYAxisLabelProps
598
+ getXAxisProps,
599
+ getYAxisLabelProps,
600
+ getYAxisProps
597
601
  };
598
602
  };
599
603
  var valueToPercent = (value) => {
@@ -605,10 +609,10 @@ var import_core6 = require("@yamada-ui/core");
605
609
  var import_utils6 = require("@yamada-ui/utils");
606
610
  var import_react3 = require("react");
607
611
  var useChartGrid = ({
608
- gridProps = {},
609
612
  gridAxis = "x",
610
613
  strokeDasharray = "5 5",
611
- styles
614
+ styles,
615
+ gridProps = {}
612
616
  }) => {
613
617
  const { theme } = (0, import_core6.useTheme)();
614
618
  const [reChartsProps, propClassName] = getComponentProps(
@@ -619,9 +623,9 @@ var useChartGrid = ({
619
623
  ({ className, ...props } = {}, ref = null) => ({
620
624
  ref,
621
625
  className: (0, import_utils6.cx)("ui-chart__grid", className, propClassName),
626
+ horizontal: gridAxis === "x" || gridAxis === "xy",
622
627
  strokeDasharray,
623
628
  vertical: gridAxis === "y" || gridAxis === "xy",
624
- horizontal: gridAxis === "x" || gridAxis === "xy",
625
629
  ...props,
626
630
  ...reChartsProps
627
631
  }),
@@ -651,7 +655,7 @@ var useChartLegend = ({
651
655
  },
652
656
  [rest]
653
657
  );
654
- return { legendProps, getLegendProps };
658
+ return { getLegendProps, legendProps };
655
659
  };
656
660
 
657
661
  // src/use-chart-reference-line.ts
@@ -659,8 +663,8 @@ var import_core7 = require("@yamada-ui/core");
659
663
  var import_utils8 = require("@yamada-ui/utils");
660
664
  var import_react5 = require("react");
661
665
  var useChartReferenceLine = ({
662
- referenceLineProps = [],
663
- styles
666
+ styles,
667
+ referenceLineProps = []
664
668
  }) => {
665
669
  const { theme } = (0, import_core7.useTheme)();
666
670
  const styleClassName = (0, import_core7.getCSS)(styles.referenceLine)(theme);
@@ -672,23 +676,24 @@ var useChartReferenceLine = ({
672
676
  )(theme);
673
677
  const color = (0, import_core7.getVar)(`reference-line-${index}`)(theme);
674
678
  const label = {
675
- value: labelProp,
676
679
  fill: color,
677
680
  position: "insideBottomLeft",
681
+ value: labelProp,
678
682
  ...(0, import_utils8.isObject)(labelProp) ? labelProp : {}
679
683
  };
680
- return { propClassName, color, label, ...rest };
684
+ return { color, label, propClassName, ...rest };
681
685
  }),
682
686
  [referenceLineProps, styleClassName, theme]
683
687
  );
684
688
  const getReferenceLineProps = (0, import_react5.useCallback)(
685
- ({ index, className, ...props }, ref = null) => {
686
- const { propClassName, color, label, ...rest } = propList[index];
689
+ ({ className, index, ...props }, ref = null) => {
690
+ var _a;
691
+ const { color, label, propClassName, ...rest } = (_a = propList[index]) != null ? _a : {};
687
692
  return {
688
693
  ref,
689
694
  className: (0, import_utils8.cx)(className, propClassName),
690
- stroke: color,
691
695
  label,
696
+ stroke: color,
692
697
  ...props,
693
698
  ...rest
694
699
  };
@@ -703,9 +708,9 @@ var import_core8 = require("@yamada-ui/core");
703
708
  var import_utils9 = require("@yamada-ui/utils");
704
709
  var import_react6 = require("react");
705
710
  var useChartTooltip = ({
706
- tooltipProps: _tooltipProps = {},
711
+ styles,
707
712
  tooltipAnimationDuration = 0,
708
- styles
713
+ tooltipProps: _tooltipProps = {}
709
714
  }) => {
710
715
  const { theme } = (0, import_core8.useTheme)();
711
716
  const { cursor, ...rest } = _tooltipProps;
@@ -721,16 +726,16 @@ var useChartTooltip = ({
721
726
  (props, ref = null) => ({
722
727
  ref,
723
728
  animationDuration: tooltipAnimationDuration,
724
- isAnimationActive: (tooltipAnimationDuration || 0) > 0,
725
729
  cursor: {
726
730
  className: (0, import_utils9.cx)("ui-chart__cursor", cursorClassName)
727
731
  },
732
+ isAnimationActive: (tooltipAnimationDuration || 0) > 0,
728
733
  ...props,
729
734
  ...tooltipProps
730
735
  }),
731
736
  [cursorClassName, tooltipAnimationDuration, tooltipProps]
732
737
  );
733
- return { tooltipProps: tooltipUIProps, getTooltipProps };
738
+ return { getTooltipProps, tooltipProps: tooltipUIProps };
734
739
  };
735
740
 
736
741
  // src/use-line-chart.ts
@@ -738,20 +743,20 @@ var import_core9 = require("@yamada-ui/core");
738
743
  var import_utils10 = require("@yamada-ui/utils");
739
744
  var import_react7 = require("react");
740
745
  var useLineChart = ({
746
+ connectNulls = true,
747
+ curveType = "monotone",
741
748
  data,
742
- series,
749
+ fillOpacity = 1,
743
750
  layoutType = "horizontal",
744
- withDots = true,
745
- withActiveDots = true,
746
- curveType = "monotone",
751
+ series,
747
752
  strokeWidth = 2,
748
- connectNulls = true,
749
- referenceLineProps,
750
- fillOpacity = 1,
753
+ styles,
751
754
  syncId,
755
+ withActiveDots = true,
756
+ withDots = true,
752
757
  xAxisLabel,
753
758
  yAxisLabel,
754
- styles,
759
+ referenceLineProps,
755
760
  ...rest
756
761
  }) => {
757
762
  var _a;
@@ -759,10 +764,10 @@ var useLineChart = ({
759
764
  const [highlightedArea, setHighlightedArea] = (0, import_react7.useState)(null);
760
765
  const shouldHighlight = highlightedArea !== null;
761
766
  const {
762
- dot = {},
763
767
  activeDot = {},
764
768
  dimDot,
765
769
  dimLine,
770
+ dot = {},
766
771
  ...computedLineProps
767
772
  } = (_a = rest.lineProps) != null ? _a : {};
768
773
  const lineColors = (0, import_react7.useMemo)(
@@ -843,11 +848,11 @@ var useLineChart = ({
843
848
  const linePropList = (0, import_react7.useMemo)(
844
849
  () => series.map((props, index) => {
845
850
  const {
846
- dataKey,
847
- dot: dot2 = {},
848
851
  activeDot: activeDot2 = {},
852
+ dataKey,
849
853
  dimDot: dimDot2 = {},
850
854
  dimLine: dimLine2 = {},
855
+ dot: dot2 = {},
851
856
  ...computedProps
852
857
  } = props;
853
858
  const color = (0, import_core9.getVar)(`line-${index}`)(theme);
@@ -873,8 +878,8 @@ var useLineChart = ({
873
878
  resolvedActiveDot = {
874
879
  className: (0, import_utils10.cx)("ui-line-chart__active-dot", className),
875
880
  fill: color,
876
- stroke: color,
877
881
  r: 4,
882
+ stroke: color,
878
883
  ...rest3
879
884
  };
880
885
  } else {
@@ -903,9 +908,9 @@ var useLineChart = ({
903
908
  }
904
909
  return {
905
910
  ...rest2,
911
+ activeDot: resolvedActiveDot,
906
912
  color,
907
913
  dataKey,
908
- activeDot: resolvedActiveDot,
909
914
  dot: resolvedDot
910
915
  };
911
916
  }),
@@ -934,12 +939,12 @@ var useLineChart = ({
934
939
  className: (0, import_utils10.cx)(className, lineChartClassName),
935
940
  data,
936
941
  layout: layoutType,
937
- syncId,
938
942
  margin: {
939
943
  bottom: xAxisLabel ? 30 : void 0,
940
944
  left: yAxisLabel ? 10 : void 0,
941
945
  right: yAxisLabel ? 5 : void 0
942
946
  },
947
+ syncId,
943
948
  ...props,
944
949
  ...chartProps
945
950
  }),
@@ -954,20 +959,21 @@ var useLineChart = ({
954
959
  ]
955
960
  );
956
961
  const getLineProps = (0, import_react7.useCallback)(
957
- ({ index, className: classNameProp, ...props }) => {
958
- const { color, className, dataKey, activeDot: activeDot2, dot: dot2, ...rest2 } = linePropList[index];
962
+ ({ className: classNameProp, index, ...props }) => {
963
+ var _a2;
964
+ const { className, activeDot: activeDot2, color, dataKey, dot: dot2, ...rest2 } = (_a2 = linePropList[index]) != null ? _a2 : {};
959
965
  return {
966
+ type: curveType,
967
+ name: (0, import_utils10.runIfFunc)(dataKey, {}),
960
968
  className: (0, import_utils10.cx)(classNameProp, className),
961
969
  activeDot: activeDot2,
962
- dot: dot2,
963
- name: dataKey,
964
- type: curveType,
970
+ connectNulls,
965
971
  dataKey,
972
+ dot: dot2,
966
973
  fill: color,
967
- strokeWidth,
968
- stroke: color,
969
974
  isAnimationActive: false,
970
- connectNulls,
975
+ stroke: color,
976
+ strokeWidth,
971
977
  ...props,
972
978
  ...rest2
973
979
  };
@@ -975,10 +981,10 @@ var useLineChart = ({
975
981
  [connectNulls, curveType, linePropList, strokeWidth]
976
982
  );
977
983
  return {
978
- getLineProps,
979
- getLineChartProps,
980
984
  lineVars,
981
- setHighlightedArea
985
+ setHighlightedArea,
986
+ getLineChartProps,
987
+ getLineProps
982
988
  };
983
989
  };
984
990
 
@@ -987,113 +993,113 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
987
993
  var LineChart = (0, import_core10.forwardRef)((props, ref) => {
988
994
  const [styles, mergedProps] = (0, import_core10.useComponentMultiStyle)("LineChart", props);
989
995
  const {
996
+ type,
990
997
  className,
991
- containerProps,
992
- gridProps,
993
- gridAxis,
994
- strokeDasharray,
998
+ connectNulls,
999
+ curveType,
1000
+ data,
995
1001
  dataKey,
996
- type,
1002
+ fillOpacity,
1003
+ gridAxis,
1004
+ labelFormatter,
997
1005
  layoutType,
1006
+ series,
1007
+ strokeDasharray,
1008
+ strokeWidth,
1009
+ syncId,
998
1010
  tickLine,
1011
+ tooltipAnimationDuration,
1012
+ unit,
1013
+ valueFormatter,
1014
+ withActiveDots,
1015
+ withDots,
1016
+ withLegend = false,
1017
+ withTooltip = true,
999
1018
  withXAxis,
1000
1019
  withYAxis,
1001
- xAxisProps,
1002
- yAxisProps,
1003
1020
  xAxisLabel,
1021
+ xAxisTickFormatter,
1004
1022
  yAxisLabel,
1005
- xAxisLabelProps,
1006
- yAxisLabelProps,
1007
- unit,
1008
1023
  yAxisTickFormatter,
1009
- xAxisTickFormatter,
1010
- valueFormatter,
1011
- labelFormatter,
1012
- referenceLineProps,
1013
- tooltipProps,
1014
- tooltipAnimationDuration,
1015
- legendProps,
1016
- withLegend = false,
1017
- withTooltip = true,
1018
- series,
1019
- data,
1020
1024
  chartProps,
1025
+ containerProps,
1026
+ gridProps,
1027
+ legendProps,
1021
1028
  lineProps,
1022
- withDots,
1023
- withActiveDots,
1024
- curveType,
1025
- strokeWidth,
1026
- connectNulls,
1027
- fillOpacity,
1028
- syncId,
1029
+ referenceLineProps,
1030
+ tooltipProps,
1031
+ xAxisLabelProps,
1032
+ xAxisProps,
1033
+ yAxisLabelProps,
1034
+ yAxisProps,
1029
1035
  ...rest
1030
1036
  } = (0, import_core10.omitThemeProps)(mergedProps);
1031
- const { getLineProps, getLineChartProps, lineVars, setHighlightedArea } = useLineChart({
1037
+ const { lineVars, setHighlightedArea, getLineChartProps, getLineProps } = useLineChart({
1038
+ connectNulls,
1039
+ curveType,
1040
+ data,
1041
+ fillOpacity,
1032
1042
  layoutType,
1033
1043
  series,
1034
- referenceLineProps,
1035
- data,
1036
- chartProps,
1037
- lineProps,
1038
- withDots,
1039
- withActiveDots,
1040
- curveType,
1041
1044
  strokeWidth,
1042
- connectNulls,
1043
- fillOpacity,
1045
+ styles,
1044
1046
  syncId,
1047
+ withActiveDots,
1048
+ withDots,
1045
1049
  xAxisLabel,
1046
1050
  yAxisLabel,
1047
- styles
1051
+ chartProps,
1052
+ lineProps,
1053
+ referenceLineProps
1048
1054
  });
1049
1055
  const { getContainerProps } = useChart({ containerProps });
1050
1056
  const {
1051
- getXAxisProps,
1052
- getYAxisProps,
1053
1057
  getXAxisLabelProps,
1054
- getYAxisLabelProps
1058
+ getXAxisProps,
1059
+ getYAxisLabelProps,
1060
+ getYAxisProps
1055
1061
  } = useChartAxis({
1056
- dataKey,
1057
1062
  type,
1063
+ dataKey,
1064
+ gridAxis,
1058
1065
  layoutType,
1066
+ styles,
1059
1067
  tickLine,
1060
- gridAxis,
1068
+ unit,
1061
1069
  withXAxis,
1062
1070
  withYAxis,
1063
- xAxisProps,
1064
- yAxisProps,
1065
1071
  xAxisLabel,
1072
+ xAxisTickFormatter,
1066
1073
  yAxisLabel,
1074
+ yAxisTickFormatter,
1067
1075
  xAxisLabelProps,
1076
+ xAxisProps,
1068
1077
  yAxisLabelProps,
1069
- unit,
1070
- yAxisTickFormatter,
1071
- xAxisTickFormatter,
1072
- styles
1078
+ yAxisProps
1073
1079
  });
1074
1080
  const { getReferenceLineProps } = useChartReferenceLine({
1075
- referenceLineProps,
1076
- styles
1081
+ styles,
1082
+ referenceLineProps
1077
1083
  });
1078
1084
  const { getGridProps } = useChartGrid({
1079
- gridProps,
1080
1085
  gridAxis,
1081
1086
  strokeDasharray,
1082
- styles
1087
+ styles,
1088
+ gridProps
1083
1089
  });
1084
- const { tooltipProps: computedTooltipProps, getTooltipProps } = useChartTooltip({
1085
- tooltipProps,
1090
+ const { getTooltipProps, tooltipProps: computedTooltipProps } = useChartTooltip({
1091
+ styles,
1086
1092
  tooltipAnimationDuration,
1087
- styles
1093
+ tooltipProps
1088
1094
  });
1089
- const { legendProps: computedLegendProps, getLegendProps } = useChartLegend({
1095
+ const { getLegendProps, legendProps: computedLegendProps } = useChartLegend({
1090
1096
  legendProps
1091
1097
  });
1092
1098
  const lines = (0, import_react8.useMemo)(
1093
1099
  () => series.map(({ dataKey: dataKey2 }, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1094
1100
  import_recharts.Line,
1095
1101
  {
1096
- ...getLineProps({ index, className: "ui-line-chart__line" })
1102
+ ...getLineProps({ className: "ui-line-chart__line", index })
1097
1103
  },
1098
1104
  `line-${dataKey2}`
1099
1105
  )),
@@ -1104,8 +1110,8 @@ var LineChart = (0, import_core10.forwardRef)((props, ref) => {
1104
1110
  import_recharts.ReferenceLine,
1105
1111
  {
1106
1112
  ...getReferenceLineProps({
1107
- index,
1108
- className: "ui-line-chart__reference-line"
1113
+ className: "ui-line-chart__reference-line",
1114
+ index
1109
1115
  })
1110
1116
  },
1111
1117
  `referenceLine-${index}`
@@ -1173,10 +1179,10 @@ var LineChart = (0, import_core10.forwardRef)((props, ref) => {
1173
1179
  {
1174
1180
  className: "ui-line-chart__tooltip",
1175
1181
  label,
1176
- payload,
1177
- valueFormatter,
1178
1182
  labelFormatter,
1183
+ payload,
1179
1184
  unit,
1185
+ valueFormatter,
1180
1186
  ...computedTooltipProps
1181
1187
  }
1182
1188
  ),
@@ -1193,6 +1199,8 @@ var LineChart = (0, import_core10.forwardRef)((props, ref) => {
1193
1199
  }
1194
1200
  ) });
1195
1201
  });
1202
+ LineChart.displayName = "LineChart";
1203
+ LineChart.__ui__ = "LineChart";
1196
1204
  // Annotate the CommonJS export names for ESM import in node:
1197
1205
  0 && (module.exports = {
1198
1206
  LineChart