@coinbase/cds-mobile-visualization 3.3.0 → 3.4.0-beta.10

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 (265) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dts/chart/CartesianChart.d.ts +125 -0
  3. package/dts/chart/CartesianChart.d.ts.map +1 -0
  4. package/dts/chart/ChartContextBridge.d.ts +28 -0
  5. package/dts/chart/ChartContextBridge.d.ts.map +1 -0
  6. package/dts/chart/ChartProvider.d.ts +6 -0
  7. package/dts/chart/ChartProvider.d.ts.map +1 -0
  8. package/dts/chart/Path.d.ts +91 -0
  9. package/dts/chart/Path.d.ts.map +1 -0
  10. package/dts/chart/PeriodSelector.d.ts +85 -0
  11. package/dts/chart/PeriodSelector.d.ts.map +1 -0
  12. package/dts/chart/area/Area.d.ts +77 -0
  13. package/dts/chart/area/Area.d.ts.map +1 -0
  14. package/dts/chart/area/AreaChart.d.ts +131 -0
  15. package/dts/chart/area/AreaChart.d.ts.map +1 -0
  16. package/dts/chart/area/DottedArea.d.ts +46 -0
  17. package/dts/chart/area/DottedArea.d.ts.map +1 -0
  18. package/dts/chart/area/GradientArea.d.ts +36 -0
  19. package/dts/chart/area/GradientArea.d.ts.map +1 -0
  20. package/dts/chart/area/SolidArea.d.ts +23 -0
  21. package/dts/chart/area/SolidArea.d.ts.map +1 -0
  22. package/dts/chart/area/index.d.ts +6 -0
  23. package/dts/chart/area/index.d.ts.map +1 -0
  24. package/dts/chart/axis/Axis.d.ts +194 -0
  25. package/dts/chart/axis/Axis.d.ts.map +1 -0
  26. package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
  27. package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
  28. package/dts/chart/axis/XAxis.d.ts +16 -0
  29. package/dts/chart/axis/XAxis.d.ts.map +1 -0
  30. package/dts/chart/axis/YAxis.d.ts +21 -0
  31. package/dts/chart/axis/YAxis.d.ts.map +1 -0
  32. package/dts/chart/axis/index.d.ts +5 -0
  33. package/dts/chart/axis/index.d.ts.map +1 -0
  34. package/dts/chart/bar/Bar.d.ts +92 -0
  35. package/dts/chart/bar/Bar.d.ts.map +1 -0
  36. package/dts/chart/bar/BarChart.d.ts +113 -0
  37. package/dts/chart/bar/BarChart.d.ts.map +1 -0
  38. package/dts/chart/bar/BarPlot.d.ts +30 -0
  39. package/dts/chart/bar/BarPlot.d.ts.map +1 -0
  40. package/dts/chart/bar/BarStack.d.ts +102 -0
  41. package/dts/chart/bar/BarStack.d.ts.map +1 -0
  42. package/dts/chart/bar/BarStackGroup.d.ts +36 -0
  43. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -0
  44. package/dts/chart/bar/DefaultBar.d.ts +7 -0
  45. package/dts/chart/bar/DefaultBar.d.ts.map +1 -0
  46. package/dts/chart/bar/DefaultBarStack.d.ts +7 -0
  47. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -0
  48. package/dts/chart/bar/index.d.ts +8 -0
  49. package/dts/chart/bar/index.d.ts.map +1 -0
  50. package/dts/chart/gradient/Gradient.d.ts +25 -0
  51. package/dts/chart/gradient/Gradient.d.ts.map +1 -0
  52. package/dts/chart/gradient/index.d.ts +2 -0
  53. package/dts/chart/gradient/index.d.ts.map +1 -0
  54. package/dts/chart/index.d.ts +15 -0
  55. package/dts/chart/index.d.ts.map +1 -0
  56. package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
  57. package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
  58. package/dts/chart/line/DottedLine.d.ts +20 -0
  59. package/dts/chart/line/DottedLine.d.ts.map +1 -0
  60. package/dts/chart/line/Line.d.ts +115 -0
  61. package/dts/chart/line/Line.d.ts.map +1 -0
  62. package/dts/chart/line/LineChart.d.ts +118 -0
  63. package/dts/chart/line/LineChart.d.ts.map +1 -0
  64. package/dts/chart/line/ReferenceLine.d.ts +139 -0
  65. package/dts/chart/line/ReferenceLine.d.ts.map +1 -0
  66. package/dts/chart/line/SolidLine.d.ts +15 -0
  67. package/dts/chart/line/SolidLine.d.ts.map +1 -0
  68. package/dts/chart/line/index.d.ts +7 -0
  69. package/dts/chart/line/index.d.ts.map +1 -0
  70. package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
  71. package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
  72. package/dts/chart/point/Point.d.ts +120 -0
  73. package/dts/chart/point/Point.d.ts.map +1 -0
  74. package/dts/chart/point/index.d.ts +3 -0
  75. package/dts/chart/point/index.d.ts.map +1 -0
  76. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +8 -0
  77. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
  78. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
  79. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
  80. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
  81. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
  82. package/dts/chart/scrubber/Scrubber.d.ts +233 -0
  83. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -0
  84. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
  85. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
  86. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -0
  87. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
  88. package/dts/chart/scrubber/ScrubberProvider.d.ts +20 -0
  89. package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
  90. package/dts/chart/scrubber/index.d.ts +5 -0
  91. package/dts/chart/scrubber/index.d.ts.map +1 -0
  92. package/dts/chart/text/ChartText.d.ts +164 -0
  93. package/dts/chart/text/ChartText.d.ts.map +1 -0
  94. package/dts/chart/text/ChartTextGroup.d.ts +61 -0
  95. package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
  96. package/dts/chart/text/index.d.ts +3 -0
  97. package/dts/chart/text/index.d.ts.map +1 -0
  98. package/dts/chart/utils/axis.d.ts +342 -0
  99. package/dts/chart/utils/axis.d.ts.map +1 -0
  100. package/dts/chart/utils/bar.d.ts +20 -0
  101. package/dts/chart/utils/bar.d.ts.map +1 -0
  102. package/dts/chart/utils/chart.d.ts +124 -0
  103. package/dts/chart/utils/chart.d.ts.map +1 -0
  104. package/dts/chart/utils/context.d.ts +116 -0
  105. package/dts/chart/utils/context.d.ts.map +1 -0
  106. package/dts/chart/utils/gradient.d.ts +117 -0
  107. package/dts/chart/utils/gradient.d.ts.map +1 -0
  108. package/dts/chart/utils/index.d.ts +11 -0
  109. package/dts/chart/utils/index.d.ts.map +1 -0
  110. package/dts/chart/utils/path.d.ts +160 -0
  111. package/dts/chart/utils/path.d.ts.map +1 -0
  112. package/dts/chart/utils/point.d.ts +134 -0
  113. package/dts/chart/utils/point.d.ts.map +1 -0
  114. package/dts/chart/utils/scale.d.ts +134 -0
  115. package/dts/chart/utils/scale.d.ts.map +1 -0
  116. package/dts/chart/utils/scrubber.d.ts +39 -0
  117. package/dts/chart/utils/scrubber.d.ts.map +1 -0
  118. package/dts/chart/utils/transition.d.ts +140 -0
  119. package/dts/chart/utils/transition.d.ts.map +1 -0
  120. package/dts/index.d.ts +2 -1
  121. package/dts/index.d.ts.map +1 -1
  122. package/dts/sparkline/Counter.d.ts +7 -2
  123. package/dts/sparkline/Sparkline.d.ts +67 -16
  124. package/dts/sparkline/Sparkline.d.ts.map +1 -1
  125. package/dts/sparkline/SparklineArea.d.ts +10 -4
  126. package/dts/sparkline/SparklineArea.d.ts.map +1 -1
  127. package/dts/sparkline/SparklineAreaPattern.d.ts +12 -4
  128. package/dts/sparkline/SparklineAreaPattern.d.ts.map +1 -1
  129. package/dts/sparkline/SparklineGradient.d.ts +21 -10
  130. package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
  131. package/dts/sparkline/__figma__/Sparkline.figma.d.ts +1 -1
  132. package/dts/sparkline/generateSparklineWithId.d.ts +8 -2
  133. package/dts/sparkline/generateSparklineWithId.d.ts.map +1 -1
  134. package/dts/sparkline/index.d.ts +1 -1
  135. package/dts/sparkline/sparkline-interactive/SparklineAccessibleView.d.ts +8 -3
  136. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +132 -110
  137. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
  138. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +22 -9
  139. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -1
  140. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +18 -7
  141. package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +9 -4
  142. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +11 -6
  143. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMinMax.d.ts +7 -5
  144. package/dts/sparkline/sparkline-interactive/SparklineInteractivePanGestureHandler.d.ts +22 -10
  145. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +21 -7
  146. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -1
  147. package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +21 -16
  148. package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +29 -23
  149. package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +22 -14
  150. package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +1 -1
  151. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.d.ts +9 -5
  152. package/dts/sparkline/sparkline-interactive/useMinMaxTransform.d.ts +11 -6
  153. package/dts/sparkline/sparkline-interactive/useOpacityAnimation.d.ts +5 -2
  154. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +17 -17
  155. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveLineStyles.d.ts +16 -13
  156. package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +106 -98
  157. package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +1 -1
  158. package/dts/sparkline/sparkline-interactive-header/useSparklineInteractiveHeaderStyles.d.ts +22 -19
  159. package/esm/chart/CartesianChart.js +335 -0
  160. package/esm/chart/ChartContextBridge.js +148 -0
  161. package/esm/chart/ChartProvider.js +10 -0
  162. package/esm/chart/Path.js +218 -0
  163. package/esm/chart/PeriodSelector.js +136 -0
  164. package/esm/chart/__stories__/CartesianChart.stories.js +723 -0
  165. package/esm/chart/__stories__/Chart.stories.js +77 -0
  166. package/esm/chart/__stories__/PeriodSelector.stories.js +322 -0
  167. package/esm/chart/area/Area.js +75 -0
  168. package/esm/chart/area/AreaChart.js +151 -0
  169. package/esm/chart/area/DottedArea.js +80 -0
  170. package/esm/chart/area/GradientArea.js +54 -0
  171. package/esm/chart/area/SolidArea.js +38 -0
  172. package/esm/chart/area/__stories__/AreaChart.stories.js +100 -0
  173. package/esm/chart/area/index.js +7 -0
  174. package/esm/chart/axis/Axis.js +45 -0
  175. package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
  176. package/esm/chart/axis/XAxis.js +188 -0
  177. package/esm/chart/axis/YAxis.js +177 -0
  178. package/esm/chart/axis/__stories__/Axis.stories.js +276 -0
  179. package/esm/chart/axis/index.js +6 -0
  180. package/esm/chart/bar/Bar.js +69 -0
  181. package/esm/chart/bar/BarChart.js +125 -0
  182. package/esm/chart/bar/BarPlot.js +102 -0
  183. package/esm/chart/bar/BarStack.js +551 -0
  184. package/esm/chart/bar/BarStackGroup.js +79 -0
  185. package/esm/chart/bar/DefaultBar.js +56 -0
  186. package/esm/chart/bar/DefaultBarStack.js +47 -0
  187. package/esm/chart/bar/__stories__/BarChart.stories.js +668 -0
  188. package/esm/chart/bar/index.js +9 -0
  189. package/esm/chart/gradient/Gradient.js +53 -0
  190. package/esm/chart/gradient/index.js +1 -0
  191. package/esm/chart/index.js +16 -0
  192. package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
  193. package/esm/chart/line/DottedLine.js +50 -0
  194. package/esm/chart/line/Line.js +178 -0
  195. package/esm/chart/line/LineChart.js +121 -0
  196. package/esm/chart/line/ReferenceLine.js +132 -0
  197. package/esm/chart/line/SolidLine.js +46 -0
  198. package/esm/chart/line/__stories__/LineChart.stories.js +2372 -0
  199. package/esm/chart/line/__stories__/ReferenceLine.stories.js +132 -0
  200. package/esm/chart/line/index.js +8 -0
  201. package/esm/chart/point/DefaultPointLabel.js +39 -0
  202. package/esm/chart/point/Point.js +188 -0
  203. package/esm/chart/point/index.js +2 -0
  204. package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
  205. package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
  206. package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
  207. package/esm/chart/scrubber/Scrubber.js +166 -0
  208. package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
  209. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
  210. package/esm/chart/scrubber/ScrubberProvider.js +135 -0
  211. package/esm/chart/scrubber/index.js +4 -0
  212. package/esm/chart/text/ChartText.js +305 -0
  213. package/esm/chart/text/ChartTextGroup.js +211 -0
  214. package/esm/chart/text/index.js +4 -0
  215. package/esm/chart/utils/axis.js +592 -0
  216. package/esm/chart/utils/bar.js +24 -0
  217. package/esm/chart/utils/chart.js +270 -0
  218. package/esm/chart/utils/context.js +15 -0
  219. package/esm/chart/utils/gradient.js +305 -0
  220. package/esm/chart/utils/index.js +12 -0
  221. package/esm/chart/utils/path.js +274 -0
  222. package/esm/chart/utils/point.js +229 -0
  223. package/esm/chart/utils/scale.js +277 -0
  224. package/esm/chart/utils/scrubber.js +139 -0
  225. package/esm/chart/utils/transition.js +185 -0
  226. package/esm/index.js +4 -1
  227. package/esm/sparkline/Sparkline.js +129 -16
  228. package/esm/sparkline/SparklineArea.js +7 -2
  229. package/esm/sparkline/SparklineAreaPattern.js +4 -2
  230. package/esm/sparkline/SparklineGradient.js +4 -0
  231. package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
  232. package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
  233. package/esm/sparkline/generateSparklineWithId.js +3 -2
  234. package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +5 -1
  235. package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +5 -2
  236. package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +4 -0
  237. package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +76 -24
  238. package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
  239. package/package.json +17 -11
  240. package/dts/sparkline/__stories__/Sparkline.stories.d.ts +0 -3
  241. package/dts/sparkline/__stories__/Sparkline.stories.d.ts.map +0 -1
  242. package/dts/sparkline/__stories__/SparklineGradient.stories.d.ts +0 -3
  243. package/dts/sparkline/__stories__/SparklineGradient.stories.d.ts.map +0 -1
  244. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts +0 -3
  245. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts.map +0 -1
  246. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts +0 -2
  247. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts.map +0 -1
  248. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveHoverDate.test.d.ts +0 -2
  249. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveHoverDate.test.d.ts.map +0 -1
  250. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePanGestureHandler.test.d.ts +0 -2
  251. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePanGestureHandler.test.d.ts.map +0 -1
  252. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts +0 -2
  253. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts.map +0 -1
  254. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveTimeseriesPaths.test.d.ts +0 -2
  255. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveTimeseriesPaths.test.d.ts.map +0 -1
  256. package/dts/sparkline/sparkline-interactive/__tests__/useMinMaxTransform.test.d.ts +0 -2
  257. package/dts/sparkline/sparkline-interactive/__tests__/useMinMaxTransform.test.d.ts.map +0 -1
  258. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.test.disable.d.ts +0 -2
  259. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.test.disable.d.ts.map +0 -1
  260. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts +0 -4
  261. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts.map +0 -1
  262. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts +0 -2
  263. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts.map +0 -1
  264. package/dts/sparkline/sparkline-interactive-header/__tests__/useSparklineInteractiveHeaderStyles.test.d.ts +0 -2
  265. package/dts/sparkline/sparkline-interactive-header/__tests__/useSparklineInteractiveHeaderStyles.test.d.ts.map +0 -1
