@coinbase/cds-mobile-visualization 3.4.0-beta.1 → 3.4.0-beta.11

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 (187) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dts/chart/CartesianChart.d.ts +57 -33
  3. package/dts/chart/CartesianChart.d.ts.map +1 -1
  4. package/dts/chart/ChartContextBridge.d.ts +28 -0
  5. package/dts/chart/ChartContextBridge.d.ts.map +1 -0
  6. package/dts/chart/Path.d.ts +77 -34
  7. package/dts/chart/Path.d.ts.map +1 -1
  8. package/dts/chart/PeriodSelector.d.ts +2 -2
  9. package/dts/chart/PeriodSelector.d.ts.map +1 -1
  10. package/dts/chart/area/Area.d.ts +42 -27
  11. package/dts/chart/area/Area.d.ts.map +1 -1
  12. package/dts/chart/area/AreaChart.d.ts +51 -10
  13. package/dts/chart/area/AreaChart.d.ts.map +1 -1
  14. package/dts/chart/area/DottedArea.d.ts +21 -2
  15. package/dts/chart/area/DottedArea.d.ts.map +1 -1
  16. package/dts/chart/area/GradientArea.d.ts +19 -13
  17. package/dts/chart/area/GradientArea.d.ts.map +1 -1
  18. package/dts/chart/area/SolidArea.d.ts +17 -2
  19. package/dts/chart/area/SolidArea.d.ts.map +1 -1
  20. package/dts/chart/axis/Axis.d.ts +86 -118
  21. package/dts/chart/axis/Axis.d.ts.map +1 -1
  22. package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
  23. package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
  24. package/dts/chart/axis/XAxis.d.ts +1 -1
  25. package/dts/chart/axis/XAxis.d.ts.map +1 -1
  26. package/dts/chart/axis/YAxis.d.ts +2 -2
  27. package/dts/chart/axis/YAxis.d.ts.map +1 -1
  28. package/dts/chart/axis/index.d.ts +1 -0
  29. package/dts/chart/axis/index.d.ts.map +1 -1
  30. package/dts/chart/bar/Bar.d.ts +16 -13
  31. package/dts/chart/bar/Bar.d.ts.map +1 -1
  32. package/dts/chart/bar/BarChart.d.ts +36 -20
  33. package/dts/chart/bar/BarChart.d.ts.map +1 -1
  34. package/dts/chart/bar/BarPlot.d.ts +2 -1
  35. package/dts/chart/bar/BarPlot.d.ts.map +1 -1
  36. package/dts/chart/bar/BarStack.d.ts +39 -48
  37. package/dts/chart/bar/BarStack.d.ts.map +1 -1
  38. package/dts/chart/bar/BarStackGroup.d.ts +1 -0
  39. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
  40. package/dts/chart/bar/DefaultBar.d.ts +1 -1
  41. package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
  42. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
  43. package/dts/chart/gradient/Gradient.d.ts +25 -0
  44. package/dts/chart/gradient/Gradient.d.ts.map +1 -0
  45. package/dts/chart/gradient/index.d.ts +2 -0
  46. package/dts/chart/gradient/index.d.ts.map +1 -0
  47. package/dts/chart/index.d.ts +3 -1
  48. package/dts/chart/index.d.ts.map +1 -1
  49. package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
  50. package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
  51. package/dts/chart/line/DottedLine.d.ts +13 -5
  52. package/dts/chart/line/DottedLine.d.ts.map +1 -1
  53. package/dts/chart/line/Line.d.ts +64 -25
  54. package/dts/chart/line/Line.d.ts.map +1 -1
  55. package/dts/chart/line/LineChart.d.ts +43 -9
  56. package/dts/chart/line/LineChart.d.ts.map +1 -1
  57. package/dts/chart/line/ReferenceLine.d.ts +68 -20
  58. package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
  59. package/dts/chart/line/SolidLine.d.ts +8 -5
  60. package/dts/chart/line/SolidLine.d.ts.map +1 -1
  61. package/dts/chart/line/index.d.ts +1 -1
  62. package/dts/chart/line/index.d.ts.map +1 -1
  63. package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
  64. package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
  65. package/dts/chart/point/Point.d.ts +120 -0
  66. package/dts/chart/point/Point.d.ts.map +1 -0
  67. package/dts/chart/point/index.d.ts +3 -0
  68. package/dts/chart/point/index.d.ts.map +1 -0
  69. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +8 -0
  70. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
  71. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
  72. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
  73. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
  74. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
  75. package/dts/chart/scrubber/Scrubber.d.ts +172 -43
  76. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
  77. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
  78. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
  79. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -0
  80. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
  81. package/dts/chart/scrubber/ScrubberProvider.d.ts +6 -3
  82. package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -1
  83. package/dts/chart/scrubber/index.d.ts +3 -0
  84. package/dts/chart/scrubber/index.d.ts.map +1 -1
  85. package/dts/chart/text/ChartText.d.ts +151 -77
  86. package/dts/chart/text/ChartText.d.ts.map +1 -1
  87. package/dts/chart/text/{SmartChartTextGroup.d.ts → ChartTextGroup.d.ts} +9 -3
  88. package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
  89. package/dts/chart/text/index.d.ts +1 -1
  90. package/dts/chart/text/index.d.ts.map +1 -1
  91. package/dts/chart/utils/axis.d.ts +25 -1
  92. package/dts/chart/utils/axis.d.ts.map +1 -1
  93. package/dts/chart/utils/chart.d.ts +34 -7
  94. package/dts/chart/utils/chart.d.ts.map +1 -1
  95. package/dts/chart/utils/context.d.ts +28 -7
  96. package/dts/chart/utils/context.d.ts.map +1 -1
  97. package/dts/chart/utils/gradient.d.ts +117 -0
  98. package/dts/chart/utils/gradient.d.ts.map +1 -0
  99. package/dts/chart/utils/index.d.ts +3 -0
  100. package/dts/chart/utils/index.d.ts.map +1 -1
  101. package/dts/chart/utils/path.d.ts +53 -0
  102. package/dts/chart/utils/path.d.ts.map +1 -1
  103. package/dts/chart/utils/point.d.ts +71 -7
  104. package/dts/chart/utils/point.d.ts.map +1 -1
  105. package/dts/chart/utils/scale.d.ts +102 -0
  106. package/dts/chart/utils/scale.d.ts.map +1 -1
  107. package/dts/chart/utils/scrubber.d.ts +39 -0
  108. package/dts/chart/utils/scrubber.d.ts.map +1 -0
  109. package/dts/chart/utils/transition.d.ts +140 -0
  110. package/dts/chart/utils/transition.d.ts.map +1 -0
  111. package/esm/chart/CartesianChart.js +164 -70
  112. package/esm/chart/ChartContextBridge.js +148 -0
  113. package/esm/chart/Path.js +198 -113
  114. package/esm/chart/PeriodSelector.js +2 -2
  115. package/esm/chart/__stories__/CartesianChart.stories.js +378 -131
  116. package/esm/chart/__stories__/Chart.stories.js +2 -4
  117. package/esm/chart/__stories__/PeriodSelector.stories.js +103 -75
  118. package/esm/chart/area/Area.js +25 -35
  119. package/esm/chart/area/AreaChart.js +17 -12
  120. package/esm/chart/area/DottedArea.js +61 -109
  121. package/esm/chart/area/GradientArea.js +35 -91
  122. package/esm/chart/area/SolidArea.js +22 -8
  123. package/esm/chart/area/__stories__/AreaChart.stories.js +1 -1
  124. package/esm/chart/axis/Axis.js +5 -39
  125. package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
  126. package/esm/chart/axis/XAxis.js +148 -66
  127. package/esm/chart/axis/YAxis.js +149 -65
  128. package/esm/chart/axis/__stories__/Axis.stories.js +259 -1
  129. package/esm/chart/axis/index.js +1 -0
  130. package/esm/chart/bar/Bar.js +3 -1
  131. package/esm/chart/bar/BarChart.js +15 -37
  132. package/esm/chart/bar/BarPlot.js +41 -35
  133. package/esm/chart/bar/BarStack.js +75 -38
  134. package/esm/chart/bar/BarStackGroup.js +6 -16
  135. package/esm/chart/bar/DefaultBar.js +26 -48
  136. package/esm/chart/bar/DefaultBarStack.js +23 -58
  137. package/esm/chart/bar/__stories__/BarChart.stories.js +502 -77
  138. package/esm/chart/gradient/Gradient.js +53 -0
  139. package/esm/chart/gradient/index.js +1 -0
  140. package/esm/chart/index.js +3 -1
  141. package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
  142. package/esm/chart/line/DottedLine.js +29 -14
  143. package/esm/chart/line/Line.js +106 -67
  144. package/esm/chart/line/LineChart.js +20 -14
  145. package/esm/chart/line/ReferenceLine.js +80 -63
  146. package/esm/chart/line/SolidLine.js +25 -10
  147. package/esm/chart/line/__stories__/LineChart.stories.js +2101 -1977
  148. package/esm/chart/line/__stories__/ReferenceLine.stories.js +83 -28
  149. package/esm/chart/line/index.js +1 -1
  150. package/esm/chart/point/DefaultPointLabel.js +39 -0
  151. package/esm/chart/point/Point.js +188 -0
  152. package/esm/chart/point/index.js +2 -0
  153. package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
  154. package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
  155. package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
  156. package/esm/chart/scrubber/Scrubber.js +126 -146
  157. package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
  158. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
  159. package/esm/chart/scrubber/ScrubberProvider.js +46 -54
  160. package/esm/chart/scrubber/index.js +3 -1
  161. package/esm/chart/text/ChartText.js +242 -174
  162. package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +6 -5
  163. package/esm/chart/text/index.js +1 -1
  164. package/esm/chart/utils/axis.js +45 -29
  165. package/esm/chart/utils/chart.js +44 -3
  166. package/esm/chart/utils/gradient.js +305 -0
  167. package/esm/chart/utils/index.js +3 -0
  168. package/esm/chart/utils/path.js +76 -8
  169. package/esm/chart/utils/point.js +171 -17
  170. package/esm/chart/utils/scale.js +242 -2
  171. package/esm/chart/utils/scrubber.js +139 -0
  172. package/esm/chart/utils/transition.js +185 -0
  173. package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
  174. package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
  175. package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +51 -26
  176. package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
  177. package/package.json +15 -9
  178. package/dts/chart/Point.d.ts +0 -103
  179. package/dts/chart/Point.d.ts.map +0 -1
  180. package/dts/chart/line/GradientLine.d.ts +0 -45
  181. package/dts/chart/line/GradientLine.d.ts.map +0 -1
  182. package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -75
  183. package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
  184. package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
  185. package/esm/chart/Point.js +0 -111
  186. package/esm/chart/line/GradientLine.js +0 -62
  187. package/esm/chart/scrubber/ScrubberBeacon.js +0 -199
