@coinbase/cds-mcp-server 8.17.2 → 8.17.4

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 (284) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +188 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
  4. package/mcp-docs/mobile/components/Alert.txt +155 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +265 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +195 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
  8. package/mcp-docs/mobile/components/Banner.txt +221 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +815 -0
  10. package/mcp-docs/mobile/components/Box.txt +173 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
  12. package/mcp-docs/mobile/components/Button.txt +198 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1083 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +70 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +245 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
  20. package/mcp-docs/mobile/components/Chip.txt +194 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +157 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +104 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +365 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +226 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +496 -0
  31. package/mcp-docs/mobile/components/Divider.txt +138 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +145 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +157 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
  37. package/mcp-docs/mobile/components/HStack.txt +234 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
  39. package/mcp-docs/mobile/components/Icon.txt +51 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +268 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +187 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +186 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1324 -0
  44. package/mcp-docs/mobile/components/Link.txt +291 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +412 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +84 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +138 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
  50. package/mcp-docs/mobile/components/Modal.txt +83 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +33 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +340 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +151 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +160 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +185 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +47 -0
  64. package/mcp-docs/mobile/components/Point.txt +204 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +210 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
  71. package/mcp-docs/mobile/components/Radio.txt +241 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +201 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +203 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +191 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
  82. package/mcp-docs/mobile/components/Select.txt +211 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +323 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +84 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +330 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +83 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +122 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +48 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +527 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
  98. package/mcp-docs/mobile/components/Switch.txt +97 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +153 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +190 -0
  104. package/mcp-docs/mobile/components/Tag.txt +300 -0
  105. package/mcp-docs/mobile/components/Text.txt +211 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +717 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
  108. package/mcp-docs/mobile/components/Toast.txt +196 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +59 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
  111. package/mcp-docs/mobile/components/Tour.txt +158 -0
  112. package/mcp-docs/mobile/components/Tray.txt +252 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
  114. package/mcp-docs/mobile/components/VStack.txt +222 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +621 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +567 -0
  117. package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
  118. package/mcp-docs/mobile/getting-started/installation.txt +57 -0
  119. package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
  120. package/mcp-docs/mobile/getting-started/playground.txt +28 -0
  121. package/mcp-docs/mobile/getting-started/styling.txt +84 -0
  122. package/mcp-docs/mobile/getting-started/theming.txt +286 -0
  123. package/mcp-docs/mobile/hooks/useDimensions.txt +72 -0
  124. package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
  125. package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
  126. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +280 -0
  127. package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
  128. package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
  129. package/mcp-docs/mobile/hooks/useTheme.txt +321 -0
  130. package/mcp-docs/mobile/routes.txt +139 -0
  131. package/mcp-docs/web/components/Accordion.txt +189 -0
  132. package/mcp-docs/web/components/AccordionItem.txt +31 -0
  133. package/mcp-docs/web/components/Alert.txt +164 -0
  134. package/mcp-docs/web/components/AreaChart.txt +510 -0
  135. package/mcp-docs/web/components/Avatar.txt +211 -0
  136. package/mcp-docs/web/components/AvatarButton.txt +240 -0
  137. package/mcp-docs/web/components/Banner.txt +226 -0
  138. package/mcp-docs/web/components/BarChart.txt +1267 -0
  139. package/mcp-docs/web/components/Box.txt +175 -0
  140. package/mcp-docs/web/components/Button.txt +212 -0
  141. package/mcp-docs/web/components/ButtonGroup.txt +79 -0
  142. package/mcp-docs/web/components/Calendar.txt +181 -0
  143. package/mcp-docs/web/components/Carousel.txt +1575 -0
  144. package/mcp-docs/web/components/CartesianChart.txt +1044 -0
  145. package/mcp-docs/web/components/CellMedia.txt +56 -0
  146. package/mcp-docs/web/components/Checkbox.txt +188 -0
  147. package/mcp-docs/web/components/CheckboxCell.txt +202 -0
  148. package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
  149. package/mcp-docs/web/components/Chip.txt +196 -0
  150. package/mcp-docs/web/components/Coachmark.txt +188 -0
  151. package/mcp-docs/web/components/Collapsible.txt +119 -0
  152. package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
  153. package/mcp-docs/web/components/ContentCard.txt +367 -0
  154. package/mcp-docs/web/components/ContentCardBody.txt +137 -0
  155. package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
  156. package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
  157. package/mcp-docs/web/components/ContentCell.txt +219 -0
  158. package/mcp-docs/web/components/ControlGroup.txt +436 -0
  159. package/mcp-docs/web/components/DatePicker.txt +505 -0
  160. package/mcp-docs/web/components/Divider.txt +143 -0
  161. package/mcp-docs/web/components/DotCount.txt +149 -0
  162. package/mcp-docs/web/components/DotStatusColor.txt +58 -0
  163. package/mcp-docs/web/components/DotSymbol.txt +137 -0
  164. package/mcp-docs/web/components/Dropdown.txt +119 -0
  165. package/mcp-docs/web/components/Fallback.txt +163 -0
  166. package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
  167. package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
  168. package/mcp-docs/web/components/FullscreenModal.txt +145 -0
  169. package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
  170. package/mcp-docs/web/components/Grid.txt +236 -0
  171. package/mcp-docs/web/components/GridColumn.txt +209 -0
  172. package/mcp-docs/web/components/HStack.txt +236 -0
  173. package/mcp-docs/web/components/HeroSquare.txt +48 -0
  174. package/mcp-docs/web/components/Icon.txt +145 -0
  175. package/mcp-docs/web/components/IconButton.txt +390 -0
  176. package/mcp-docs/web/components/InputChip.txt +187 -0
  177. package/mcp-docs/web/components/Interactable.txt +193 -0
  178. package/mcp-docs/web/components/LineChart.txt +1576 -0
  179. package/mcp-docs/web/components/Link.txt +243 -0
  180. package/mcp-docs/web/components/ListCell.txt +418 -0
  181. package/mcp-docs/web/components/LogoMark.txt +84 -0
  182. package/mcp-docs/web/components/LogoWordMark.txt +93 -0
  183. package/mcp-docs/web/components/Lottie.txt +157 -0
  184. package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
  185. package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
  186. package/mcp-docs/web/components/Modal.txt +196 -0
  187. package/mcp-docs/web/components/ModalBody.txt +117 -0
  188. package/mcp-docs/web/components/ModalFooter.txt +119 -0
  189. package/mcp-docs/web/components/ModalHeader.txt +123 -0
  190. package/mcp-docs/web/components/MultiContentModule.txt +381 -0
  191. package/mcp-docs/web/components/NavigationBar.txt +102 -0
  192. package/mcp-docs/web/components/NavigationTitle.txt +25 -0
  193. package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
  194. package/mcp-docs/web/components/NudgeCard.txt +181 -0
  195. package/mcp-docs/web/components/Overlay.txt +171 -0
  196. package/mcp-docs/web/components/PageFooter.txt +184 -0
  197. package/mcp-docs/web/components/PageHeader.txt +243 -0
  198. package/mcp-docs/web/components/Pagination.txt +499 -0
  199. package/mcp-docs/web/components/PeriodSelector.txt +703 -0
  200. package/mcp-docs/web/components/Pictogram.txt +48 -0
  201. package/mcp-docs/web/components/Point.txt +460 -0
  202. package/mcp-docs/web/components/PortalProvider.txt +76 -0
  203. package/mcp-docs/web/components/Pressable.txt +193 -0
  204. package/mcp-docs/web/components/ProgressBar.txt +163 -0
  205. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
  206. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
  207. package/mcp-docs/web/components/ProgressCircle.txt +443 -0
  208. package/mcp-docs/web/components/Radio.txt +219 -0
  209. package/mcp-docs/web/components/RadioCell.txt +215 -0
  210. package/mcp-docs/web/components/RadioGroup.txt +288 -0
  211. package/mcp-docs/web/components/ReferenceLine.txt +451 -0
  212. package/mcp-docs/web/components/RemoteImage.txt +165 -0
  213. package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
  214. package/mcp-docs/web/components/RollingNumber.txt +1021 -0
  215. package/mcp-docs/web/components/Scrubber.txt +231 -0
  216. package/mcp-docs/web/components/SearchInput.txt +117 -0
  217. package/mcp-docs/web/components/SectionHeader.txt +217 -0
  218. package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
  219. package/mcp-docs/web/components/Select.txt +224 -0
  220. package/mcp-docs/web/components/SelectChip.txt +314 -0
  221. package/mcp-docs/web/components/SelectOption.txt +165 -0
  222. package/mcp-docs/web/components/Sidebar.txt +349 -0
  223. package/mcp-docs/web/components/SidebarItem.txt +131 -0
  224. package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
  225. package/mcp-docs/web/components/Spacer.txt +173 -0
  226. package/mcp-docs/web/components/Sparkline.txt +122 -0
  227. package/mcp-docs/web/components/SparklineGradient.txt +106 -0
  228. package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
  229. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
  230. package/mcp-docs/web/components/Spinner.txt +128 -0
  231. package/mcp-docs/web/components/SpotIcon.txt +48 -0
  232. package/mcp-docs/web/components/SpotRectangle.txt +48 -0
  233. package/mcp-docs/web/components/SpotSquare.txt +48 -0
  234. package/mcp-docs/web/components/Stepper.txt +682 -0
  235. package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
  236. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
  237. package/mcp-docs/web/components/Switch.txt +85 -0
  238. package/mcp-docs/web/components/TabIndicator.txt +48 -0
  239. package/mcp-docs/web/components/TabLabel.txt +158 -0
  240. package/mcp-docs/web/components/TabNavigation.txt +159 -0
  241. package/mcp-docs/web/components/TabbedChips.txt +155 -0
  242. package/mcp-docs/web/components/Table.txt +367 -0
  243. package/mcp-docs/web/components/TableBody.txt +83 -0
  244. package/mcp-docs/web/components/TableCaption.txt +102 -0
  245. package/mcp-docs/web/components/TableCell.txt +165 -0
  246. package/mcp-docs/web/components/TableCellFallback.txt +97 -0
  247. package/mcp-docs/web/components/TableFooter.txt +83 -0
  248. package/mcp-docs/web/components/TableHeader.txt +100 -0
  249. package/mcp-docs/web/components/TableRow.txt +140 -0
  250. package/mcp-docs/web/components/Tabs.txt +212 -0
  251. package/mcp-docs/web/components/Tag.txt +304 -0
  252. package/mcp-docs/web/components/Text.txt +232 -0
  253. package/mcp-docs/web/components/TextInput.txt +652 -0
  254. package/mcp-docs/web/components/ThemeProvider.txt +199 -0
  255. package/mcp-docs/web/components/TileButton.txt +158 -0
  256. package/mcp-docs/web/components/Toast.txt +203 -0
  257. package/mcp-docs/web/components/Tooltip.txt +89 -0
  258. package/mcp-docs/web/components/Tour.txt +179 -0
  259. package/mcp-docs/web/components/Tray.txt +288 -0
  260. package/mcp-docs/web/components/UpsellCard.txt +319 -0
  261. package/mcp-docs/web/components/VStack.txt +224 -0
  262. package/mcp-docs/web/components/XAxis.txt +619 -0
  263. package/mcp-docs/web/components/YAxis.txt +548 -0
  264. package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
  265. package/mcp-docs/web/getting-started/installation.txt +103 -0
  266. package/mcp-docs/web/getting-started/introduction.txt +102 -0
  267. package/mcp-docs/web/getting-started/playground.txt +28 -0
  268. package/mcp-docs/web/getting-started/styling.txt +161 -0
  269. package/mcp-docs/web/getting-started/templates.txt +121 -0
  270. package/mcp-docs/web/getting-started/theming.txt +426 -0
  271. package/mcp-docs/web/hooks/useBreakpoints.txt +61 -0
  272. package/mcp-docs/web/hooks/useDimensions.txt +114 -0
  273. package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
  274. package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
  275. package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
  276. package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
  277. package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
  278. package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
  279. package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
  280. package/mcp-docs/web/hooks/useRefMap.txt +178 -0
  281. package/mcp-docs/web/hooks/useScrollBlocker.txt +82 -0
  282. package/mcp-docs/web/hooks/useTheme.txt +364 -0
  283. package/mcp-docs/web/routes.txt +163 -0
  284. package/package.json +1 -1