@@ -0,0 +1,46 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
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
+ > &
16
+ AreaComponentProps & {
17
+ /**
18
+ * Size of the pattern unit (width and height).
19
+ * @default 4
20
+ */
21
+ patternSize?: number;
22
+ /**
23
+ * Size of the dots within the pattern.
24
+ * @default 1
25
+ */
26
+ dotSize?: number;
27
+ /**
28
+ * Opacity at the peak values (top/bottom of gradient).
29
+ * @note only used when no gradient is provided
30
+ * @default 1
31
+ */
32
+ peakOpacity?: number;
33
+ /**
34
+ * Opacity at the baseline (0 or edge closest to 0).
35
+ * @note only used when no gradient is provided
36
+ * @default 0
37
+ */
38
+ baselineOpacity?: number;
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
+ */
45
+ export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
46
+ //# sourceMappingURL=DottedArea.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,36 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
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
+ > &
16
+ AreaComponentProps & {
17
+ /**
18
+ * Opacity at peak of gradient.
19
+ * @note only used when no gradient is provided
20
+ * @default 0.3
21
+ */
22
+ peakOpacity?: number;
23
+ /**
24
+ * Opacity at the baseline.
25
+ * @note only used when no gradient is provided
26
+ * @default 0
27
+ */
28
+ baselineOpacity?: number;
29
+ };
30
+ /**
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.
34
+ */
35
+ export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
36
+ //# sourceMappingURL=GradientArea.d.ts.map
@@ -0,0 +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;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"}
@@ -0,0 +1,23 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
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;
17
+ /**
18
+ * A customizable solid area component.
19
+ * When a gradient is provided, renders with gradient fill.
20
+ * Otherwise, renders with solid fill.
21
+ */
22
+ export declare const SolidArea: import('react').NamedExoticComponent<SolidAreaProps>;
23
+ //# sourceMappingURL=SolidArea.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ export * from './Area';
2
+ export * from './AreaChart';
3
+ export * from './DottedArea';
4
+ export * from './GradientArea';
5
+ export * from './SolidArea';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/area/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,194 @@
1
+ import type React from 'react';
2
+ import { type LineComponent } from '../line';
3
+ import type { ChartTextChildren, ChartTextProps } from '../text/ChartText';
4
+ /**
5
+ * Animation variants for grouped axis tick labels - initial mount
6
+ * Note: Mobile currently doesn't use these variants. Axes render immediately without animation.
7
+ * Web uses similar variants with delay to match path enter animation timing.
8
+ */
9
+ export declare const axisTickLabelsInitialAnimationVariants: {
10
+ initial: {
11
+ opacity: number;
12
+ };
13
+ animate: {
14
+ opacity: number;
15
+ transition: {
16
+ duration: number;
17
+ delay: number;
18
+ };
19
+ };
20
+ exit: {
21
+ opacity: number;
22
+ transition: {
23
+ duration: number;
24
+ };
25
+ };
26
+ };
27
+ /**
28
+ * Animation variants for axis elements - updates (used for both grid lines and tick labels)
29
+ */
30
+ export declare const axisUpdateAnimationVariants: {
31
+ initial: {
32
+ opacity: number;
33
+ };
34
+ animate: {
35
+ opacity: number;
36
+ transition: {
37
+ duration: number;
38
+ delay: number;
39
+ };
40
+ };
41
+ exit: {
42
+ opacity: number;
43
+ transition: {
44
+ duration: number;
45
+ };
46
+ };
47
+ };
48
+ export type AxisTickLabelComponentProps = Pick<
49
+ ChartTextProps,
50
+ | 'x'
51
+ | 'y'
52
+ | 'children'
53
+ | 'dx'
54
+ | 'dy'
55
+ | 'font'
56
+ | 'fontFamilies'
57
+ | 'fontSize'
58
+ | 'fontWeight'
59
+ | 'fontStyle'
60
+ | 'color'
61
+ | 'horizontalAlignment'
62
+ | 'verticalAlignment'
63
+ | 'opacity'
64
+ >;
65
+ export type AxisTickLabelComponent = React.FC<AxisTickLabelComponentProps>;
66
+ export type AxisBaseProps = {
67
+ /**
68
+ * Label text to display for the axis.
69
+ */
70
+ label?: string;
71
+ /**
72
+ * Gap between the tick labels and the axis label.
73
+ * @default 4
74
+ */
75
+ labelGap?: number;
76
+ /**
77
+ * Minimum gap between tick labels.
78
+ * Labels will be hidden if they are closer than this gap.
79
+ * @default 4
80
+ */
81
+ minTickLabelGap?: number;
82
+ /**
83
+ * Requested number of ticks to display.
84
+ * This value is passed into d3 and may not be respected.
85
+ * @note This property is overridden when `ticks` is provided.
86
+ * @note this property overrides the `tickInterval` property.
87
+ * @default 5 (for y-axis)
88
+ */
89
+ requestedTickCount?: number;
90
+ /**
91
+ * Whether to show grid lines at each tick position.
92
+ */
93
+ showGrid?: boolean;
94
+ /**
95
+ * Whether to show the axis line.
96
+ */
97
+ showLine?: boolean;
98
+ /**
99
+ * Whether to show tick marks on the axis.
100
+ */
101
+ showTickMarks?: boolean;
102
+ /**
103
+ * Size of the tick marks.
104
+ * @default 4
105
+ */
106
+ tickMarkSize?: number;
107
+ /**
108
+ * Custom tick configuration for the axis.
109
+ * When provided, this overrides the `requestedTickCount` property.
110
+ *
111
+ * - **Array**: Uses these exact values for tick positioning and labels.
112
+ * - **Function**: Filters based on the predicate function.
113
+ * - For **x-axis**: Checks every data index (0, 1, 2, ..., dataLength-1)
114
+ * - For **y-axis**: Filters d3-generated tick values
115
+ *
116
+ * @example
117
+ * // Exact tick values
118
+ * ticks: [0, 25, 50, 75, 100]
119
+ *
120
+ * @example
121
+ * // Show every 12th data point on x-axis
122
+ * ticks: (index) => index % 12 === 0
123
+ */
124
+ ticks?: number[] | ((value: number) => boolean);
125
+ /**
126
+ * Space between the axis tick mark and labels.
127
+ * If tick marks are not shown, this is the gap between the axis and the chart.
128
+ * @default 2 for x-axis, 8 for y-axis
129
+ */
130
+ tickMarkLabelGap?: number;
131
+ /**
132
+ * Interval at which to show ticks.
133
+ * When provided, calculates tick count based on available space.
134
+ * @note this property is overridden by the `requestedTickCount` and `ticks` properties.
135
+ * @default 32 (for x-axis)
136
+ */
137
+ tickInterval?: number;
138
+ /**
139
+ * Minimum step size for tick generation.
140
+ * Prevents the step from being smaller than this value.
141
+ * @default 1
142
+ */
143
+ tickMinStep?: number;
144
+ /**
145
+ * Maximum step size for tick generation.
146
+ * Prevents the step from being larger than this value.
147
+ */
148
+ tickMaxStep?: number;
149
+ };
150
+ export type AxisProps = AxisBaseProps & {
151
+ /**
152
+ * Component to render the grid lines.
153
+ * @default DottedLine
154
+ */
155
+ GridLineComponent?: LineComponent;
156
+ /**
157
+ * Component to render the axis line.
158
+ * @default SolidLine
159
+ */
160
+ LineComponent?: LineComponent;
161
+ /**
162
+ * Component to render the tick marks.
163
+ * @default SolidLine
164
+ */
165
+ TickMarkLineComponent?: LineComponent;
166
+ /**
167
+ * Formatter function for axis tick values.
168
+ * Tick values will be wrapped in ChartText component.
169
+ *
170
+ * @example
171
+ * // XAxis
172
+ * tickLabelFormatter: (index) => {
173
+ * return `$${prices[index]}`;
174
+ * }
175
+ *
176
+ * @example
177
+ * // YAxis
178
+ * tickLabelFormatter: (value) => `$${prices[value]}`
179
+ */
180
+ tickLabelFormatter?: (value: number) => ChartTextChildren;
181
+ /**
182
+ * Component to render tick labels.
183
+ * Allows for custom styling and formatting that works cross-platform.
184
+ *
185
+ * @example
186
+ * // Custom tick label component with offset positioning
187
+ * TickLabelComponent={(props) => (
188
+ * <DefaultAxisTickLabel {...props} dx={4} dy={-12} />
189
+ * )}
190
+ * @default DefaultAxisTickLabel
191
+ */
192
+ TickLabelComponent?: AxisTickLabelComponent;
193
+ };
194
+ //# sourceMappingURL=Axis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;CAiBlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;CAiBvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,cAAc,EACZ,GAAG,GACH,GAAG,GACH,UAAU,GACV,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,cAAc,GACd,UAAU,GACV,YAAY,GACZ,WAAW,GACX,OAAO,GACP,qBAAqB,GACrB,mBAAmB,GACnB,SAAS,CACZ,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,aAAa,CAAC;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"}
@@ -0,0 +1,16 @@
1
+ import { type AxisBaseProps, type AxisProps } from './Axis';
2
+ export type XAxisBaseProps = AxisBaseProps & {
3
+ /**
4
+ * The position of the axis relative to the chart's drawing area.
5
+ * @default 'bottom'
6
+ */
7
+ position?: 'top' | 'bottom';
8
+ /**
9
+ * Height of the axis. This value is inclusive of the padding.
10
+ * @default 32 when no label is provided, 52 when a label is provided
11
+ */
12
+ height?: number;
13
+ };
14
+ export type XAxisProps = AxisProps & XAxisBaseProps;
15
+ export declare const XAxis: import('react').NamedExoticComponent<XAxisProps>;
16
+ //# sourceMappingURL=XAxis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/XAxis.tsx"],"names":[],"mappings":"AAYA,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,kDA+NjB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type AxisBaseProps, type AxisProps } from './Axis';
2
+ export type YAxisBaseProps = AxisBaseProps & {
3
+ /**
4
+ * The ID of the axis to render.
5
+ * Defaults to defaultAxisId if not specified.
6
+ */
7
+ axisId?: string;
8
+ /**
9
+ * The position of the axis relative to the chart's drawing area.
10
+ * @default 'right'
11
+ */
12
+ position?: 'left' | 'right';
13
+ /**
14
+ * Width of the axis. This value is inclusive of the padding.
15
+ * @default 44 when no label is provided, 64 when a label is provided
16
+ */
17
+ width?: number;
18
+ };
19
+ export type YAxisProps = AxisProps & YAxisBaseProps;
20
+ export declare const YAxis: import('react').NamedExoticComponent<YAxisProps>;
21
+ //# sourceMappingURL=YAxis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/YAxis.tsx"],"names":[],"mappings":"AAYA,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,kDA0NjB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './Axis';
2
+ export * from './DefaultAxisTickLabel';
3
+ export * from './XAxis';
4
+ export * from './YAxis';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,92 @@
1
+ import React from 'react';
2
+ import { type Transition } from '../utils';
3
+ export type BarBaseProps = {
4
+ /**
5
+ * X coordinate of the bar (left edge).
6
+ */
7
+ x: number;
8
+ /**
9
+ * Y coordinate of the bar (top edge).
10
+ */
11
+ y: number;
12
+ /**
13
+ * Width of the bar.
14
+ */
15
+ width: number;
16
+ /**
17
+ * Height of the bar.
18
+ */
19
+ height: number;
20
+ /**
21
+ * Border radius for the bar.
22
+ * @default 4
23
+ */
24
+ borderRadius?: number;
25
+ /**
26
+ * Whether to round the top of the bar.
27
+ */
28
+ roundTop?: boolean;
29
+ /**
30
+ * Whether to round the bottom of the bar.
31
+ */
32
+ roundBottom?: boolean;
33
+ /**
34
+ * Y coordinate of the baseline/origin.
35
+ */
36
+ originY?: number;
37
+ /**
38
+ * The x-axis data value for this bar.
39
+ */
40
+ dataX?: number | string;
41
+ /**
42
+ * The y-axis data value for this bar.
43
+ */
44
+ dataY?: number | [number, number] | null;
45
+ /**
46
+ * Fill color for the bar.
47
+ */
48
+ fill?: string;
49
+ /**
50
+ * Fill opacity for the bar.
51
+ */
52
+ fillOpacity?: number;
53
+ /**
54
+ * Stroke color for the bar outline.
55
+ */
56
+ stroke?: string;
57
+ /**
58
+ * Stroke width for the bar outline.
59
+ */
60
+ strokeWidth?: number;
61
+ /**
62
+ * Component to render the bar.
63
+ */
64
+ BarComponent?: BarComponent;
65
+ };
66
+ export type BarProps = BarBaseProps & {
67
+ /**
68
+ * Transition configuration for bar animations.
69
+ */
70
+ transition?: Transition;
71
+ };
72
+ export type BarComponentProps = Omit<BarProps, 'BarComponent'> & {
73
+ /**
74
+ * The path data for the bar shape.
75
+ */
76
+ d: string;
77
+ };
78
+ export type BarComponent = React.FC<BarComponentProps>;
79
+ /**
80
+ * Simple bar component that renders a single bar at the specified position.
81
+ *
82
+ * This component is intentionally kept simple - it just renders a static bar at the given
83
+ * x, y, width, height coordinates. Complex positioning logic (like handling stacks,
84
+ * groups, gaps, etc.) should be handled by parent components like BarChart or BarStack.
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * <Bar x={10} y={20} width={50} height={100} fill="blue" />
89
+ * ```
90
+ */
91
+ export declare const Bar: React.NamedExoticComponent<BarProps>;
92
+ //# sourceMappingURL=Bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIvD,MAAM,MAAM,YAAY,GAAG;IACzB;;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"}
@@ -0,0 +1,113 @@
1
+ import type { View } from 'react-native';
2
+ import { type XAxisProps, type YAxisProps } from '../axis';
3
+ import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
4
+ import { type AxisConfigProps, type Series } from '../utils';
5
+ import { type BarPlotProps } from './BarPlot';
6
+ export type BarChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
7
+ Pick<
8
+ BarPlotProps,
9
+ | 'barPadding'
10
+ | 'BarComponent'
11
+ | 'fillOpacity'
12
+ | 'stroke'
13
+ | 'strokeWidth'
14
+ | 'borderRadius'
15
+ | 'BarStackComponent'
16
+ | 'roundBaseline'
17
+ | 'stackGap'
18
+ | 'barMinSize'
19
+ | 'stackMinSize'
20
+ | 'transition'
21
+ > & {
22
+ /**
23
+ * Configuration objects that define how to visualize the data.
24
+ */
25
+ series?: Array<Series>;
26
+ /**
27
+ * Whether to stack the areas on top of each other.
28
+ * When true, each series builds cumulative values on top of the previous series.
29
+ *
30
+ * @note only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
31
+ * Series with start & end value tuples (e.g., `[[0, 10], [5, 20]]`) will be skipped during stacking
32
+ * and rendered as-is.
33
+ */
34
+ stacked?: boolean;
35
+ /**
36
+ * Whether to show the X axis.
37
+ */
38
+ showXAxis?: boolean;
39
+ /**
40
+ * Whether to show the Y axis.
41
+ */
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
+ */
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
+ */
54
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
55
+ };
56
+ export type BarChartProps = BarChartBaseProps &
57
+ Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
58
+ export declare const BarChart: import('react').MemoExoticComponent<
59
+ import('react').ForwardRefExoticComponent<
60
+ Omit<CartesianChartBaseProps, 'series' | 'xAxis' | 'yAxis'> &
61
+ Pick<
62
+ BarPlotProps,
63
+ | 'borderRadius'
64
+ | 'strokeWidth'
65
+ | 'stroke'
66
+ | 'transition'
67
+ | 'fillOpacity'
68
+ | 'BarComponent'
69
+ | 'BarStackComponent'
70
+ | 'roundBaseline'
71
+ | 'stackGap'
72
+ | 'barMinSize'
73
+ | 'stackMinSize'
74
+ | 'barPadding'
75
+ > & {
76
+ /**
77
+ * Configuration objects that define how to visualize the data.
78
+ */
79
+ series?: Array<Series>;
80
+ /**
81
+ * Whether to stack the areas on top of each other.
82
+ * When true, each series builds cumulative values on top of the previous series.
83
+ *
84
+ * @note only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
85
+ * Series with start & end value tuples (e.g., `[[0, 10], [5, 20]]`) will be skipped during stacking
86
+ * and rendered as-is.
87
+ */
88
+ stacked?: boolean;
89
+ /**
90
+ * Whether to show the X axis.
91
+ */
92
+ showXAxis?: boolean;
93
+ /**
94
+ * Whether to show the Y axis.
95
+ */
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
+ */
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
+ */
108
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
109
+ } & Omit<CartesianChartProps, 'series' | 'xAxis' | 'yAxis'> &
110
+ import('react').RefAttributes<View>
111
+ >
112
+ >;
113
+ //# sourceMappingURL=BarChart.d.ts.map
@@ -0,0 +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,EAEL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,eAAe,EAIpB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,GACzF,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,GACd,YAAY,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"}
@@ -0,0 +1,30 @@
1
+ import type { BarStackGroupProps } from './BarStackGroup';
2
+ export type BarPlotBaseProps = Pick<
3
+ BarStackGroupProps,
4
+ | 'barPadding'
5
+ | 'BarComponent'
6
+ | 'fillOpacity'
7
+ | 'stroke'
8
+ | 'strokeWidth'
9
+ | 'borderRadius'
10
+ | 'roundBaseline'
11
+ | 'stackGap'
12
+ | 'barMinSize'
13
+ | 'stackMinSize'
14
+ | 'BarStackComponent'
15
+ > & {
16
+ /**
17
+ * Array of series IDs to render.
18
+ * If not provided, renders all series in the chart.
19
+ */
20
+ seriesIds?: string[];
21
+ };
22
+ export type BarPlotProps = BarPlotBaseProps & Pick<BarStackGroupProps, 'transition'>;
23
+ /**
24
+ * BarPlot component that handles multiple series with proper stacking coordination.
25
+ * Groups series by stack ID + y-axis ID combination and renders BarStackGroup for each group.
26
+ * This allows series with different y-axes to be rendered side by side while preventing
27
+ * cross-axis stacking (e.g., comparing $1M vs $1B companies on different scales).
28
+ */
29
+ export declare const BarPlot: import('react').NamedExoticComponent<BarPlotProps>;
30
+ //# sourceMappingURL=BarPlot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarPlot.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarPlot.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,kBAAkB,EAChB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,GACd,mBAAmB,CACtB,GAAG;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,IAAI,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,OAAO,oDAwGnB,CAAC"}