@@ -1,6 +1,18 @@
1
1
  import { type PathProps } from '../Path';
2
2
  import type { AreaComponentProps } from './Area';
3
- export type DottedAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> &
3
+ export type DottedAreaProps = Pick<
4
+ PathProps,
5
+ | 'initialPath'
6
+ | 'children'
7
+ | 'stroke'
8
+ | 'strokeOpacity'
9
+ | 'strokeWidth'
10
+ | 'strokeCap'
11
+ | 'strokeJoin'
12
+ | 'clipRect'
13
+ | 'clipPath'
14
+ | 'clipOffset'
15
+ > &
4
16
  AreaComponentProps & {
5
17
  /**
6
18
  * Size of the pattern unit (width and height).
@@ -14,14 +26,21 @@ export type DottedAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> &
14
26
  dotSize?: number;
15
27
  /**
16
28
  * Opacity at the peak values (top/bottom of gradient).
17
- * @default 0.3
29
+ * @note only used when no gradient is provided
30
+ * @default 1
18
31
  */
19
32
  peakOpacity?: number;
20
33
  /**
21
34
  * Opacity at the baseline (0 or edge closest to 0).
35
+ * @note only used when no gradient is provided
22
36
  * @default 0
23
37
  */
24
38
  baselineOpacity?: number;
25
39
  };