@@ -0,0 +1,1576 @@
1
+ # LineChart
2
+
3
+ A flexible line chart component for displaying data trends over time. Supports multiple series, custom curves, areas, scrubbing, and interactive data exploration.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { LineChart } from '@coinbase/cds-web-visualization'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Basic Example
14
+
15
+ ```jsx live
16
+ function BasicExample() {
17
+ const [scrubIndex, setScrubIndex] = useState(undefined);
18
+ const data = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
19
+
20
+ const accessibilityLabel = useMemo(() => {
21
+ if (scrubIndex === undefined) return undefined;
22
+ return `Value: ${data[scrubIndex]} at index ${scrubIndex}`;
23
+ }, [scrubIndex, data]);
24
+
25
+ return (
26
+ <LineChart
27
+ enableScrubbing
28
+ onScrubberPositionChange={setScrubIndex}
29
+ height={{ base: 150, tablet: 200, desktop: 250 }}
30
+ series={[
31
+ {
32
+ id: 'prices',
33
+ data: data,
34
+ },
35
+ ]}
36
+ curve="monotone"
37
+ showYAxis
38
+ showArea
39
+ yAxis={{
40
+ showGrid: true,
41
+ }}
42
+ accessibilityLabel={accessibilityLabel}
43
+ >
44
+ <Scrubber />
45
+ </LineChart>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ### Simple
51
+
52
+ ```jsx live
53
+ <LineChart
54
+ height={{ base: 150, tablet: 200, desktop: 250 }}
55
+ series={[
56
+ {
57
+ id: 'prices',
58
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
59
+ },
60
+ ]}
61
+ curve="monotone"
62
+ />
63
+ ```
64
+
65
+ ### Compact
66
+
67
+ You can specify the dimensions of the chart to make it more compact.
68
+
69
+ ```jsx live
70
+ function CompactLineChart() {
71
+ const dimensions = { width: 62, height: 18 };
72
+
73
+ const sparklineData = prices
74
+ .map((price) => parseFloat(price))
75
+ .filter((price, index) => index % 10 === 0);
76
+ const positiveFloor = Math.min(...sparklineData) - 10;
77
+
78
+ const negativeData = sparklineData.map((price) => -1 * price).reverse();
79
+ const negativeCeiling = Math.max(...negativeData) + 10;
80
+
81
+ const formatPrice = useCallback((price: number) => {
82
+ return `$${price.toLocaleString('en-US', {
83
+ minimumFractionDigits: 2,
84
+ maximumFractionDigits: 2,
85
+ })}`;
86
+ }, []);
87
+
88
+ const CompactChart = memo(({ data, showArea, color, referenceY }) => (
89
+ <Box style={{ padding: 1 }}>
90
+ <LineChart
91
+ {...dimensions}
92
+ enableScrubbing={false}
93
+ overflow="visible"
94
+ inset={0}
95
+ showArea={showArea}
96
+ series={[
97
+ {
98
+ id: 'btc',
99
+ data,
100
+ color,
101
+ },
102
+ ]}
103
+ >
104
+ <ReferenceLine dataY={referenceY} />
105
+ </LineChart>
106
+ </Box>
107
+ ));
108
+
109
+ const ChartCell = memo(({ data, showArea, color, referenceY, subdetail, variant }) => {
110
+ const { isPhone } = useBreakpoints();
111
+
112
+ return (
113
+ <ListCell
114
+ spacingVariant="condensed"
115
+ description={isPhone ? undefined : assets.btc.symbol}
116
+ detail={formatPrice(parseFloat(prices[0]))}
117
+ intermediary={
118
+ <CompactChart data={data} showArea={showArea} color={color} referenceY={referenceY} />
119
+ }
120
+ media={<Avatar src={assets.btc.imageUrl} />}
121
+ onClick={() => console.log('clicked')}
122
+ subdetail={subdetail}
123
+ title={isPhone ? undefined : assets.btc.name}
124
+ variant={variant}
125
+ style={{ padding: 0 }}
126
+ />
127
+ );
128
+ });
129
+
130
+ return (
131
+ <VStack>
132
+ <ChartCell
133
+ data={sparklineData}
134
+ color={assets.btc.color}
135
+ referenceY={parseFloat(prices[Math.floor(prices.length / 4)])}
136
+ subdetail="-4.55%"
137
+ variant="negative"
138
+ />
139
+ <ChartCell
140
+ data={sparklineData}
141
+ showArea
142
+ color={assets.btc.color}
143
+ referenceY={parseFloat(prices[Math.floor(prices.length / 4)])}
144
+ subdetail="-4.55%"
145
+ variant="negative"
146
+ />
147
+ <ChartCell
148
+ data={sparklineData}
149
+ showArea
150
+ color="var(--color-fgPositive)"
151
+ referenceY={positiveFloor}
152
+ subdetail="+0.25%"
153
+ variant="positive"
154
+ />
155
+ <ChartCell
156
+ data={negativeData}
157
+ showArea
158
+ color="var(--color-fgNegative)"
159
+ referenceY={negativeCeiling}
160
+ subdetail="-4.55%"
161
+ variant="negative"
162
+ />
163
+ </VStack>
164
+ );
165
+ };
166
+ ```
167
+
168
+ ### Gain/Loss
169
+
170
+ You can use the y-axis scale and a [linearGradient](https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/linearGradient) to create a gain/loss chart.
171
+
172
+ ```jsx live
173
+ function GainLossChart() {
174
+ const gradientId = useId();
175
+
176
+ const data = [-40, -28, -21, -5, 48, -5, -28, 2, -29, -46, 16, -30, -29, 8];
177
+
178
+ const priceFormatter = useCallback(
179
+ (value) =>
180
+ new Intl.NumberFormat('en-US', {
181
+ style: 'currency',
182
+ currency: 'USD',
183
+ maximumFractionDigits: 0,
184
+ }).format(value),
185
+ [],
186
+ );
187
+
188
+ const ChartDefs = ({ threshold = 0 }) => {
189
+ const { getYScale } = useCartesianChartContext();
190
+ // get the default y-axis scale
191
+ const yScale = getYScale();
192
+
193
+ if (yScale) {
194
+ const domain = yScale.domain();
195
+ const range = yScale.range();
196
+
197
+ const baselinePercentage = ((threshold - domain[0]) / (domain[1] - domain[0])) * 100;
198
+
199
+ const negativeColor = 'rgb(var(--gray15))';
200
+ const positiveColor = 'var(--color-fgPositive)';
201
+
202
+ return (
203
+ <defs>
204
+ <linearGradient
205
+ gradientUnits="userSpaceOnUse"
206
+ id={`${gradientId}-solid`}
207
+ x1="0%"
208
+ x2="0%"
209
+ y1={range[0]}
210
+ y2={range[1]}
211
+ >
212
+ <stop offset="0%" stopColor={negativeColor} />
213
+ <stop offset={`${baselinePercentage}%`} stopColor={negativeColor} />
214
+ <stop offset={`${baselinePercentage}%`} stopColor={positiveColor} />
215
+ <stop offset="100%" stopColor={positiveColor} />
216
+ </linearGradient>
217
+ <linearGradient
218
+ gradientUnits="userSpaceOnUse"
219
+ id={`${gradientId}-gradient`}
220
+ x1="0%"
221
+ x2="0%"
222
+ y1={range[0]}
223
+ y2={range[1]}
224
+ >
225
+ <stop offset="0%" stopColor={negativeColor} stopOpacity={0.3} />
226
+ <stop offset={`${baselinePercentage}%`} stopColor={negativeColor} stopOpacity={0} />
227
+ <stop offset={`${baselinePercentage}%`} stopColor={positiveColor} stopOpacity={0} />
228
+ <stop offset="100%" stopColor={positiveColor} stopOpacity={0.3} />
229
+ </linearGradient>
230
+ </defs>
231
+ );
232
+ }
233
+
234
+ return null;
235
+ };
236
+
237
+ const solidColor = `url(#${gradientId}-solid)`;
238
+
239
+ return (
240
+ <CartesianChart
241
+ enableScrubbing
242
+ height={{ base: 150, tablet: 200, desktop: 250 }}
243
+ series={[
244
+ {
245
+ id: 'prices',
246
+ data: data,
247
+ color: solidColor,
248
+ },
249
+ ]}
250
+ padding={{ top: 1.5, bottom: 1.5, left: 2, right: 0 }}
251
+ >
252
+ <ChartDefs />
253
+ <YAxis requestedTickCount={2} showGrid tickLabelFormatter={priceFormatter} />
254
+ <Area seriesId="prices" curve="monotone" fill={`url(#${gradientId}-gradient)`} />
255
+ <Line strokeWidth={3} curve="monotone" seriesId="prices" stroke={solidColor} />
256
+ <Scrubber hideOverlay />
257
+ </CartesianChart>
258
+ );
259
+ }
260
+ ```
261
+
262
+ ### Multiple Series
263
+
264
+ You can add multiple series to a line chart.
265
+
266
+ ```jsx live
267
+ function MultipleSeriesChart() {
268
+ const [scrubIndex, setScrubIndex] = useState(undefined);
269
+
270
+ const prices = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
271
+ const volume = [4, 8, 11, 15, 16, 14, 16, 10, 12, 14, 16, 14, 16, 10];
272
+
273
+ return (
274
+ <LineChart
275
+ enableScrubbing
276
+ height={{ base: 150, tablet: 200, desktop: 250 }}
277
+ series={[
278
+ {
279
+ id: 'prices',
280
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
281
+ label: 'Prices',
282
+ color: 'var(--color-accentBoldBlue)',
283
+ },
284
+ {
285
+ id: 'volume',
286
+ data: [4, 8, 11, 15, 16, 14, 16, 10, 12, 14, 16, 14, 16, 10],
287
+ label: 'Volume',
288
+ color: 'var(--color-accentBoldGreen)',
289
+ },
290
+ ]}
291
+ showYAxis
292
+ yAxis={{
293
+ domain: {
294
+ min: 0,
295
+ },
296
+ showGrid: true,
297
+ }}
298
+ curve="monotone"
299
+ >
300
+ <Scrubber />
301
+ </LineChart>
302
+ );
303
+ }
304
+ ```
305
+
306
+ ### Points
307
+
308
+ You can use the `renderPoints` prop to dynamically show points on a line.
309
+
310
+ ```jsx live
311
+ function PointsChart() {
312
+ const keyMarketShiftIndices = [4, 6, 7, 9, 10];
313
+ const data = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
314
+
315
+ return (
316
+ <CartesianChart
317
+ height={{ base: 150, tablet: 200, desktop: 250 }}
318
+ series={[
319
+ {
320
+ id: 'prices',
321
+ data: data,
322
+ },
323
+ ]}
324
+ >
325
+ <Area seriesId="prices" curve="monotone" fill="rgb(var(--blue5))" />
326
+ <Line
327
+ seriesId="prices"
328
+ renderPoints={({ dataX, dataY, ...props }) =>
329
+ keyMarketShiftIndices.includes(dataX)
330
+ ? {
331
+ ...props,
332
+ strokeWidth: 2,
333
+ stroke: 'var(--color-bg)',
334
+ radius: 5,
335
+ onClick: () =>
336
+ alert(
337
+ `You have clicked a key market shift at position ${dataX + 1} with value ${dataY}!`,
338
+ ),
339
+ accessibilityLabel: `Key market shift point at position ${dataX + 1}, value ${dataY}. Click to view details.`,
340
+ }
341
+ : false
342
+ }
343
+ curve="monotone"
344
+ />
345
+ </CartesianChart>
346
+ );
347
+ }
348
+ ```
349
+
350
+ ### Empty State
351
+
352
+ This example shows how to use an empty state for a line chart.
353
+
354
+ ```jsx live
355
+ <LineChart
356
+ series={[
357
+ {
358
+ id: 'line',
359
+ color: 'rgb(var(--gray50))',
360
+ data: [1, 1],
361
+ showArea: true,
362
+ },
363
+ ]}
364
+ yAxis={{ domain: { min: -1, max: 3 } }}
365
+ height={{ base: 150, tablet: 200, desktop: 250 }}
366
+ />
367
+ ```
368
+
369
+ ### Line Styles
370
+
371
+ ```jsx live
372
+ <LineChart
373
+ height={{ base: 150, tablet: 200, desktop: 250 }}
374
+ series={[
375
+ {
376
+ id: 'top',
377
+ data: [15, 28, 32, 44, 46, 36, 40, 45, 48, 38],
378
+ },
379
+ {
380
+ id: 'upperMiddle',
381
+ data: [12, 23, 21, 29, 34, 28, 31, 38, 42, 35],
382
+ color: '#ef4444',
383
+ type: 'dotted',
384
+ },
385
+ {
386
+ id: 'lowerMiddle',
387
+ data: [8, 15, 14, 25, 20, 18, 22, 28, 24, 30],
388
+ color: '#f59e0b',
389
+ curve: 'natural',
390
+ LineComponent: (props) => (
391
+ <GradientLine {...props} endColor="#F7931A" startColor="#E3D74D" strokeWidth={4} />
392
+ ),
393
+ },
394
+ {
395
+ id: 'bottom',
396
+ data: [4, 8, 11, 15, 16, 14, 16, 10, 12, 14],
397
+ color: '#800080',
398
+ curve: 'step',
399
+ AreaComponent: DottedArea,
400
+ showArea: true,
401
+ },
402
+ ]}
403
+ />
404
+ ```
405
+
406
+ ### Live Data
407
+
408
+ ```jsx live
409
+ function LiveAssetPrice() {
410
+ const scrubberRef = useRef(null);
411
+ const [scrubIndex, setScrubIndex] = useState(undefined);
412
+
413
+ const initialData = useMemo(() => {
414
+ return sparklineInteractiveData.hour.map((d) => d.value);
415
+ }, []);
416
+
417
+ const [priceData, setPriceData] = useState(initialData);
418
+
419
+ const lastDataPointTimeRef = useRef(Date.now());
420
+ const updateCountRef = useRef(0);
421
+
422
+ const intervalSeconds = 3600 / initialData.length;
423
+
424
+ const maxPercentChange = Math.abs(initialData[initialData.length - 1] - initialData[0]) * 0.05;
425
+
426
+ useEffect(() => {
427
+ const priceUpdateInterval = setInterval(
428
+ () => {
429
+ setPriceData((currentData) => {
430
+ const newData = [...currentData];
431
+ const lastPrice = newData[newData.length - 1];
432
+
433
+ const priceChange = (Math.random() - 0.5) * maxPercentChange;
434
+ const newPrice = Math.round((lastPrice + priceChange) * 100) / 100;
435
+
436
+ // Check if we should roll over to a new data point
437
+ const currentTime = Date.now();
438
+ const timeSinceLastPoint = (currentTime - lastDataPointTimeRef.current) / 1000;
439
+
440
+ if (timeSinceLastPoint >= intervalSeconds) {
441
+ // Time for a new data point - remove first, add new at end
442
+ lastDataPointTimeRef.current = currentTime;
443
+ newData.shift(); // Remove oldest data point
444
+ newData.push(newPrice); // Add new data point
445
+ updateCountRef.current = 0;
446
+ } else {
447
+ // Just update the last data point
448
+ newData[newData.length - 1] = newPrice;
449
+ updateCountRef.current++;
450
+ }
451
+
452
+ return newData;
453
+ });
454
+
455
+ // Pulse the scrubber on each update
456
+ scrubberRef.current?.pulse();
457
+ },
458
+ 2000 + Math.random() * 1000,
459
+ );
460
+
461
+ return () => clearInterval(priceUpdateInterval);
462
+ }, [intervalSeconds, maxPercentChange]);
463
+
464
+ const accessibilityLabel = useMemo(() => {
465
+ if (scrubIndex === undefined)
466
+ return `Bitcoin Price: $${priceData[priceData.length - 1].toFixed(2)}`;
467
+ const price = priceData[scrubIndex];
468
+ return `Bitcoin Price: $${price.toFixed(2)} at position ${scrubIndex + 1}`;
469
+ }, [scrubIndex, priceData]);
470
+
471
+ return (
472
+ <LineChart
473
+ enableScrubbing
474
+ onScrubberPositionChange={setScrubIndex}
475
+ showArea
476
+ height={{ base: 150, tablet: 200, desktop: 250 }}
477
+ series={[
478
+ {
479
+ id: 'btc',
480
+ data: priceData,
481
+ color: assets.btc.color,
482
+ },
483
+ ]}
484
+ inset={{ right: 64 }}
485
+ accessibilityLabel={accessibilityLabel}
486
+ >
487
+ <Scrubber ref={scrubberRef} labelProps={{ elevation: 1 }} />
488
+ </LineChart>
489
+ );
490
+ }
491
+ ```
492
+
493
+ ### Data Format
494
+
495
+ You can adjust the y values for a series of data by setting the `data` prop on the xAxis.
496
+
497
+ ```jsx live
498
+ function DataFormatChart() {
499
+ const [scrubIndex, setScrubIndex] = useState(undefined);
500
+
501
+ const yData = [2, 5.5, 2, 8.5, 1.5, 5];
502
+ const xData = [1, 2, 3, 5, 8, 10];
503
+
504
+ const accessibilityLabel = useMemo(() => {
505
+ if (scrubIndex === undefined) return undefined;
506
+ return `X: ${xData[scrubIndex]}, Y: ${yData[scrubIndex]} at point ${scrubIndex + 1}`;
507
+ }, [scrubIndex, xData, yData]);
508
+
509
+ return (
510
+ <LineChart
511
+ enableScrubbing
512
+ onScrubberPositionChange={setScrubIndex}
513
+ series={[
514
+ {
515
+ id: 'line',
516
+ data: yData,
517
+ },
518
+ ]}
519
+ height={{ base: 150, tablet: 200, desktop: 250 }}
520
+ showArea
521
+ renderPoints={() => true}
522
+ curve="natural"
523
+ showXAxis
524
+ xAxis={{ data: xData, showLine: true, showTickMarks: true, showGrid: true }}
525
+ showYAxis
526
+ yAxis={{
527
+ domain: { min: 0 },
528
+ position: 'left',
529
+ showLine: true,
530
+ showTickMarks: true,
531
+ showGrid: true,
532
+ }}
533
+ inset={{ top: 16, right: 16, bottom: 0, left: 0 }}
534
+ accessibilityLabel={accessibilityLabel}
535
+ >
536
+ <Scrubber hideOverlay />
537
+ </LineChart>
538
+ );
539
+ }
540
+ ```
541
+
542
+ ### Accessibility
543
+
544
+ You can use `accessibilityLabel` to provide a descriptive label for the chart. This is especially important for charts with scrubbing enabled, where the label should update dynamically to reflect the current data point.
545
+
546
+ ```jsx live
547
+ function AccessibleBasicChart() {
548
+ const [scrubIndex, setScrubIndex] = useState(undefined);
549
+ const data = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
550
+
551
+ const accessibilityLabel = useMemo(() => {
552
+ if (scrubIndex === undefined) {
553
+ return `Current price: ${data[data.length - 1]}`;
554
+ }
555
+ return `Price at position ${scrubIndex + 1}: ${data[scrubIndex]}`;
556
+ }, [scrubIndex, data]);
557
+
558
+ return (
559
+ <LineChart
560
+ enableScrubbing
561
+ onScrubberPositionChange={setScrubIndex}
562
+ height={{ base: 150, tablet: 200, desktop: 250 }}
563
+ series={[
564
+ {
565
+ id: 'prices',
566
+ data: data,
567
+ },
568
+ ]}
569
+ curve="monotone"
570
+ showYAxis
571
+ showArea
572
+ yAxis={{
573
+ showGrid: true,
574
+ }}
575
+ accessibilityLabel={accessibilityLabel}
576
+ >
577
+ <Scrubber />
578
+ </LineChart>
579
+ );
580
+ }
581
+ ```
582
+
583
+ When a chart has a visible header or title, you can use `aria-labelledby` to reference it.
584
+
585
+ ```jsx live
586
+ function AccessibleChartWithHeader() {
587
+ const headerId = useId();
588
+ const [scrubIndex, setScrubIndex] = useState(undefined);
589
+ const data = [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58];
590
+
591
+ const accessibilityLabel = useMemo(() => {
592
+ if (scrubIndex === undefined) {
593
+ return `Line chart showing price trend. Current value: ${data[data.length - 1]}`;
594
+ }
595
+ return `Value: ${data[scrubIndex]} at position ${scrubIndex + 1}`;
596
+ }, [scrubIndex, data]);
597
+
598
+ return (
599
+ <VStack gap={2}>
600
+ <Text id={headerId} font="label1">
601
+ {accessibilityLabel}
602
+ </Text>
603
+ <LineChart
604
+ enableScrubbing
605
+ onScrubberPositionChange={setScrubIndex}
606
+ height={{ base: 150, tablet: 200, desktop: 250 }}
607
+ series={[
608
+ {
609
+ id: 'revenue',
610
+ data: data,
611
+ },
612
+ ]}
613
+ curve="monotone"
614
+ showYAxis
615
+ showArea
616
+ yAxis={{
617
+ showGrid: true,
618
+ }}
619
+ aria-labelledby={headerId}
620
+ >
621
+ <Scrubber />
622
+ </LineChart>
623
+ </VStack>
624
+ );
625
+ }
626
+ ```
627
+
628
+ ### Customization
629
+
630
+ #### Asset Price with Dotted Area
631
+
632
+ ```jsx live
633
+ function AssetPriceWithDottedArea() {
634
+ const BTCTab: TabComponent = memo(
635
+ forwardRef(
636
+ ({ label, ...props }: SegmentedTabProps, ref: React.ForwardedRef<HTMLButtonElement>) => {
637
+ const { activeTab } = useTabsContext();
638
+ const isActive = activeTab?.id === props.id;
639
+
640
+ return (
641
+ <SegmentedTab
642
+ ref={ref}
643
+ label={
644
+ <TextLabel1
645
+ style={{
646
+ transition: 'color 0.2s ease',
647
+ color: isActive ? assets.btc.color : undefined,
648
+ }}
649
+ >
650
+ {label}
651
+ </TextLabel1>
652
+ }
653
+ {...props}
654
+ />
655
+ );
656
+ },
657
+ ),
658
+ );
659
+
660
+ const BTCActiveIndicator = memo(({ style, ...props }: TabsActiveIndicatorProps) => (
661
+ <PeriodSelectorActiveIndicator
662
+ {...props}
663
+ style={{ ...style, backgroundColor: `${assets.btc.color}1A` }}
664
+ />
665
+ ));
666
+
667
+ const AssetPriceDotted = memo(() => {
668
+ const [scrubIndex, setScrubIndex] = useState<number | undefined>(undefined);
669
+ const currentPrice =
670
+ sparklineInteractiveData.hour[sparklineInteractiveData.hour.length - 1].value;
671
+ const tabs = [
672
+ { id: 'hour', label: '1H' },
673
+ { id: 'day', label: '1D' },
674
+ { id: 'week', label: '1W' },
675
+ { id: 'month', label: '1M' },
676
+ { id: 'year', label: '1Y' },
677
+ { id: 'all', label: 'All' },
678
+ ];
679
+ const [timePeriod, setTimePeriod] = useState<TabValue>(tabs[0]);
680
+
681
+ const sparklineTimePeriodData = useMemo(() => {
682
+ return sparklineInteractiveData[timePeriod.id as keyof typeof sparklineInteractiveData];
683
+ }, [timePeriod]);
684
+
685
+ const sparklineTimePeriodDataValues = useMemo(() => {
686
+ return sparklineTimePeriodData.map((d) => d.value);
687
+ }, [sparklineTimePeriodData]);
688
+
689
+ const sparklineTimePeriodDataTimestamps = useMemo(() => {
690
+ return sparklineTimePeriodData.map((d) => d.date);
691
+ }, [sparklineTimePeriodData]);
692
+
693
+ const onPeriodChange = useCallback(
694
+ (period: TabValue | null) => {
695
+ setTimePeriod(period || tabs[0]);
696
+ },
697
+ [tabs, setTimePeriod],
698
+ );
699
+
700
+ const priceFormatter = useMemo(
701
+ () =>
702
+ new Intl.NumberFormat('en-US', {
703
+ style: 'currency',
704
+ currency: 'USD',
705
+ }),
706
+ [],
707
+ );
708
+
709
+ const scrubberPriceFormatter = useMemo(
710
+ () =>
711
+ new Intl.NumberFormat('en-US', {
712
+ minimumFractionDigits: 2,
713
+ maximumFractionDigits: 2,
714
+ }),
715
+ [],
716
+ );
717
+
718
+ const formatPrice = useCallback((price: number) => {
719
+ return priceFormatter.format(price);
720
+ }, [priceFormatter]);
721
+
722
+ const formatDate = useCallback((date: Date) => {
723
+ const dayOfWeek = date.toLocaleDateString('en-US', { weekday: 'short' });
724
+
725
+ const monthDay = date.toLocaleDateString('en-US', {
726
+ month: 'short',
727
+ day: 'numeric',
728
+ });
729
+
730
+ const time = date.toLocaleTimeString('en-US', {
731
+ hour: 'numeric',
732
+ minute: '2-digit',
733
+ hour12: true,
734
+ });
735
+
736
+ return `${dayOfWeek}, ${monthDay}, ${time}`;
737
+ }, []);
738
+
739
+ const scrubberLabel = useCallback(
740
+ (index: number) => {
741
+ const price = scrubberPriceFormatter.format(sparklineTimePeriodDataValues[index]);
742
+ const date = formatDate(sparklineTimePeriodDataTimestamps[index]);
743
+ return (
744
+ <>
745
+ <tspan style={{ fontWeight: 'bold' }}>{price} USD</tspan> {date}
746
+ </>
747
+ );
748
+ },
749
+ [scrubberPriceFormatter, sparklineTimePeriodDataValues, sparklineTimePeriodDataTimestamps, formatDate],
750
+ );
751
+
752
+ const accessibilityLabel = useCallback(
753
+ (index: number) => {
754
+ const price = scrubberPriceFormatter.format(sparklineTimePeriodDataValues[index]);
755
+ const date = formatDate(sparklineTimePeriodDataTimestamps[index]);
756
+ return `${price} USD ${date}`;
757
+ },
758
+ [scrubberPriceFormatter, sparklineTimePeriodDataValues, sparklineTimePeriodDataTimestamps, formatDate],
759
+ );
760
+
761
+ return (
762
+ <VStack gap={2}>
763
+ <SectionHeader
764
+ style={{ padding: 0 }}
765
+ title={<Text font="title1">Bitcoin</Text>}
766
+ balance={<Text font="title2">{formatPrice(currentPrice)}</Text>}
767
+ end={
768
+ <VStack justifyContent="center">
769
+ <RemoteImage source={assets.btc.imageUrl} size="xl" shape="circle" />
770
+ </VStack>
771
+ }
772
+ />
773
+ <LineChart
774
+ overflow="visible"
775
+ enableScrubbing
776
+ onScrubberPositionChange={setScrubIndex}
777
+ series={[
778
+ {
779
+ id: 'btc',
780
+ data: sparklineTimePeriodDataValues,
781
+ color: assets.btc.color,
782
+ },
783
+ ]}
784
+ showArea
785
+ areaType="dotted"
786
+ height={{ base: 150, tablet: 200, desktop: 250 }}
787
+ style={{ outlineColor: assets.btc.color }}
788
+ accessibilityLabel={scrubberLabel}
789
+ padding={{ left: 2, right: 2 }}
790
+ >
791
+ <Scrubber label={scrubberLabel} labelProps={{ elevation: 1 }} idlePulse />
792
+ </LineChart>
793
+ <PeriodSelector
794
+ TabComponent={BTCTab}
795
+ TabsActiveIndicatorComponent={BTCActiveIndicator}
796
+ tabs={tabs}
797
+ activeTab={timePeriod}
798
+ onChange={onPeriodChange}
799
+ />
800
+ </VStack>
801
+ )});
802
+
803
+ return <AssetPriceDotted />;
804
+ };
805
+ ```
806
+
807
+ #### Forecast Asset Price
808
+
809
+ ```jsx live
810
+ function ForecastAssetPrice() {
811
+ const ForecastAreaComponent = memo(
812
+ (props: AreaComponentProps) => (
813
+ <DottedArea {...props} peakOpacity={0.4} baselineOpacity={0.4} />
814
+ ),
815
+ );
816
+
817
+ const ForecastChart = memo(() => {
818
+ const [scrubIndex, setScrubIndex] = useState<number | undefined>(undefined);
819
+
820
+ const getDataFromSparkline = useCallback((startDate: Date) => {
821
+ const allData = sparklineInteractiveData.all;
822
+ if (!allData || allData.length === 0) return [];
823
+
824
+ const timelineData = allData.filter((point) => point.date >= startDate);
825
+
826
+ return timelineData.map((point) => ({
827
+ date: point.date,
828
+ value: point.value,
829
+ }));
830
+ }, []);
831
+
832
+ const historicalData = useMemo(() => getDataFromSparkline(new Date('2019-01-01')), [getDataFromSparkline]);
833
+
834
+ const annualGrowthRate = 10;
835
+
836
+ const generateForecastData = useCallback(
837
+ (lastDate: Date, lastPrice: number, growthRate: number) => {
838
+ const dailyGrowthRate = Math.pow(1 + growthRate / 100, 1 / 365) - 1;
839
+ const forecastData = [];
840
+ const fiveYearsFromNow = new Date(lastDate);
841
+ fiveYearsFromNow.setFullYear(fiveYearsFromNow.getFullYear() + 5);
842
+
843
+ // Generate daily forecast points for 5 years
844
+ const currentDate = new Date(lastDate);
845
+ let currentPrice = lastPrice;
846
+
847
+ while (currentDate <= fiveYearsFromNow) {
848
+ currentPrice = currentPrice * (1 + dailyGrowthRate * 10);
849
+ forecastData.push({
850
+ date: new Date(currentDate),
851
+ value: Math.round(currentPrice),
852
+ });
853
+ currentDate.setDate(currentDate.getDate() + 10);
854
+ }
855
+
856
+ return forecastData;
857
+ },
858
+ [],
859
+ );
860
+
861
+ const priceFormatter = useMemo(
862
+ () =>
863
+ new Intl.NumberFormat('en-US', {
864
+ minimumFractionDigits: 2,
865
+ maximumFractionDigits: 2,
866
+ }),
867
+ [],
868
+ );
869
+
870
+ const formatDate = useCallback((date: Date) => {
871
+ const dayOfWeek = date.toLocaleDateString('en-US', { weekday: 'short' });
872
+
873
+ const monthDay = date.toLocaleDateString('en-US', {
874
+ month: 'short',
875
+ day: 'numeric',
876
+ });
877
+
878
+ const time = date.toLocaleTimeString('en-US', {
879
+ hour: 'numeric',
880
+ minute: '2-digit',
881
+ hour12: true,
882
+ });
883
+
884
+ return `${dayOfWeek}, ${monthDay}, ${time}`;
885
+ }, []);
886
+
887
+ const forecastData = useMemo(() => {
888
+ if (historicalData.length === 0) return [];
889
+ const lastPoint = historicalData[historicalData.length - 1];
890
+ return generateForecastData(lastPoint.date, lastPoint.value, annualGrowthRate);
891
+ }, [generateForecastData, historicalData, annualGrowthRate]);
892
+
893
+ // Combine all data points with dates converted to timestamps for x-axis
894
+ const allDataPoints = useMemo(
895
+ () => [...historicalData, ...forecastData],
896
+ [historicalData, forecastData],
897
+ );
898
+
899
+ const historicalDataValues = useMemo(
900
+ () => historicalData.map((d) => d.value),
901
+ [historicalData],
902
+ );
903
+
904
+ const forecastDataValues = useMemo(
905
+ () => [...historicalData.map((d) => null), ...forecastData.map((d) => d.value)],
906
+ [historicalData, forecastData],
907
+ );
908
+
909
+ const xAxisData = useMemo(
910
+ () => allDataPoints.map((d) => d.date.getTime()),
911
+ [allDataPoints],
912
+ );
913
+
914
+ const scrubberLabel = useCallback(
915
+ (index: number) => {
916
+ const price = priceFormatter.format(allDataPoints[index].value);
917
+ const date = formatDate(allDataPoints[index].date);
918
+ return (
919
+ <>
920
+ <tspan style={{ fontWeight: 'bold' }}>{price} USD</tspan> {date}
921
+ </>
922
+ );
923
+ },
924
+ [priceFormatter, allDataPoints, formatDate],
925
+ );
926
+
927
+ const accessibilityLabel = useCallback(
928
+ (index: number) => {
929
+ const price = priceFormatter.format(allDataPoints[index].value);
930
+ const date = formatDate(allDataPoints[index].date);
931
+ return `${price} USD ${date}`;
932
+ },
933
+ [priceFormatter, allDataPoints, formatDate],
934
+ );
935
+
936
+ return (
937
+ <LineChart
938
+ overflow="visible"
939
+ animate={false}
940
+ enableScrubbing
941
+ showArea
942
+ showXAxis
943
+ AreaComponent={ForecastAreaComponent}
944
+ height={{ base: 150, tablet: 200, desktop: 250 }}
945
+ padding={{
946
+ top: 4,
947
+ left: 2,
948
+ right: 2,
949
+ bottom: 0,
950
+ }}
951
+ series={[
952
+ {
953
+ id: 'historical',
954
+ data: historicalDataValues,
955
+ color: assets.btc.color,
956
+ },
957
+ {
958
+ id: 'forecast',
959
+ data: forecastDataValues,
960
+ color: assets.btc.color,
961
+ type: 'dotted',
962
+ },
963
+ ]}
964
+ xAxis={{
965
+ data: xAxisData,
966
+ tickLabelFormatter: (value: number) => {
967
+ return new Date(value).toLocaleDateString('en-US', {
968
+ month: 'numeric',
969
+ year: 'numeric',
970
+ });
971
+ },
972
+ tickInterval: 2,
973
+ }}
974
+ accessibilityLabel={accessibilityLabel}
975
+ style={{ outlineColor: assets.btc.color }}
976
+ >
977
+ <Scrubber label={scrubberLabel} labelProps={{ elevation: 1 }} />
978
+ </LineChart>
979
+ );
980
+ });
981
+
982
+ return <ForecastChart />;
983
+ };
984
+ ```
985
+
986
+ #### Availability
987
+
988
+ ```jsx live
989
+ function AvailabilityChart() {
990
+ const [scrubIndex, setScrubIndex] = useState(undefined);
991
+
992
+ const availabilityEvents = [
993
+ {
994
+ date: new Date('2022-01-01'),
995
+ availability: 79,
996
+ },
997
+ {
998
+ date: new Date('2022-01-03'),
999
+ availability: 81,
1000
+ },
1001
+ {
1002
+ date: new Date('2022-01-04'),
1003
+ availability: 82,
1004
+ },
1005
+ {
1006
+ date: new Date('2022-01-06'),
1007
+ availability: 91,
1008
+ },
1009
+ {
1010
+ date: new Date('2022-01-07'),
1011
+ availability: 92,
1012
+ },
1013
+ {
1014
+ date: new Date('2022-01-10'),
1015
+ availability: 86,
1016
+ },
1017
+ ];
1018
+
1019
+ const accessibilityLabel = useMemo(() => {
1020
+ if (scrubIndex === undefined) return undefined;
1021
+ const event = availabilityEvents[scrubIndex];
1022
+ const formattedDate = event.date.toLocaleDateString('en-US', {
1023
+ weekday: 'short',
1024
+ month: 'short',
1025
+ day: 'numeric',
1026
+ year: 'numeric',
1027
+ });
1028
+ const status =
1029
+ event.availability >= 90 ? 'Good' : event.availability >= 85 ? 'Warning' : 'Critical';
1030
+ return `${formattedDate}: Availability ${event.availability}% - Status: ${status}`;
1031
+ }, [scrubIndex, availabilityEvents]);
1032
+
1033
+ const ChartDefs = memo(({ yellowThresholdPercentage = 85, greenThresholdPercentage = 90 }) => {
1034
+ const { drawingArea, height, series, getYScale, getYAxis } = useCartesianChartContext();
1035
+ const yScale = getYScale();
1036
+ const yAxis = getYAxis();
1037
+
1038
+ if (!series || !drawingArea || !yScale) return null;
1039
+
1040
+ const rangeBounds = yAxis?.domain;
1041
+ const rangeMin = rangeBounds?.min ?? 0;
1042
+ const rangeMax = rangeBounds?.max ?? 100;
1043
+
1044
+ // Calculate the Y positions in the chart coordinate system
1045
+ const yellowThresholdY = yScale(yellowThresholdPercentage) ?? 0;
1046
+ const greenThresholdY = yScale(greenThresholdPercentage) ?? 0;
1047
+ const minY = yScale(rangeMax) ?? 0; // Top of chart (max value)
1048
+ const maxY = yScale(rangeMin) ?? drawingArea.height; // Bottom of chart (min value)
1049
+
1050
+ // Calculate percentages based on actual chart positions
1051
+ const yellowThreshold = ((yellowThresholdY - minY) / (maxY - minY)) * 100;
1052
+ const greenThreshold = ((greenThresholdY - minY) / (maxY - minY)) * 100;
1053
+
1054
+ return (
1055
+ <defs>
1056
+ <linearGradient
1057
+ gradientUnits="userSpaceOnUse"
1058
+ id="availabilityGradient"
1059
+ x1="0%"
1060
+ x2="0%"
1061
+ y1={minY}
1062
+ y2={maxY}
1063
+ >
1064
+ <stop offset="0%" stopColor="var(--color-fgPositive)" />
1065
+ <stop offset={`${greenThreshold}%`} stopColor="var(--color-fgPositive)" />
1066
+ <stop offset={`${greenThreshold}%`} stopColor="var(--color-fgWarning)" />
1067
+ <stop offset={`${yellowThreshold}%`} stopColor="var(--color-fgWarning)" />
1068
+ <stop offset={`${yellowThreshold}%`} stopColor="var(--color-fgNegative)" />
1069
+ <stop offset="100%" stopColor="var(--color-fgNegative)" />
1070
+ </linearGradient>
1071
+ </defs>
1072
+ );
1073
+ });
1074
+
1075
+ return (
1076
+ <CartesianChart
1077
+ enableScrubbing
1078
+ onScrubberPositionChange={setScrubIndex}
1079
+ height={{ base: 150, tablet: 200, desktop: 250 }}
1080
+ series={[
1081
+ {
1082
+ id: 'availability',
1083
+ data: availabilityEvents.map((event) => event.availability),
1084
+ color: 'url(#availabilityGradient)',
1085
+ },
1086
+ ]}
1087
+ xAxis={{
1088
+ data: availabilityEvents.map((event) => event.date.getTime()),
1089
+ }}
1090
+ yAxis={{
1091
+ domain: ({ min, max }) => ({ min: Math.max(min - 2, 0), max: Math.min(max + 2, 100) }),
1092
+ }}
1093
+ padding={{ left: 2, right: 2 }}
1094
+ accessibilityLabel={accessibilityLabel}
1095
+ >
1096
+ <ChartDefs />
1097
+ <XAxis
1098
+ showGrid
1099
+ showLine
1100
+ showTickMarks
1101
+ tickLabelFormatter={(value) => new Date(value).toLocaleDateString()}
1102
+ />
1103
+ <YAxis
1104
+ showGrid
1105
+ showLine
1106
+ showTickMarks
1107
+ position="left"
1108
+ tickLabelFormatter={(value) => `${value}%`}
1109
+ />
1110
+ <Line
1111
+ curve="stepAfter"
1112
+ renderPoints={() => ({
1113
+ fill: 'var(--color-bg)',
1114
+ stroke: 'url(#availabilityGradient)',
1115
+ strokeWidth: 2,
1116
+ })}
1117
+ seriesId="availability"
1118
+ />
1119
+ <Scrubber hideOverlay />
1120
+ </CartesianChart>
1121
+ );
1122
+ }
1123
+ ```
1124
+
1125
+ #### Asset Price Widget
1126
+
1127
+ You can coordinate LineChart with custom styles to create a custom card that shows the latest price and percent change.
1128
+
1129
+ ```jsx live
1130
+ function BitcoinChartWithScrubberBeacon() {
1131
+ const { isPhone } = useBreakpoints();
1132
+ const prices = [...btcCandles].reverse().map((candle) => parseFloat(candle.close));
1133
+ const latestPrice = prices[prices.length - 1];
1134
+
1135
+ const formatPrice = (price: number) => {
1136
+ return new Intl.NumberFormat('en-US', {
1137
+ style: 'currency',
1138
+ currency: 'USD',
1139
+ }).format(price);
1140
+ };
1141
+
1142
+ const formatPercentChange = (price: number) => {
1143
+ return new Intl.NumberFormat('en-US', {
1144
+ style: 'percent',
1145
+ minimumFractionDigits: 2,
1146
+ maximumFractionDigits: 2,
1147
+ }).format(price);
1148
+ };
1149
+
1150
+ const percentChange = (latestPrice - prices[0]) / prices[0];
1151
+
1152
+ return (
1153
+ <VStack
1154
+ style={{
1155
+ background:
1156
+ 'linear-gradient(0deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.80) 100%), #ED702F',
1157
+ }}
1158
+ borderRadius={300}
1159
+ gap={2}
1160
+ padding={2}
1161
+ paddingBottom={0}
1162
+ overflow="hidden"
1163
+ >
1164
+ <HStack gap={2} alignItems="center">
1165
+ <RemoteImage source={assets.btc.imageUrl} size="xxl" shape="circle" aria-hidden />
1166
+ {!isPhone && (
1167
+ <VStack gap={0.25} flexGrow={1}>
1168
+ <Text font="title1" style={{ color: 'white' }} aria-hidden>
1169
+ BTC
1170
+ </Text>
1171
+ <Text font="label1" color="fgMuted">
1172
+ Bitcoin
1173
+ </Text>
1174
+ </VStack>
1175
+ )}
1176
+ <VStack gap={0.25} alignItems="flex-end" flexGrow={isPhone ? 1 : undefined}>
1177
+ <Text font="title1" style={{ color: 'white' }}>
1178
+ {formatPrice(latestPrice)}
1179
+ </Text>
1180
+ <Text font="label1" color="fgPositive" accessibilityLabel={`Up ${formatPercentChange(percentChange)}`}>
1181
+ +{formatPercentChange(percentChange)}
1182
+ </Text>
1183
+ </VStack>
1184
+ </HStack>
1185
+ <div
1186
+ style={{
1187
+ marginLeft: 'calc(-1 * var(--space-2))',
1188
+ marginRight: 'calc(-1 * var(--space-2))',
1189
+ }}
1190
+ >
1191
+ <LineChart
1192
+ inset={{ left: 0, right: 18, bottom: 0, top: 0 }}
1193
+ series={[
1194
+ {
1195
+ id: 'btcPrice',
1196
+ data: prices,
1197
+ color: assets.btc.color,
1198
+ },
1199
+ ]}
1200
+ showArea
1201
+ width="100%"
1202
+ height={92}
1203
+ >
1204
+ <Scrubber idlePulse styles={{ beacon: { stroke: 'white' } }} />
1205
+ </LineChart>
1206
+ </div>
1207
+ </VStack>
1208
+ );
1209
+ };
1210
+ ```
1211
+
1212
+ ## Props
1213
+
1214
+ | Prop | Type | Required | Default | Description |
1215
+ | --- | --- | --- | --- | --- |
1216
+ | `AreaComponent` | `AreaComponent` | No | `-` | Custom component to render line area fill. |
1217
+ | `LineComponent` | `LineComponent` | No | `-` | Component to render the line. Takes precedence over the type prop if provided. |
1218
+ | `accentHeight` | `string \| number` | No | `-` | - |
1219
+ | `accumulate` | `none \| sum` | No | `-` | - |
1220
+ | `additive` | `sum \| replace` | No | `-` | - |
1221
+ | `alignContent` | `ResponsiveProp<center \| end \| normal \| start \| flex-start \| flex-end \| space-between \| space-around \| space-evenly \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
1222
+ | `alignItems` | `ResponsiveProp<center \| end \| normal \| start \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| self-start \| self-end>` | No | `-` | - |
1223
+ | `alignSelf` | `ResponsiveProp<center \| end \| normal \| auto \| start \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| self-start \| self-end>` | No | `-` | - |
1224
+ | `alignmentBaseline` | `alphabetic \| hanging \| ideographic \| mathematical \| inherit \| auto \| baseline \| before-edge \| text-before-edge \| middle \| central \| after-edge \| text-after-edge` | No | `-` | - |
1225
+ | `allowReorder` | `no \| yes` | No | `-` | - |
1226
+ | `alphabetic` | `string \| number` | No | `-` | - |
1227
+ | `amplitude` | `string \| number` | No | `-` | - |
1228
+ | `animate` | `boolean` | No | `true` | Whether to animate the chart. |
1229
+ | `arabicForm` | `initial \| medial \| terminal \| isolated` | No | `-` | - |
1230
+ | `areaType` | `dotted \| solid \| gradient` | No | `'gradient'` | The type of area fill to add to the line. |
1231
+ | `as` | `svg` | No | `-` | - |
1232
+ | `ascent` | `string \| number` | No | `-` | - |
1233
+ | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1234
+ | `attributeName` | `string` | No | `-` | - |
1235
+ | `attributeType` | `string` | No | `-` | - |
1236
+ | `autoReverse` | `false \| true \| true \| false` | No | `-` | - |
1237
+ | `azimuth` | `string \| number` | No | `-` | - |
1238
+ | `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
1239
+ | `baseFrequency` | `string \| number` | No | `-` | - |
1240
+ | `baseProfile` | `string \| number` | No | `-` | - |
1241
+ | `baselineShift` | `string \| number` | No | `-` | - |
1242
+ | `bbox` | `string \| number` | No | `-` | - |
1243
+ | `begin` | `string \| number` | No | `-` | - |
1244
+ | `bias` | `string \| number` | No | `-` | - |
1245
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
1246
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
1247
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
1248
+ | `borderColor` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
1249
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
1250
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
1251
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
1252
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
1253
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
1254
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
1255
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
1256
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
1257
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
1258
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
1259
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
1260
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
1261
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
1262
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
1263
+ | `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
1264
+ | `by` | `string \| number` | No | `-` | - |
1265
+ | `calcMode` | `string \| number` | No | `-` | - |
1266
+ | `capHeight` | `string \| number` | No | `-` | - |
1267
+ | `className` | `string` | No | `-` | - |
1268
+ | `clip` | `string \| number` | No | `-` | - |
1269
+ | `clipPath` | `string` | No | `-` | - |
1270
+ | `clipPathUnits` | `string \| number` | No | `-` | - |
1271
+ | `clipRule` | `string \| number` | No | `-` | - |
1272
+ | `color` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
1273
+ | `colorInterpolation` | `string \| number` | No | `-` | - |
1274
+ | `colorInterpolationFilters` | `inherit \| auto \| sRGB \| linearRGB` | No | `-` | - |
1275
+ | `colorProfile` | `string \| number` | No | `-` | - |
1276
+ | `colorRendering` | `string \| number` | No | `-` | - |
1277
+ | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1278
+ | `contentScriptType` | `string \| number` | No | `-` | - |
1279
+ | `contentStyleType` | `string \| number` | No | `-` | - |
1280
+ | `crossOrigin` | ` \| anonymous \| use-credentials` | No | `-` | - |
1281
+ | `cursor` | `string \| number` | No | `-` | - |
1282
+ | `curve` | `bump \| catmullRom \| linear \| linearClosed \| monotone \| natural \| step \| stepBefore \| stepAfter` | No | `'linear'` | The curve interpolation method to use for the line. |
1283
+ | `cx` | `string \| number` | No | `-` | - |
1284
+ | `cy` | `string \| number` | No | `-` | - |
1285
+ | `d` | `string` | No | `-` | - |
1286
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
1287
+ | `decelerate` | `string \| number` | No | `-` | - |
1288
+ | `descent` | `string \| number` | No | `-` | - |
1289
+ | `diffuseConstant` | `string \| number` | No | `-` | - |
1290
+ | `direction` | `string \| number` | No | `-` | - |
1291
+ | `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
1292
+ | `divisor` | `string \| number` | No | `-` | - |
1293
+ | `dominantBaseline` | `string \| number` | No | `-` | - |
1294
+ | `dur` | `string \| number` | No | `-` | - |
1295
+ | `dx` | `string \| number` | No | `-` | - |
1296
+ | `dy` | `string \| number` | No | `-` | - |
1297
+ | `edgeMode` | `string \| number` | No | `-` | - |
1298
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | - |
1299
+ | `enableBackground` | `string \| number` | No | `-` | - |
1300
+ | `enableScrubbing` | `boolean` | No | `-` | Enables scrubbing interactions. When true, allows scrubbing and makes scrubber components interactive. |
1301
+ | `end` | `string \| number` | No | `-` | - |
1302
+ | `exponent` | `string \| number` | No | `-` | - |
1303
+ | `externalResourcesRequired` | `false \| true \| true \| false` | No | `-` | - |
1304
+ | `fill` | `string` | No | `-` | - |
1305
+ | `fillOpacity` | `string \| number` | No | `-` | - |
1306
+ | `fillRule` | `inherit \| nonzero \| evenodd` | No | `-` | - |
1307
+ | `filter` | `string` | No | `-` | - |
1308
+ | `filterRes` | `string \| number` | No | `-` | - |
1309
+ | `filterUnits` | `string \| number` | No | `-` | - |
1310
+ | `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
1311
+ | `flexDirection` | `ResponsiveProp<row \| row-reverse \| column \| column-reverse>` | No | `-` | - |
1312
+ | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
1313
+ | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
1314
+ | `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
1315
+ | `floodColor` | `string \| number` | No | `-` | - |
1316
+ | `floodOpacity` | `string \| number` | No | `-` | - |
1317
+ | `focusable` | `auto \| Booleanish` | No | `-` | - |
1318
+ | `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
1319
+ | `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
1320
+ | `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
1321
+ | `fontSizeAdjust` | `string \| number` | No | `-` | - |
1322
+ | `fontStretch` | `string \| number` | No | `-` | - |
1323
+ | `fontStyle` | `string \| number` | No | `-` | - |
1324
+ | `fontVariant` | `string \| number` | No | `-` | - |
1325
+ | `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
1326
+ | `format` | `string \| number` | No | `-` | - |
1327
+ | `fr` | `string \| number` | No | `-` | - |
1328
+ | `from` | `string \| number` | No | `-` | - |
1329
+ | `fx` | `string \| number` | No | `-` | - |
1330
+ | `fy` | `string \| number` | No | `-` | - |
1331
+ | `g1` | `string \| number` | No | `-` | - |
1332
+ | `g2` | `string \| number` | No | `-` | - |
1333
+ | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1334
+ | `glyphName` | `string \| number` | No | `-` | - |
1335
+ | `glyphOrientationHorizontal` | `string \| number` | No | `-` | - |
1336
+ | `glyphOrientationVertical` | `string \| number` | No | `-` | - |
1337
+ | `glyphRef` | `string \| number` | No | `-` | - |
1338
+ | `gradientTransform` | `string` | No | `-` | - |
1339
+ | `gradientUnits` | `string` | No | `-` | - |
1340
+ | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
1341
+ | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1342
+ | `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
1343
+ | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
1344
+ | `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
1345
+ | `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1346
+ | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1347
+ | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1348
+ | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1349
+ | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1350
+ | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1351
+ | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
1352
+ | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
1353
+ | `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
1354
+ | `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
1355
+ | `hanging` | `string \| number` | No | `-` | - |
1356
+ | `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
1357
+ | `horizAdvX` | `string \| number` | No | `-` | - |
1358
+ | `horizOriginX` | `string \| number` | No | `-` | - |
1359
+ | `href` | `string` | No | `-` | - |
1360
+ | `id` | `string` | No | `-` | - |
1361
+ | `ideographic` | `string \| number` | No | `-` | - |
1362
+ | `imageRendering` | `string \| number` | No | `-` | - |
1363
+ | `in` | `string` | No | `-` | - |
1364
+ | `in2` | `string \| number` | No | `-` | - |
1365
+ | `inset` | `number \| Partial<ChartInset>` | No | `-` | Inset around the entire chart (outside the axes). |
1366
+ | `intercept` | `string \| number` | No | `-` | - |
1367
+ | `justifyContent` | `ResponsiveProp<left \| right \| center \| end \| normal \| start \| flex-start \| flex-end \| space-between \| space-around \| space-evenly \| stretch>` | No | `-` | - |
1368
+ | `k` | `string \| number` | No | `-` | - |
1369
+ | `k1` | `string \| number` | No | `-` | - |
1370
+ | `k2` | `string \| number` | No | `-` | - |
1371
+ | `k3` | `string \| number` | No | `-` | - |
1372
+ | `k4` | `string \| number` | No | `-` | - |
1373
+ | `kernelMatrix` | `string \| number` | No | `-` | - |
1374
+ | `kernelUnitLength` | `string \| number` | No | `-` | - |
1375
+ | `kerning` | `string \| number` | No | `-` | - |
1376
+ | `key` | `Key \| null` | No | `-` | - |
1377
+ | `keyPoints` | `string \| number` | No | `-` | - |
1378
+ | `keySplines` | `string \| number` | No | `-` | - |
1379
+ | `keyTimes` | `string \| number` | No | `-` | - |
1380
+ | `lang` | `string` | No | `-` | - |
1381
+ | `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
1382
+ | `lengthAdjust` | `string \| number` | No | `-` | - |
1383
+ | `letterSpacing` | `string \| number` | No | `-` | - |
1384
+ | `lightingColor` | `string \| number` | No | `-` | - |
1385
+ | `limitingConeAngle` | `string \| number` | No | `-` | - |
1386
+ | `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
1387
+ | `local` | `string \| number` | No | `-` | - |
1388
+ | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1389
+ | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1390
+ | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1391
+ | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1392
+ | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1393
+ | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1394
+ | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
1395
+ | `markerEnd` | `string` | No | `-` | - |
1396
+ | `markerHeight` | `string \| number` | No | `-` | - |
1397
+ | `markerMid` | `string` | No | `-` | - |
1398
+ | `markerStart` | `string` | No | `-` | - |
1399
+ | `markerUnits` | `string \| number` | No | `-` | - |
1400
+ | `markerWidth` | `string \| number` | No | `-` | - |
1401
+ | `mask` | `string` | No | `-` | - |
1402
+ | `maskContentUnits` | `string \| number` | No | `-` | - |
1403
+ | `maskUnits` | `string \| number` | No | `-` | - |
1404
+ | `mathematical` | `string \| number` | No | `-` | - |
1405
+ | `max` | `string \| number` | No | `-` | - |
1406
+ | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
1407
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
1408
+ | `media` | `string` | No | `-` | - |
1409
+ | `method` | `string` | No | `-` | - |
1410
+ | `min` | `string \| number` | No | `-` | - |
1411
+ | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
1412
+ | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
1413
+ | `mode` | `string \| number` | No | `-` | - |
1414
+ | `name` | `string` | No | `-` | - |
1415
+ | `numOctaves` | `string \| number` | No | `-` | - |
1416
+ | `offset` | `string \| number` | No | `-` | - |
1417
+ | `onChange` | `FormEventHandler<SVGSVGElement>` | No | `-` | - |
1418
+ | `onPointClick` | `((event: MouseEvent<Element, MouseEvent>, point: { x: number; y: number; dataX: number; dataY: number; }) => void)` | No | `-` | Handler for when a dot is clicked. Automatically makes dots appear pressable when provided. |
1419
+ | `onScrubberPositionChange` | `((index: number) => void) \| undefined` | No | `-` | Callback fired when the scrubber position changes. Receives the dataIndex of the scrubber or undefined when not scrubbing. |
1420
+ | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
1421
+ | `operator` | `string \| number` | No | `-` | - |
1422
+ | `order` | `string \| number` | No | `-` | - |
1423
+ | `orient` | `string \| number` | No | `-` | - |
1424
+ | `orientation` | `string \| number` | No | `-` | - |
1425
+ | `origin` | `string \| number` | No | `-` | - |
1426
+ | `overflow` | `ResponsiveProp<clip \| auto \| visible \| hidden \| scroll>` | No | `-` | - |
1427
+ | `overlinePosition` | `string \| number` | No | `-` | - |
1428
+ | `overlineThickness` | `string \| number` | No | `-` | - |
1429
+ | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1430
+ | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1431
+ | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1432
+ | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1433
+ | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1434
+ | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1435
+ | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1436
+ | `paintOrder` | `string \| number` | No | `-` | - |
1437
+ | `panose1` | `string \| number` | No | `-` | - |
1438
+ | `path` | `string` | No | `-` | - |
1439
+ | `pathLength` | `string \| number` | No | `-` | - |
1440
+ | `patternContentUnits` | `string` | No | `-` | - |
1441
+ | `patternTransform` | `string \| number` | No | `-` | - |
1442
+ | `patternUnits` | `string` | No | `-` | - |
1443
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
1444
+ | `pointerEvents` | `string \| number` | No | `-` | - |
1445
+ | `points` | `string` | No | `-` | - |
1446
+ | `pointsAtX` | `string \| number` | No | `-` | - |
1447
+ | `pointsAtY` | `string \| number` | No | `-` | - |
1448
+ | `pointsAtZ` | `string \| number` | No | `-` | - |
1449
+ | `position` | `ResponsiveProp<static \| relative \| absolute \| fixed \| sticky>` | No | `-` | - |
1450
+ | `preserveAlpha` | `false \| true \| true \| false` | No | `-` | - |
1451
+ | `preserveAspectRatio` | `string` | No | `-` | - |
1452
+ | `primitiveUnits` | `string \| number` | No | `-` | - |
1453
+ | `r` | `string \| number` | No | `-` | - |
1454
+ | `radius` | `string \| number` | No | `-` | - |
1455
+ | `ref` | `((instance: SVGSVGElement \| null) => void) \| RefObject<SVGSVGElement> \| null` | No | `-` | - |
1456
+ | `refX` | `string \| number` | No | `-` | - |
1457
+ | `refY` | `string \| number` | No | `-` | - |
1458
+ | `renderPoints` | `((params: RenderPointsParams) => boolean \| PointConfig \| null) \| undefined` | No | `-` | Callback function to determine how to render points at each data point in the series. Called for every entry in the data array. |
1459
+ | `renderingIntent` | `string \| number` | No | `-` | - |
1460
+ | `repeatCount` | `string \| number` | No | `-` | - |
1461
+ | `repeatDur` | `string \| number` | No | `-` | - |
1462
+ | `requiredExtensions` | `string \| number` | No | `-` | - |
1463
+ | `requiredFeatures` | `string \| number` | No | `-` | - |
1464
+ | `restart` | `string \| number` | No | `-` | - |
1465
+ | `result` | `string` | No | `-` | - |
1466
+ | `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
1467
+ | `role` | `grid \| article \| button \| dialog \| figure \| form \| img \| link \| main \| menu \| menuitem \| option \| search \| table \| switch \| string & {} \| none \| row \| alert \| alertdialog \| application \| banner \| cell \| checkbox \| columnheader \| combobox \| complementary \| contentinfo \| definition \| directory \| document \| feed \| gridcell \| group \| heading \| list \| listbox \| listitem \| log \| marquee \| math \| menubar \| menuitemcheckbox \| menuitemradio \| navigation \| note \| presentation \| progressbar \| radio \| radiogroup \| region \| rowgroup \| rowheader \| scrollbar \| searchbox \| separator \| slider \| spinbutton \| status \| tab \| tablist \| tabpanel \| term \| textbox \| timer \| toolbar \| tooltip \| tree \| treegrid \| treeitem` | No | `-` | - |
1468
+ | `rotate` | `string \| number` | No | `-` | - |
1469
+ | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
1470
+ | `rx` | `string \| number` | No | `-` | - |
1471
+ | `ry` | `string \| number` | No | `-` | - |
1472
+ | `scale` | `string \| number` | No | `-` | - |
1473
+ | `seed` | `string \| number` | No | `-` | - |
1474
+ | `series` | `LineSeries[]` | No | `-` | Configuration objects that define how to visualize the data. Each series supports Line component props for individual customization. |
1475
+ | `shapeRendering` | `string \| number` | No | `-` | - |
1476
+ | `showArea` | `boolean` | No | `-` | Show area fill under the line. |
1477
+ | `showXAxis` | `boolean` | No | `-` | Whether to show the X axis. |
1478
+ | `showYAxis` | `boolean` | No | `-` | Whether to show the Y axis. |
1479
+ | `slope` | `string \| number` | No | `-` | - |
1480
+ | `spacing` | `string \| number` | No | `-` | - |
1481
+ | `specularConstant` | `string \| number` | No | `-` | - |
1482
+ | `specularExponent` | `string \| number` | No | `-` | - |
1483
+ | `speed` | `string \| number` | No | `-` | - |
1484
+ | `spreadMethod` | `string` | No | `-` | - |
1485
+ | `startOffset` | `string \| number` | No | `-` | - |
1486
+ | `stdDeviation` | `string \| number` | No | `-` | - |
1487
+ | `stemh` | `string \| number` | No | `-` | - |
1488
+ | `stemv` | `string \| number` | No | `-` | - |
1489
+ | `stitchTiles` | `string \| number` | No | `-` | - |
1490
+ | `stopColor` | `string` | No | `-` | - |
1491
+ | `stopOpacity` | `string \| number` | No | `-` | - |
1492
+ | `strikethroughPosition` | `string \| number` | No | `-` | - |
1493
+ | `strikethroughThickness` | `string \| number` | No | `-` | - |
1494
+ | `string` | `string \| number` | No | `-` | - |
1495
+ | `stroke` | `string` | No | `-` | - |
1496
+ | `strokeDasharray` | `string \| number` | No | `-` | - |
1497
+ | `strokeDashoffset` | `string \| number` | No | `-` | - |
1498
+ | `strokeLinecap` | `inherit \| butt \| round \| square` | No | `-` | - |
1499
+ | `strokeLinejoin` | `inherit \| round \| miter \| bevel` | No | `-` | - |
1500
+ | `strokeMiterlimit` | `string \| number` | No | `-` | - |
1501
+ | `strokeOpacity` | `string \| number` | No | `-` | - |
1502
+ | `strokeWidth` | `number` | No | `-` | - |
1503
+ | `style` | `CSSProperties` | No | `-` | - |
1504
+ | `suppressHydrationWarning` | `boolean` | No | `-` | - |
1505
+ | `surfaceScale` | `string \| number` | No | `-` | - |
1506
+ | `systemLanguage` | `string \| number` | No | `-` | - |
1507
+ | `tabIndex` | `number` | No | `-` | - |
1508
+ | `tableValues` | `string \| number` | No | `-` | - |
1509
+ | `target` | `string` | No | `-` | - |
1510
+ | `targetX` | `string \| number` | No | `-` | - |
1511
+ | `targetY` | `string \| number` | No | `-` | - |
1512
+ | `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
1513
+ | `textAlign` | `ResponsiveProp<center \| end \| start \| justify>` | No | `-` | - |
1514
+ | `textAnchor` | `string` | No | `-` | - |
1515
+ | `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
1516
+ | `textLength` | `string \| number` | No | `-` | - |
1517
+ | `textRendering` | `string \| number` | No | `-` | - |
1518
+ | `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
1519
+ | `to` | `string \| number` | No | `-` | - |
1520
+ | `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
1521
+ | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
1522
+ | `type` | `dotted \| solid \| gradient` | No | `'solid'` | The type of line to render. |
1523
+ | `u1` | `string \| number` | No | `-` | - |
1524
+ | `u2` | `string \| number` | No | `-` | - |
1525
+ | `underlinePosition` | `string \| number` | No | `-` | - |
1526
+ | `underlineThickness` | `string \| number` | No | `-` | - |
1527
+ | `unicode` | `string \| number` | No | `-` | - |
1528
+ | `unicodeBidi` | `string \| number` | No | `-` | - |
1529
+ | `unicodeRange` | `string \| number` | No | `-` | - |
1530
+ | `unitsPerEm` | `string \| number` | No | `-` | - |
1531
+ | `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
1532
+ | `vAlphabetic` | `string \| number` | No | `-` | - |
1533
+ | `vHanging` | `string \| number` | No | `-` | - |
1534
+ | `vIdeographic` | `string \| number` | No | `-` | - |
1535
+ | `vMathematical` | `string \| number` | No | `-` | - |
1536
+ | `values` | `string` | No | `-` | - |
1537
+ | `vectorEffect` | `string \| number` | No | `-` | - |
1538
+ | `version` | `string` | No | `-` | - |
1539
+ | `vertAdvY` | `string \| number` | No | `-` | - |
1540
+ | `vertOriginX` | `string \| number` | No | `-` | - |
1541
+ | `vertOriginY` | `string \| number` | No | `-` | - |
1542
+ | `viewBox` | `string` | No | `-` | - |
1543
+ | `viewTarget` | `string \| number` | No | `-` | - |
1544
+ | `visibility` | `ResponsiveProp<visible \| hidden>` | No | `-` | - |
1545
+ | `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
1546
+ | `widths` | `string \| number` | No | `-` | - |
1547
+ | `wordSpacing` | `string \| number` | No | `-` | - |
1548
+ | `writingMode` | `string \| number` | No | `-` | - |
1549
+ | `x` | `string \| number` | No | `-` | - |
1550
+ | `x1` | `string \| number` | No | `-` | - |
1551
+ | `x2` | `string \| number` | No | `-` | - |
1552
+ | `xAxis` | `(Partial<AxisConfigProps> & AxisBaseProps & { className?: string; classNames?: { root?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined; style?: CSSProperties \| undefined; styles?: { root?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined; } & { position?: top \| bottom \| undefined; height?: number \| undefined; }) \| undefined` | No | `-` | - |
1553
+ | `xChannelSelector` | `string` | No | `-` | - |
1554
+ | `xHeight` | `string \| number` | No | `-` | - |
1555
+ | `xlinkActuate` | `string` | No | `-` | - |
1556
+ | `xlinkArcrole` | `string` | No | `-` | - |
1557
+ | `xlinkHref` | `string` | No | `-` | - |
1558
+ | `xlinkRole` | `string` | No | `-` | - |
1559
+ | `xlinkShow` | `string` | No | `-` | - |
1560
+ | `xlinkTitle` | `string` | No | `-` | - |
1561
+ | `xlinkType` | `string` | No | `-` | - |
1562
+ | `xmlBase` | `string` | No | `-` | - |
1563
+ | `xmlLang` | `string` | No | `-` | - |
1564
+ | `xmlSpace` | `string` | No | `-` | - |
1565
+ | `xmlns` | `string` | No | `-` | - |
1566
+ | `xmlnsXlink` | `string` | No | `-` | - |
1567
+ | `y` | `string \| number` | No | `-` | - |
1568
+ | `y1` | `string \| number` | No | `-` | - |
1569
+ | `y2` | `string \| number` | No | `-` | - |
1570
+ | `yAxis` | `(Partial<AxisConfigProps> & AxisBaseProps & { className?: string; classNames?: { root?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined; style?: CSSProperties \| undefined; styles?: { root?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined; } & { axisId?: string \| undefined; position?: left \| right \| undefined; width?: number \| undefined; }) \| undefined` | No | `-` | - |
1571
+ | `yChannelSelector` | `string` | No | `-` | - |
1572
+ | `z` | `string \| number` | No | `-` | - |
1573
+ | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
1574
+ | `zoomAndPan` | `string` | No | `-` | - |
1575
+
1576
+