40
+ /**
41
+ * A customizable dotted area gradient component.
42
+ * When no gradient is provided, renders a default gradient based
43
+ * on the fill color and peak/baseline opacities.
44
+ */
26
45
  export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
27
46
  //# sourceMappingURL=DottedArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DottedArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/DottedArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,CAAC,GACzE,kBAAkB,GAAG;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ,eAAO,MAAM,UAAU,uDA+HtB,CAAC"}
1
+ {"version":3,"file":"DottedArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/DottedArea.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,GAAG;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAwEtB,CAAC"}
@@ -1,30 +1,36 @@
1
1
  import { type PathProps } from '../Path';
2
2
  import type { AreaComponentProps } from './Area';
3
- export type GradientAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> &
3
+ export type GradientAreaProps = Pick<
4
+ PathProps,
5
+ | 'initialPath'
6
+ | 'children'
7
+ | 'stroke'
8
+ | 'strokeOpacity'
9
+ | 'strokeWidth'
10
+ | 'strokeCap'
11
+ | 'strokeJoin'
12
+ | 'clipRect'
13
+ | 'clipPath'
14
+ | 'clipOffset'
15
+ > &
4
16
  AreaComponentProps & {
5
17
  /**
6
- * The color at peak values (top/bottom of gradient).
7
- * @default fill or theme.color.fgPrimary
8
- */
9
- peakColor?: string;
10
- /**
11
- * The color at the baseline (0 or edge closest to 0).
12
- * @default peakColor or fill
13
- */
14
- baselineColor?: string;
15
- /**
16
- * Opacity at peak values.
18
+ * Opacity at peak of gradient.
19
+ * @note only used when no gradient is provided
17
20
  * @default 0.3
18
21
  */
19
22
  peakOpacity?: number;
20
23
  /**
21
24
  * Opacity at the baseline.
25
+ * @note only used when no gradient is provided
22
26
  * @default 0
23
27
  */
24
28
  baselineOpacity?: number;
25
29
  };
26
30
  /**
27
- * A customizable gradient area component which uses Path.
31
+ * A customizable gradient area component.
32
+ * When no gradient is provided, renders a default gradient based
33
+ * on the fill color and peak/baseline opacities.
28
34
  */
29
35
  export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
30
36
  //# sourceMappingURL=GradientArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,CAAC,GAC3E,kBAAkB,GAAG;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,yDAwHxB,CAAC"}
1
+ {"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,SAAS,EACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,GAAG;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,YAAY,yDA6CxB,CAAC"}
@@ -1,8 +1,23 @@
1
1
  import { type PathProps } from '../Path';
2
2
  import type { AreaComponentProps } from './Area';
3
- export type SolidAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> & AreaComponentProps;
3
+ export type SolidAreaProps = Pick<
4
+ PathProps,
5
+ | 'initialPath'
6
+ | 'children'
7
+ | 'stroke'
8
+ | 'strokeOpacity'
9
+ | 'strokeWidth'
10
+ | 'strokeCap'
11
+ | 'strokeJoin'
12
+ | 'clipRect'
13
+ | 'clipPath'
14
+ | 'clipOffset'
15
+ > &
16
+ AreaComponentProps;
4
17
  /**
5
- * A customizable solid area component which uses Path.
18
+ * A customizable solid area component.
19
+ * When a gradient is provided, renders with gradient fill.
20
+ * Otherwise, renders with solid fill.
6
21
  */
7
22
  export declare const SolidArea: import('react').NamedExoticComponent<SolidAreaProps>;
8
23
  //# sourceMappingURL=SolidArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,CAAC,GAAG,kBAAkB,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,SAAS,sDAIrB,CAAC"}
1
+ {"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,SAAS,sDAiBrB,CAAC"}
@@ -1,54 +1,56 @@
1
1
  import type React from 'react';
2
2
  import { type LineComponent } from '../line';
3
- import type { ChartTextChildren } from '../text/ChartText';
3
+ import type { ChartTextChildren, ChartTextProps } from '../text/ChartText';
4
+ import { type AxisBandPlacement } from '../utils';
4
5
  /**
5
- * Animation variants for grouped axis tick labels - initial mount
6
+ * Animation transition for axis elements (grid lines, tick marks, tick labels).
7
+ * Matches web's axisUpdateAnimationTransition timing.
6
8
  */
7
- export declare const axisTickLabelsInitialAnimationVariants: {
8
- initial: {
9
- opacity: number;
10
- };
11
- animate: {
12
- opacity: number;
13
- transition: {
14
- duration: number;
15
- delay: number;
16
- };
17
- };
18
- exit: {
19
- opacity: number;
20
- transition: {
21
- duration: number;
22
- };
23
- };
24
- };
25
- /**
26
- * Animation variants for axis elements - updates (used for both grid lines and tick labels)
27
- */
28
- export declare const axisUpdateAnimationVariants: {
29
- initial: {
30
- opacity: number;
31
- };
32
- animate: {
33
- opacity: number;
34
- transition: {
35
- duration: number;
36
- delay: number;
37
- };
38
- };
39
- exit: {
40
- opacity: number;
41
- transition: {
42
- duration: number;
43
- };
44
- };
9
+ export declare const axisUpdateAnimationTransition: {
10
+ duration: number;
45
11
  };
12
+ export type AxisTickLabelComponentProps = Pick<
13
+ ChartTextProps,
14
+ | 'x'
15
+ | 'y'
16
+ | 'children'
17
+ | 'dx'
18
+ | 'dy'
19
+ | 'font'
20
+ | 'fontFamilies'
21
+ | 'fontSize'
22
+ | 'fontWeight'
23
+ | 'fontStyle'
24
+ | 'color'
25
+ | 'horizontalAlignment'
26
+ | 'verticalAlignment'
27
+ | 'opacity'
28
+ >;
29
+ export type AxisTickLabelComponent = React.FC<AxisTickLabelComponentProps>;
46
30
  export type AxisBaseProps = {
47
31
  /**
48
- * Component to render the grid lines.
49
- * @default DottedLine
32
+ * Placement of grid lines relative to each band.
33
+ * Options: 'start', 'middle', 'end', 'edges'
34
+ * @note This property only applies to band scales.
35
+ * @default 'edges'
50
36
  */
51
- GridLineComponent?: LineComponent;
37
+ bandGridLinePlacement?: AxisBandPlacement;
38
+ /**
39
+ * Placement of tick marks relative to each band.
40
+ * Options: 'start', 'middle', 'end', 'edges'
41
+ * @note This property only applies to band scales.
42
+ * @default 'middle'
43
+ */
44
+ bandTickMarkPlacement?: AxisBandPlacement;
45
+ /**
46
+ * Label text to display for the axis.
47
+ */
48
+ label?: string;
49
+ /**
50
+ * Gap between the tick labels and the axis label.
51
+ * @default 4
52
+ */
53
+ labelGap?: number;
52
54
  /**
53
55
  * Minimum gap between tick labels.
54
56
  * Labels will be hidden if they are closer than this gap.
@@ -98,24 +100,6 @@ export type AxisBaseProps = {
98
100
  * ticks: (index) => index % 12 === 0
99
101
  */
100
102
  ticks?: number[] | ((value: number) => boolean);
101
- /**
102
- * Formatter function for axis tick values.
103
- * Tick values will be wrapped in ChartText component.
104
- *
105
- * @example
106
- * // Simple string formatting
107
- * tickLabelFormatter: (value) => `$${prices[value]}`
108
- *
109
- * @example
110
- * // ReactNode with conditional styling
111
- * tickLabelFormatter: (index) => {
112
- * if (index % 12 === 0) {
113
- * return <tspan style={{ fontWeight: 'bold' }}>${prices[index]}</tspan>;
114
- * }
115
- * return `$${prices[index]}`;
116
- * }
117
- */
118
- tickLabelFormatter?: (value: any) => ChartTextChildren;
119
103
  /**
120
104
  * Space between the axis tick mark and labels.
121
105
  * If tick marks are not shown, this is the gap between the axis and the chart.
@@ -143,62 +127,46 @@ export type AxisBaseProps = {
143
127
  };
144
128
  export type AxisProps = AxisBaseProps & {
145
129
  /**
146
- * Custom className for the axis.
147
- */
148
- className?: string;
149
- /**
150
- * Custom classNames for the axis.
151
- */
152
- classNames?: {
153
- /**
154
- * Custom className for the root element.
155
- */
156
- root?: string;
157
- /**
158
- * Custom className for the tick labels.
159
- */
160
- tickLabel?: string;
161
- /**
162
- * Custom className for the grid lines.
163
- */
164
- gridLine?: string;
165
- /**
166
- * Custom className for the axis line.
167
- */
168
- line?: string;
169
- /**
170
- * Custom className for the tick marks.
171
- */
172
- tickMark?: string;
173
- };
174
- /**
175
- * Custom style for the axis.
176
- */
177
- style?: React.CSSProperties;
178
- /**
179
- * Custom styles for the axis.
180
- */
181
- styles?: {
182
- /**
183
- * Custom style for the root element.
184
- */
185
- root?: React.CSSProperties;
186
- /**
187
- * Custom style for the tick labels.
188
- */
189
- tickLabel?: React.CSSProperties;
190
- /**
191
- * Custom style for the grid lines.
192
- */
193
- gridLine?: React.CSSProperties;
194
- /**
195
- * Custom style for the axis line.
196
- */
197
- line?: React.CSSProperties;
198
- /**
199
- * Custom style for the tick marks.
200
- */
201
- tickMark?: React.CSSProperties;
202
- };
130
+ * Component to render the grid lines.
131
+ * @default DottedLine
132
+ */
133
+ GridLineComponent?: LineComponent;
134
+ /**
135
+ * Component to render the axis line.
136
+ * @default SolidLine
137
+ */
138
+ LineComponent?: LineComponent;
139
+ /**
140
+ * Component to render the tick marks.
141
+ * @default SolidLine
142
+ */
143
+ TickMarkLineComponent?: LineComponent;
144
+ /**
145
+ * Formatter function for axis tick values.
146
+ * Tick values will be wrapped in ChartText component.
147
+ *
148
+ * @example
149
+ * // XAxis
150
+ * tickLabelFormatter: (index) => {
151
+ * return `$${prices[index]}`;
152
+ * }
153
+ *
154
+ * @example
155
+ * // YAxis
156
+ * tickLabelFormatter: (value) => `$${prices[value]}`
157
+ */
158
+ tickLabelFormatter?: (value: number) => ChartTextChildren;
159
+ /**
160
+ * Component to render tick labels.
161
+ * Allows for custom styling and formatting that works cross-platform.
162
+ *
163
+ * @example
164
+ * // Custom tick label component with offset positioning
165
+ * TickLabelComponent={(props) => (
166
+ * <DefaultAxisTickLabel {...props} dx={4} dy={-12} />
167
+ * )}
168
+ * @default DefaultAxisTickLabel
169
+ */
170
+ TickLabelComponent?: AxisTickLabelComponent;
203
171
  };
204
172
  //# sourceMappingURL=Ax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AC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC;IACtC;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IAC1D;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { AxisTickLabelComponentProps } from './Axis';
2
+ export type DefaultAxisTickLabelProps = AxisTickLabelComponentProps;
3
+ /**
4
+ * DefaultAxisTickLabel is the default label component for axis tick labels.
5
+ * Provides standard styling for both X and Y axis tick labels.
6
+ */
7
+ export declare const DefaultAxisTickLabel: import('react').NamedExoticComponent<AxisTickLabelComponentProps>;
8
+ //# sourceMappingURL=DefaultAxisTickLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultAxisTickLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/DefaultAxisTickLabel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,mEAE/B,CAAC"}
@@ -7,7 +7,7 @@ export type XAxisBaseProps = AxisBaseProps & {
7
7
  position?: 'top' | 'bottom';
8
8
  /**
9
9
  * Height of the axis. This value is inclusive of the padding.
10
- * @default 32
10
+ * @default 32 when no label is provided, 52 when a label is provided
11
11
  */
12
12
  height?: number;
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/XAxis.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAI5D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDA+NjB,CAAC"}
1
+ {"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/XAxis.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDA8RjB,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AxisBaseProps, AxisProps } from './Axis';
1
+ import { type AxisBaseProps, type AxisProps } from './Axis';
2
2
  export type YAxisBaseProps = AxisBaseProps & {
3
3
  /**
4
4
  * The ID of the axis to render.
@@ -12,7 +12,7 @@ export type YAxisBaseProps = AxisBaseProps & {
12
12
  position?: 'left' | 'right';
13
13
  /**
14
14
  * Width of the axis. This value is inclusive of the padding.
15
- * @default 44
15
+ * @default 44 when no label is provided, 64 when a label is provided
16
16
  */
17
17
  width?: number;
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/YAxis.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAIvD,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDAoNjB,CAAC"}
1
+ {"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/YAxis.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDAuRjB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './Axis';
2
+ export * from './DefaultAxisTickLabel';
2
3
  export * from './XAxis';
3
4
  export * from './YAxis';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- export type BarComponentProps = {
2
+ import { type Transition } from '../utils';
3
+ export type BarBaseProps = {
3
4
  /**
4
5
  * X coordinate of the bar (left edge).
5
6
  */
@@ -17,7 +18,8 @@ export type BarComponentProps = {
17
18
  */
18
19
  height: number;
19
20
  /**
20
- * Border radius of the bar.
21
+ * Border radius for the bar.
22
+ * @default 4
21
23
  */
22
24
  borderRadius?: number;
23
25
  /**
@@ -40,10 +42,6 @@ export type BarComponentProps = {
40
42
  * The y-axis data value for this bar.
41
43
  */
42
44
  dataY?: number | [number, number] | null;
43
- /**
44
- * The path data for the bar shape.
45
- */
46
- d: string;
47
45
  /**
48
46
  * Fill color for the bar.
49
47
  */
@@ -60,19 +58,24 @@ export type BarComponentProps = {
60
58
  * Stroke width for the bar outline.
61
59
  */
62
60
  strokeWidth?: number;
61
+ /**
62
+ * Component to render the bar.
63
+ */
64
+ BarComponent?: BarComponent;
63
65
  };
64
- export type BarComponent = React.FC<BarComponentProps>;
65
- export type BarProps = Omit<BarComponentProps, 'd'> & {
66
+ export type BarProps = BarBaseProps & {
66
67
  /**
67
- * Border radius for the bar.
68
- * @default 4
68
+ * Transition configuration for bar animations.
69
69
  */
70
- borderRadius?: BarComponentProps['borderRadius'];
70
+ transition?: Transition;
71
+ };
72
+ export type BarComponentProps = Omit<BarProps, 'BarComponent'> & {
71
73
  /**
72
- * Component to render the bar.
74
+ * The path data for the bar shape.
73
75
  */
74
- BarComponent?: BarComponent;
76
+ d: string;
75
77
  };
78
+ export type BarComponent = React.FC<BarComponentProps>;
76
79
  /**
77
80
  * Simple bar component that renders a single bar at the specified position.
78
81
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAO7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,C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ACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACzC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG;IAC/D;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG,sCA0Df,CAAC"}
@@ -1,16 +1,9 @@
1
1
  import type { View } from 'react-native';
2
2
  import { type XAxisProps, type YAxisProps } from '../axis';
3
- import { type CartesianChartProps } from '../CartesianChart';
3
+ import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
4
4
  import { type AxisConfigProps, type Series } from '../utils';
5
- import { type BarProps } from './Bar';
6
5
  import { type BarPlotProps } from './BarPlot';
7
- /**
8
- * Series type specifically for bar charts - supports both single numbers and tuples,
9
- * and allows individual customization of Bar props per series.
10
- */
11
- export type BarSeries = Series &
12
- Partial<Pick<BarProps, 'BarComponent' | 'fill' | 'fillOpacity' | 'stroke' | 'strokeWidth'>>;
13
- export type BarChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'> &
6
+ export type BarChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
14
7
  Pick<
15
8
  BarPlotProps,
16
9
  | 'barPadding'
@@ -24,17 +17,17 @@ export type BarChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'serie
24
17
  | 'stackGap'
25
18
  | 'barMinSize'
26
19
  | 'stackMinSize'
20
+ | 'transition'
27
21
  > & {
28
22
  /**
29
23
  * Configuration objects that define how to visualize the data.
30
- * Each series supports Bar component props for individual customization.
31
24
  */
32
- series?: Array<BarSeries>;
25
+ series?: Array<Series>;
33
26
  /**
34
27
  * Whether to stack the areas on top of each other.
35
28
  * When true, each series builds cumulative values on top of the previous series.
36
29
  *
37
- * **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
30
+ * @note only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
38
31
  * Series with start & end value tuples (e.g., `[[0, 10], [5, 20]]`) will be skipped during stacking
39
32
  * and rendered as-is.
40
33
  */
@@ -47,18 +40,31 @@ export type BarChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'serie
47
40
  * Whether to show the Y axis.
48
41
  */
49
42
  showYAxis?: boolean;
43
+ /**
44
+ * Configuration for x-axis.
45
+ * Accepts axis config and axis props.
46
+ * To show the axis, set `showXAxis` to true.
47
+ */
50
48
  xAxis?: Partial<AxisConfigProps> & XAxisProps;
49
+ /**
50
+ * Configuration for y-axis.
51
+ * Accepts axis config and axis props.
52
+ * To show the axis, set `showYAxis` to true.
53
+ */
51
54
  yAxis?: Partial<AxisConfigProps> & YAxisProps;
52
55
  };
56
+ export type BarChartProps = BarChartBaseProps &
57
+ Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
53
58
  export declare const BarChart: import('react').MemoExoticComponent<
54
59
  import('react').ForwardRefExoticComponent<
55
- Omit<CartesianChartProps, 'series' | 'xAxis' | 'yAxis'> &
60
+ Omit<CartesianChartBaseProps, 'series' | 'xAxis' | 'yAxis'> &
56
61
  Pick<
57
62
  BarPlotProps,
58
- | 'fillOpacity'
59
- | 'stroke'
60
- | 'strokeWidth'
61
63
  | 'borderRadius'
64
+ | 'strokeWidth'
65
+ | 'stroke'
66
+ | 'transition'
67
+ | 'fillOpacity'
62
68
  | 'BarComponent'
63
69
  | 'BarStackComponent'
64
70
  | 'roundBaseline'
@@ -69,14 +75,13 @@ export declare const BarChart: import('react').MemoExoticComponent<
69
75
  > & {
70
76
  /**
71
77
  * Configuration objects that define how to visualize the data.
72
- * Each series supports Bar component props for individual customization.
73
78
  */
74
- series?: Array<BarSeries>;
79
+ series?: Array<Series>;
75
80
  /**
76
81
  * Whether to stack the areas on top of each other.
77
82
  * When true, each series builds cumulative values on top of the previous series.
78
83
  *
79
- * **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
84
+ * @note only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
80
85
  * Series with start & end value tuples (e.g., `[[0, 10], [5, 20]]`) will be skipped during stacking
81
86
  * and rendered as-is.
82
87
  */
@@ -89,9 +94,20 @@ export declare const BarChart: import('react').MemoExoticComponent<
89
94
  * Whether to show the Y axis.
90
95
  */
91
96
  showYAxis?: boolean;
97
+ /**
98
+ * Configuration for x-axis.
99
+ * Accepts axis config and axis props.
100
+ * To show the axis, set `showXAxis` to true.
101
+ */
92
102
  xAxis?: Partial<AxisConfigProps> & XAxisProps;
103
+ /**
104
+ * Configuration for y-axis.
105
+ * Accepts axis config and axis props.
106
+ * To show the axis, set `showYAxis` to true.
107
+ */
93
108
  yAxis?: Partial<AxisConfigProps> & YAxisProps;
94
- } & import('react').RefAttributes<View>
109
+ } & Omit<CartesianChartProps, 'series' | 'xAxis' | 'yAxis'> &
110
+ import('react').RefAttributes<View>
95
111
  >
96
112
  >;
97
113
  //# sourceMappingURL=BarChart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarChart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAS,KAAK,UAAU,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EACL,KAAK,eAAe,EAIpB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAC5B,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC;AAE9F,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,GACjF,IAAI,CACF,YAAY,EACV,YAAY,GACZ,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,CACjB,GAAG;IACF;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC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AAY,CACf,GAAG;IACF;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;CAC/C,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;AAE1D,eAAO,MAAM,QAAQ;IAtCjB;;OAEG;aACM,KAAK,CAAC,MAAM,CAAC;IACtB;;;;;;;OAOG;cACO,OAAO;IACjB;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;IAC7C;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;mGAgIhD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { BarStackGroupProps } from './BarStackGroup';
2
- export type BarPlotProps = Pick<
2
+ export type BarPlotBaseProps = Pick<
3
3
  BarStackGroupProps,
4
4
  | 'barPadding'
5
5
  | 'BarComponent'
@@ -19,6 +19,7 @@ export type BarPlotProps = Pick<
19
19
  */
20
20
  seriesIds?: string[];
21
21
  };
22
+ export type BarPlotProps = BarPlotBaseProps & Pick<BarStackGroupProps, 'transition'>;
22
23
  /**
23
24
  * BarPlot component that handles multiple series with proper stacking coordination.
24
25
  * Groups series by stack ID + y-axis ID combination and renders BarStackGroup for each group.