@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.
- package/CHANGELOG.md +8 -0
- package/mcp-docs/mobile/components/Accordion.txt +188 -0
- package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
- package/mcp-docs/mobile/components/Alert.txt +155 -0
- package/mcp-docs/mobile/components/AreaChart.txt +265 -0
- package/mcp-docs/mobile/components/Avatar.txt +195 -0
- package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
- package/mcp-docs/mobile/components/Banner.txt +221 -0
- package/mcp-docs/mobile/components/BarChart.txt +815 -0
- package/mcp-docs/mobile/components/Box.txt +173 -0
- package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
- package/mcp-docs/mobile/components/Button.txt +198 -0
- package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
- package/mcp-docs/mobile/components/Carousel.txt +1083 -0
- package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
- package/mcp-docs/mobile/components/CellMedia.txt +70 -0
- package/mcp-docs/mobile/components/Checkbox.txt +245 -0
- package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
- package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
- package/mcp-docs/mobile/components/Chip.txt +194 -0
- package/mcp-docs/mobile/components/Coachmark.txt +157 -0
- package/mcp-docs/mobile/components/Collapsible.txt +104 -0
- package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
- package/mcp-docs/mobile/components/ContentCard.txt +365 -0
- package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
- package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
- package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
- package/mcp-docs/mobile/components/ContentCell.txt +226 -0
- package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
- package/mcp-docs/mobile/components/DatePicker.txt +496 -0
- package/mcp-docs/mobile/components/Divider.txt +138 -0
- package/mcp-docs/mobile/components/DotCount.txt +145 -0
- package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
- package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
- package/mcp-docs/mobile/components/Fallback.txt +157 -0
- package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
- package/mcp-docs/mobile/components/HStack.txt +234 -0
- package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
- package/mcp-docs/mobile/components/Icon.txt +51 -0
- package/mcp-docs/mobile/components/IconButton.txt +268 -0
- package/mcp-docs/mobile/components/InputChip.txt +187 -0
- package/mcp-docs/mobile/components/Interactable.txt +186 -0
- package/mcp-docs/mobile/components/LineChart.txt +1324 -0
- package/mcp-docs/mobile/components/Link.txt +291 -0
- package/mcp-docs/mobile/components/ListCell.txt +412 -0
- package/mcp-docs/mobile/components/LogoMark.txt +84 -0
- package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
- package/mcp-docs/mobile/components/Lottie.txt +138 -0
- package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
- package/mcp-docs/mobile/components/Modal.txt +83 -0
- package/mcp-docs/mobile/components/ModalBody.txt +33 -0
- package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
- package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
- package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
- package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
- package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
- package/mcp-docs/mobile/components/Numpad.txt +340 -0
- package/mcp-docs/mobile/components/Overlay.txt +151 -0
- package/mcp-docs/mobile/components/PageFooter.txt +160 -0
- package/mcp-docs/mobile/components/PageHeader.txt +185 -0
- package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
- package/mcp-docs/mobile/components/Pictogram.txt +47 -0
- package/mcp-docs/mobile/components/Point.txt +204 -0
- package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
- package/mcp-docs/mobile/components/Pressable.txt +210 -0
- package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
- package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
- package/mcp-docs/mobile/components/Radio.txt +241 -0
- package/mcp-docs/mobile/components/RadioCell.txt +201 -0
- package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
- package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
- package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
- package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
- package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
- package/mcp-docs/mobile/components/Scrubber.txt +203 -0
- package/mcp-docs/mobile/components/SearchInput.txt +191 -0
- package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
- package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
- package/mcp-docs/mobile/components/Select.txt +211 -0
- package/mcp-docs/mobile/components/SelectChip.txt +323 -0
- package/mcp-docs/mobile/components/SelectOption.txt +84 -0
- package/mcp-docs/mobile/components/SlideButton.txt +330 -0
- package/mcp-docs/mobile/components/Spacer.txt +83 -0
- package/mcp-docs/mobile/components/Sparkline.txt +122 -0
- package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
- package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
- package/mcp-docs/mobile/components/Spinner.txt +48 -0
- package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
- package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
- package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
- package/mcp-docs/mobile/components/Stepper.txt +527 -0
- package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
- package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
- package/mcp-docs/mobile/components/Switch.txt +97 -0
- package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
- package/mcp-docs/mobile/components/TabLabel.txt +153 -0
- package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
- package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
- package/mcp-docs/mobile/components/Tabs.txt +190 -0
- package/mcp-docs/mobile/components/Tag.txt +300 -0
- package/mcp-docs/mobile/components/Text.txt +211 -0
- package/mcp-docs/mobile/components/TextInput.txt +717 -0
- package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
- package/mcp-docs/mobile/components/Toast.txt +196 -0
- package/mcp-docs/mobile/components/Tooltip.txt +59 -0
- package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
- package/mcp-docs/mobile/components/Tour.txt +158 -0
- package/mcp-docs/mobile/components/Tray.txt +252 -0
- package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
- package/mcp-docs/mobile/components/VStack.txt +222 -0
- package/mcp-docs/mobile/components/XAxis.txt +621 -0
- package/mcp-docs/mobile/components/YAxis.txt +567 -0
- package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
- package/mcp-docs/mobile/getting-started/installation.txt +57 -0
- package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
- package/mcp-docs/mobile/getting-started/playground.txt +28 -0
- package/mcp-docs/mobile/getting-started/styling.txt +84 -0
- package/mcp-docs/mobile/getting-started/theming.txt +286 -0
- package/mcp-docs/mobile/hooks/useDimensions.txt +72 -0
- package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +280 -0
- package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
- package/mcp-docs/mobile/hooks/useTheme.txt +321 -0
- package/mcp-docs/mobile/routes.txt +139 -0
- package/mcp-docs/web/components/Accordion.txt +189 -0
- package/mcp-docs/web/components/AccordionItem.txt +31 -0
- package/mcp-docs/web/components/Alert.txt +164 -0
- package/mcp-docs/web/components/AreaChart.txt +510 -0
- package/mcp-docs/web/components/Avatar.txt +211 -0
- package/mcp-docs/web/components/AvatarButton.txt +240 -0
- package/mcp-docs/web/components/Banner.txt +226 -0
- package/mcp-docs/web/components/BarChart.txt +1267 -0
- package/mcp-docs/web/components/Box.txt +175 -0
- package/mcp-docs/web/components/Button.txt +212 -0
- package/mcp-docs/web/components/ButtonGroup.txt +79 -0
- package/mcp-docs/web/components/Calendar.txt +181 -0
- package/mcp-docs/web/components/Carousel.txt +1575 -0
- package/mcp-docs/web/components/CartesianChart.txt +1044 -0
- package/mcp-docs/web/components/CellMedia.txt +56 -0
- package/mcp-docs/web/components/Checkbox.txt +188 -0
- package/mcp-docs/web/components/CheckboxCell.txt +202 -0
- package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
- package/mcp-docs/web/components/Chip.txt +196 -0
- package/mcp-docs/web/components/Coachmark.txt +188 -0
- package/mcp-docs/web/components/Collapsible.txt +119 -0
- package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
- package/mcp-docs/web/components/ContentCard.txt +367 -0
- package/mcp-docs/web/components/ContentCardBody.txt +137 -0
- package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
- package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
- package/mcp-docs/web/components/ContentCell.txt +219 -0
- package/mcp-docs/web/components/ControlGroup.txt +436 -0
- package/mcp-docs/web/components/DatePicker.txt +505 -0
- package/mcp-docs/web/components/Divider.txt +143 -0
- package/mcp-docs/web/components/DotCount.txt +149 -0
- package/mcp-docs/web/components/DotStatusColor.txt +58 -0
- package/mcp-docs/web/components/DotSymbol.txt +137 -0
- package/mcp-docs/web/components/Dropdown.txt +119 -0
- package/mcp-docs/web/components/Fallback.txt +163 -0
- package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
- package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
- package/mcp-docs/web/components/FullscreenModal.txt +145 -0
- package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
- package/mcp-docs/web/components/Grid.txt +236 -0
- package/mcp-docs/web/components/GridColumn.txt +209 -0
- package/mcp-docs/web/components/HStack.txt +236 -0
- package/mcp-docs/web/components/HeroSquare.txt +48 -0
- package/mcp-docs/web/components/Icon.txt +145 -0
- package/mcp-docs/web/components/IconButton.txt +390 -0
- package/mcp-docs/web/components/InputChip.txt +187 -0
- package/mcp-docs/web/components/Interactable.txt +193 -0
- package/mcp-docs/web/components/LineChart.txt +1576 -0
- package/mcp-docs/web/components/Link.txt +243 -0
- package/mcp-docs/web/components/ListCell.txt +418 -0
- package/mcp-docs/web/components/LogoMark.txt +84 -0
- package/mcp-docs/web/components/LogoWordMark.txt +93 -0
- package/mcp-docs/web/components/Lottie.txt +157 -0
- package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
- package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
- package/mcp-docs/web/components/Modal.txt +196 -0
- package/mcp-docs/web/components/ModalBody.txt +117 -0
- package/mcp-docs/web/components/ModalFooter.txt +119 -0
- package/mcp-docs/web/components/ModalHeader.txt +123 -0
- package/mcp-docs/web/components/MultiContentModule.txt +381 -0
- package/mcp-docs/web/components/NavigationBar.txt +102 -0
- package/mcp-docs/web/components/NavigationTitle.txt +25 -0
- package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
- package/mcp-docs/web/components/NudgeCard.txt +181 -0
- package/mcp-docs/web/components/Overlay.txt +171 -0
- package/mcp-docs/web/components/PageFooter.txt +184 -0
- package/mcp-docs/web/components/PageHeader.txt +243 -0
- package/mcp-docs/web/components/Pagination.txt +499 -0
- package/mcp-docs/web/components/PeriodSelector.txt +703 -0
- package/mcp-docs/web/components/Pictogram.txt +48 -0
- package/mcp-docs/web/components/Point.txt +460 -0
- package/mcp-docs/web/components/PortalProvider.txt +76 -0
- package/mcp-docs/web/components/Pressable.txt +193 -0
- package/mcp-docs/web/components/ProgressBar.txt +163 -0
- package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
- package/mcp-docs/web/components/ProgressCircle.txt +443 -0
- package/mcp-docs/web/components/Radio.txt +219 -0
- package/mcp-docs/web/components/RadioCell.txt +215 -0
- package/mcp-docs/web/components/RadioGroup.txt +288 -0
- package/mcp-docs/web/components/ReferenceLine.txt +451 -0
- package/mcp-docs/web/components/RemoteImage.txt +165 -0
- package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
- package/mcp-docs/web/components/RollingNumber.txt +1021 -0
- package/mcp-docs/web/components/Scrubber.txt +231 -0
- package/mcp-docs/web/components/SearchInput.txt +117 -0
- package/mcp-docs/web/components/SectionHeader.txt +217 -0
- package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
- package/mcp-docs/web/components/Select.txt +224 -0
- package/mcp-docs/web/components/SelectChip.txt +314 -0
- package/mcp-docs/web/components/SelectOption.txt +165 -0
- package/mcp-docs/web/components/Sidebar.txt +349 -0
- package/mcp-docs/web/components/SidebarItem.txt +131 -0
- package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
- package/mcp-docs/web/components/Spacer.txt +173 -0
- package/mcp-docs/web/components/Sparkline.txt +122 -0
- package/mcp-docs/web/components/SparklineGradient.txt +106 -0
- package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
- package/mcp-docs/web/components/Spinner.txt +128 -0
- package/mcp-docs/web/components/SpotIcon.txt +48 -0
- package/mcp-docs/web/components/SpotRectangle.txt +48 -0
- package/mcp-docs/web/components/SpotSquare.txt +48 -0
- package/mcp-docs/web/components/Stepper.txt +682 -0
- package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
- package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
- package/mcp-docs/web/components/Switch.txt +85 -0
- package/mcp-docs/web/components/TabIndicator.txt +48 -0
- package/mcp-docs/web/components/TabLabel.txt +158 -0
- package/mcp-docs/web/components/TabNavigation.txt +159 -0
- package/mcp-docs/web/components/TabbedChips.txt +155 -0
- package/mcp-docs/web/components/Table.txt +367 -0
- package/mcp-docs/web/components/TableBody.txt +83 -0
- package/mcp-docs/web/components/TableCaption.txt +102 -0
- package/mcp-docs/web/components/TableCell.txt +165 -0
- package/mcp-docs/web/components/TableCellFallback.txt +97 -0
- package/mcp-docs/web/components/TableFooter.txt +83 -0
- package/mcp-docs/web/components/TableHeader.txt +100 -0
- package/mcp-docs/web/components/TableRow.txt +140 -0
- package/mcp-docs/web/components/Tabs.txt +212 -0
- package/mcp-docs/web/components/Tag.txt +304 -0
- package/mcp-docs/web/components/Text.txt +232 -0
- package/mcp-docs/web/components/TextInput.txt +652 -0
- package/mcp-docs/web/components/ThemeProvider.txt +199 -0
- package/mcp-docs/web/components/TileButton.txt +158 -0
- package/mcp-docs/web/components/Toast.txt +203 -0
- package/mcp-docs/web/components/Tooltip.txt +89 -0
- package/mcp-docs/web/components/Tour.txt +179 -0
- package/mcp-docs/web/components/Tray.txt +288 -0
- package/mcp-docs/web/components/UpsellCard.txt +319 -0
- package/mcp-docs/web/components/VStack.txt +224 -0
- package/mcp-docs/web/components/XAxis.txt +619 -0
- package/mcp-docs/web/components/YAxis.txt +548 -0
- package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
- package/mcp-docs/web/getting-started/installation.txt +103 -0
- package/mcp-docs/web/getting-started/introduction.txt +102 -0
- package/mcp-docs/web/getting-started/playground.txt +28 -0
- package/mcp-docs/web/getting-started/styling.txt +161 -0
- package/mcp-docs/web/getting-started/templates.txt +121 -0
- package/mcp-docs/web/getting-started/theming.txt +426 -0
- package/mcp-docs/web/hooks/useBreakpoints.txt +61 -0
- package/mcp-docs/web/hooks/useDimensions.txt +114 -0
- package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
- package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
- package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
- package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
- package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/web/hooks/useRefMap.txt +178 -0
- package/mcp-docs/web/hooks/useScrollBlocker.txt +82 -0
- package/mcp-docs/web/hooks/useTheme.txt +364 -0
- package/mcp-docs/web/routes.txt +163 -0
- package/package.json +1 -1
|
@@ -0,0 +1,1267 @@
|
|
|
1
|
+
# BarChart
|
|
2
|
+
|
|
3
|
+
A bar chart component for comparing values across categories. Supports horizontal and vertical orientations, stacked bars, and grouped series.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { BarChart } from '@coinbase/cds-web-visualization'
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic Example
|
|
14
|
+
|
|
15
|
+
Bar charts are a useful component for comparing discrete categories of data.
|
|
16
|
+
They are helpful for highlighting trends to users or allowing them to compare proportions at a glance.
|
|
17
|
+
|
|
18
|
+
To start, pass in a series of data to the chart.
|
|
19
|
+
|
|
20
|
+
```jsx live
|
|
21
|
+
<BarChart
|
|
22
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
23
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
24
|
+
series={[
|
|
25
|
+
{
|
|
26
|
+
id: 'prices',
|
|
27
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
28
|
+
},
|
|
29
|
+
]}
|
|
30
|
+
curve="monotone"
|
|
31
|
+
showYAxis
|
|
32
|
+
yAxis={{
|
|
33
|
+
showGrid: true,
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Multiple Series
|
|
39
|
+
|
|
40
|
+
You can also provide multiple series of data to the chart. Series will have their bars for each data point rendered side by side.
|
|
41
|
+
|
|
42
|
+
```jsx live
|
|
43
|
+
function MonthlyGainsByAsset() {
|
|
44
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
45
|
+
|
|
46
|
+
const tickFormatter = useCallback(
|
|
47
|
+
(amount) =>
|
|
48
|
+
new Intl.NumberFormat('en-US', {
|
|
49
|
+
style: 'currency',
|
|
50
|
+
currency: 'USD',
|
|
51
|
+
}).format(amount),
|
|
52
|
+
[],
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<BarChart
|
|
57
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
58
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
59
|
+
series={[
|
|
60
|
+
{
|
|
61
|
+
id: 'btc',
|
|
62
|
+
data: [
|
|
63
|
+
345.82, 510.63, 280.19, 720.5, 655.37, 410.23, 580.96, 815.44, 740.18, 910.71, 975.02,
|
|
64
|
+
620.57,
|
|
65
|
+
],
|
|
66
|
+
color: assets.btc.color,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'eth',
|
|
70
|
+
data: [
|
|
71
|
+
270.49, 425.21, 190.75, 680.91, 610.88, 350.67, 440.11, 780.08, 705.83, 840.26, 920.65,
|
|
72
|
+
550.93,
|
|
73
|
+
],
|
|
74
|
+
color: assets.eth.color,
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
77
|
+
showYAxis
|
|
78
|
+
yAxis={{
|
|
79
|
+
showGrid: true,
|
|
80
|
+
GridLineComponent: ThinSolidLine,
|
|
81
|
+
tickLabelFormatter: tickFormatter,
|
|
82
|
+
width: 70,
|
|
83
|
+
}}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Series Stacking
|
|
90
|
+
|
|
91
|
+
You can also configure stacking for your chart using the `stacked` prop.
|
|
92
|
+
|
|
93
|
+
```jsx live
|
|
94
|
+
function MonthlyGainsByAsset() {
|
|
95
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
96
|
+
|
|
97
|
+
const tickFormatter = useCallback(
|
|
98
|
+
(amount) =>
|
|
99
|
+
new Intl.NumberFormat('en-US', {
|
|
100
|
+
style: 'currency',
|
|
101
|
+
currency: 'USD',
|
|
102
|
+
}).format(amount),
|
|
103
|
+
[],
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
return (
|
|
107
|
+
<BarChart
|
|
108
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
109
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
110
|
+
series={[
|
|
111
|
+
{
|
|
112
|
+
id: 'xrp',
|
|
113
|
+
data: [
|
|
114
|
+
170.22, 340.34, 305.98, 225.39, 250.76, 130.53, 115.81, 195.04, 210.28, 60.42, 120.94,
|
|
115
|
+
85.12,
|
|
116
|
+
],
|
|
117
|
+
color: assets.xrp.color,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: 'ltc',
|
|
121
|
+
data: [
|
|
122
|
+
450.77, 615.33, 355.68, 880.15, 810.99, 520.46, 590.29, 960.52, 910.07, 1020.41, 851.89,
|
|
123
|
+
750.61,
|
|
124
|
+
],
|
|
125
|
+
color: assets.ltc.color,
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: 'eth',
|
|
129
|
+
data: [
|
|
130
|
+
270.49, 425.21, 190.75, 680.91, 610.88, 350.67, 440.11, 780.08, 705.83, 840.26, 920.65,
|
|
131
|
+
550.93,
|
|
132
|
+
],
|
|
133
|
+
color: assets.eth.color,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
id: 'btc',
|
|
137
|
+
data: [
|
|
138
|
+
345.82, 510.63, 280.19, 720.5, 655.37, 410.23, 580.96, 815.44, 740.18, 910.71, 975.02,
|
|
139
|
+
620.57,
|
|
140
|
+
],
|
|
141
|
+
color: assets.btc.color,
|
|
142
|
+
},
|
|
143
|
+
]}
|
|
144
|
+
stacked
|
|
145
|
+
showYAxis
|
|
146
|
+
yAxis={{
|
|
147
|
+
showGrid: true,
|
|
148
|
+
GridLineComponent: ThinSolidLine,
|
|
149
|
+
tickLabelFormatter: tickFormatter,
|
|
150
|
+
width: 70,
|
|
151
|
+
}}
|
|
152
|
+
/>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
You can also configure multiple stacks by setting the `stackId` prop on each series.
|
|
158
|
+
|
|
159
|
+
```jsx live
|
|
160
|
+
function MonthlyGainsMultipleStacks() {
|
|
161
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
162
|
+
|
|
163
|
+
const tickFormatter = useCallback(
|
|
164
|
+
(amount) =>
|
|
165
|
+
new Intl.NumberFormat('en-US', {
|
|
166
|
+
style: 'currency',
|
|
167
|
+
currency: 'USD',
|
|
168
|
+
}).format(amount),
|
|
169
|
+
[],
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<BarChart
|
|
174
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
175
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
176
|
+
series={[
|
|
177
|
+
{
|
|
178
|
+
id: 'xrp',
|
|
179
|
+
data: [
|
|
180
|
+
170.22, 340.34, 305.98, 225.39, 250.76, 130.53, 115.81, 195.04, 210.28, 60.42, 120.94,
|
|
181
|
+
85.12,
|
|
182
|
+
],
|
|
183
|
+
color: assets.xrp.color,
|
|
184
|
+
stackId: 'shortTerm',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: 'ltc',
|
|
188
|
+
data: [
|
|
189
|
+
450.77, 615.33, 355.68, 880.15, 810.99, 520.46, 590.29, 960.52, 910.07, 1020.41, 851.89,
|
|
190
|
+
750.61,
|
|
191
|
+
],
|
|
192
|
+
color: assets.ltc.color,
|
|
193
|
+
stackId: 'shortTerm',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
id: 'eth',
|
|
197
|
+
data: [
|
|
198
|
+
270.49, 425.21, 190.75, 680.91, 610.88, 350.67, 440.11, 780.08, 705.83, 840.26, 920.65,
|
|
199
|
+
550.93,
|
|
200
|
+
],
|
|
201
|
+
color: assets.eth.color,
|
|
202
|
+
stackId: 'longTerm',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'btc',
|
|
206
|
+
data: [
|
|
207
|
+
345.82, 510.63, 280.19, 720.5, 655.37, 410.23, 580.96, 815.44, 740.18, 910.71, 975.02,
|
|
208
|
+
620.57,
|
|
209
|
+
],
|
|
210
|
+
color: assets.btc.color,
|
|
211
|
+
stackId: 'longTerm',
|
|
212
|
+
},
|
|
213
|
+
]}
|
|
214
|
+
stacked
|
|
215
|
+
showYAxis
|
|
216
|
+
yAxis={{
|
|
217
|
+
showGrid: true,
|
|
218
|
+
GridLineComponent: ThinSolidLine,
|
|
219
|
+
tickLabelFormatter: tickFormatter,
|
|
220
|
+
width: 70,
|
|
221
|
+
}}
|
|
222
|
+
/>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
#### Stack Gap
|
|
228
|
+
|
|
229
|
+
```jsx live
|
|
230
|
+
function MonthlyGainsByAsset() {
|
|
231
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
232
|
+
|
|
233
|
+
const tickFormatter = useCallback(
|
|
234
|
+
(amount) =>
|
|
235
|
+
new Intl.NumberFormat('en-US', {
|
|
236
|
+
style: 'currency',
|
|
237
|
+
currency: 'USD',
|
|
238
|
+
}).format(amount),
|
|
239
|
+
[],
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
return (
|
|
243
|
+
<BarChart
|
|
244
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
245
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
246
|
+
series={[
|
|
247
|
+
{
|
|
248
|
+
id: 'xrp',
|
|
249
|
+
data: [
|
|
250
|
+
170.22, 340.34, 305.98, 225.39, 250.76, 130.53, 115.81, 195.04, 210.28, 60.42, 120.94,
|
|
251
|
+
500,
|
|
252
|
+
],
|
|
253
|
+
color: assets.xrp.color,
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'ltc',
|
|
257
|
+
data: [
|
|
258
|
+
450.77, 615.33, 355.68, 880.15, 810.99, 520.46, 590.29, 960.52, 910.07, 1020.41, 851.89,
|
|
259
|
+
500,
|
|
260
|
+
],
|
|
261
|
+
color: assets.ltc.color,
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: 'eth',
|
|
265
|
+
data: [
|
|
266
|
+
270.49, 425.21, 190.75, 680.91, 610.88, 350.67, 440.11, 780.08, 705.83, 840.26, 920.65,
|
|
267
|
+
500,
|
|
268
|
+
],
|
|
269
|
+
color: assets.eth.color,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: 'btc',
|
|
273
|
+
data: [
|
|
274
|
+
345.82, 510.63, 280.19, 720.5, 655.37, 410.23, 580.96, 815.44, 740.18, 910.71, 975.02,
|
|
275
|
+
500,
|
|
276
|
+
],
|
|
277
|
+
color: assets.btc.color,
|
|
278
|
+
},
|
|
279
|
+
]}
|
|
280
|
+
stackGap={4}
|
|
281
|
+
stacked
|
|
282
|
+
showYAxis
|
|
283
|
+
yAxis={{
|
|
284
|
+
showGrid: true,
|
|
285
|
+
GridLineComponent: ThinSolidLine,
|
|
286
|
+
tickLabelFormatter: tickFormatter,
|
|
287
|
+
width: 70,
|
|
288
|
+
domainLimit: 'strict'
|
|
289
|
+
}}
|
|
290
|
+
/>
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Border Radius
|
|
296
|
+
|
|
297
|
+
Bars have a default border radius of `100`. You can change this by setting the `borderRadius` prop on the chart.
|
|
298
|
+
|
|
299
|
+
Stacks will only round the top corners of touching bars.
|
|
300
|
+
|
|
301
|
+
```jsx live
|
|
302
|
+
<BarChart
|
|
303
|
+
stacked
|
|
304
|
+
borderRadius={1000}
|
|
305
|
+
height={300}
|
|
306
|
+
maxWidth={400}
|
|
307
|
+
padding={0}
|
|
308
|
+
series={[
|
|
309
|
+
{ id: 'purple', data: [null, 6, 8, 10, 7, 6, 6, 8, 9, 12, 10, 4], color: '#b399ff' },
|
|
310
|
+
{ id: 'blue', data: [null, 10, 12, 11, 10, 9, 10, 11, 7, 4, 12, 18], color: '#4f7cff' },
|
|
311
|
+
{ id: 'cyan', data: [null, 7, 10, 12, 11, 10, 8, 11, 5, 12, 2, 9], color: '#00c2df' },
|
|
312
|
+
{
|
|
313
|
+
id: 'green',
|
|
314
|
+
data: [10, null, null, null, 1, null, null, 6, null, null, null, null],
|
|
315
|
+
color: '#33c481',
|
|
316
|
+
},
|
|
317
|
+
]}
|
|
318
|
+
showXAxis
|
|
319
|
+
xAxis={{
|
|
320
|
+
data: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
321
|
+
tickLabelFormatter: (value) => {
|
|
322
|
+
if (value === 'D') {
|
|
323
|
+
return <tspan style={{ fontWeight: 'bold' }}>{value}</tspan>;
|
|
324
|
+
}
|
|
325
|
+
return value;
|
|
326
|
+
},
|
|
327
|
+
}}
|
|
328
|
+
style={{ margin: '0 auto' }}
|
|
329
|
+
/>
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### Round Baseline
|
|
333
|
+
|
|
334
|
+
You can also round the baseline of the bars by setting the `roundBaseline` prop on the chart.
|
|
335
|
+
|
|
336
|
+
```jsx live
|
|
337
|
+
<BarChart
|
|
338
|
+
roundBaseline
|
|
339
|
+
stacked
|
|
340
|
+
borderRadius={1000}
|
|
341
|
+
height={300}
|
|
342
|
+
maxWidth={400}
|
|
343
|
+
padding={0}
|
|
344
|
+
series={[
|
|
345
|
+
{ id: 'purple', data: [null, 6, 8, 10, 7, 6, 6, 8, 9, 12, 10, 4], color: '#b399ff' },
|
|
346
|
+
{ id: 'blue', data: [null, 10, 12, 11, 10, 9, 10, 11, 7, 4, 12, 18], color: '#4f7cff' },
|
|
347
|
+
{ id: 'cyan', data: [null, 7, 10, 12, 11, 10, 8, 11, 5, 12, 2, 9], color: '#00c2df' },
|
|
348
|
+
{
|
|
349
|
+
id: 'green',
|
|
350
|
+
data: [10, null, null, null, 1, null, null, 6, null, null, null, null],
|
|
351
|
+
color: '#33c481',
|
|
352
|
+
},
|
|
353
|
+
]}
|
|
354
|
+
showXAxis
|
|
355
|
+
xAxis={{
|
|
356
|
+
data: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
357
|
+
tickLabelFormatter: (value) => {
|
|
358
|
+
if (value === 'D') {
|
|
359
|
+
return <tspan style={{ fontWeight: 'bold' }}>{value}</tspan>;
|
|
360
|
+
}
|
|
361
|
+
return value;
|
|
362
|
+
},
|
|
363
|
+
}}
|
|
364
|
+
style={{ margin: '0 auto' }}
|
|
365
|
+
/>
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Negative Data
|
|
369
|
+
|
|
370
|
+
```jsx live
|
|
371
|
+
function PositiveAndNegativeCashFlow() {
|
|
372
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
373
|
+
|
|
374
|
+
const categories = Array.from({ length: 31 }, (_, i) => `3/${i + 1}`);
|
|
375
|
+
const gains = [
|
|
376
|
+
5, 0, 6, 18, 0, 5, 12, 0, 12, 22, 28, 18, 0, 12, 6, 0, 0, 24, 0, 0, 4, 0, 18, 0, 0, 14, 10, 16,
|
|
377
|
+
0, 0, 0,
|
|
378
|
+
];
|
|
379
|
+
|
|
380
|
+
const losses = [
|
|
381
|
+
-4, 0, -8, -12, -6, 0, 0, 0, -18, 0, -12, 0, -9, -6, 0, 0, 0, 0, -22, -8, 0, 0, -10, -14, 0, 0,
|
|
382
|
+
0, 0, 0, -12, -10,
|
|
383
|
+
];
|
|
384
|
+
const series = [
|
|
385
|
+
{ id: 'gains', data: gains, color: 'var(--color-fgPositive)' },
|
|
386
|
+
{ id: 'losses', data: losses, color: 'var(--color-fgNegative)' },
|
|
387
|
+
];
|
|
388
|
+
|
|
389
|
+
return (
|
|
390
|
+
<BarChart
|
|
391
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
392
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
393
|
+
series={series}
|
|
394
|
+
xAxis={{ data: categories }}
|
|
395
|
+
stacked
|
|
396
|
+
showXAxis
|
|
397
|
+
showYAxis
|
|
398
|
+
yAxis={{
|
|
399
|
+
showGrid: true,
|
|
400
|
+
GridLineComponent: ThinSolidLine,
|
|
401
|
+
tickLabelFormatter: (value) => `$${value}M`,
|
|
402
|
+
}}
|
|
403
|
+
/>
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Missing Bars
|
|
409
|
+
|
|
410
|
+
You can pass in `null` or `0` values to not render a bar for that data point.
|
|
411
|
+
|
|
412
|
+
```jsx live
|
|
413
|
+
<BarChart
|
|
414
|
+
showXAxis
|
|
415
|
+
showYAxis
|
|
416
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
417
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
418
|
+
series={[
|
|
419
|
+
{
|
|
420
|
+
id: 'weekly-data',
|
|
421
|
+
data: [45, null, 38, 0, 19, null, 32],
|
|
422
|
+
},
|
|
423
|
+
]}
|
|
424
|
+
xAxis={{
|
|
425
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
426
|
+
showTickMarks: true,
|
|
427
|
+
showLine: true,
|
|
428
|
+
}}
|
|
429
|
+
yAxis={{
|
|
430
|
+
requestedTickCount: 5,
|
|
431
|
+
tickLabelFormatter: (value) => `$${value}k`,
|
|
432
|
+
showGrid: true,
|
|
433
|
+
showTickMarks: true,
|
|
434
|
+
showLine: true,
|
|
435
|
+
tickMarkSize: 1.5,
|
|
436
|
+
domain: { max: 50 },
|
|
437
|
+
}}
|
|
438
|
+
/>
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
You can also use the `BarStackComponent` prop to render an empty circle for zero values.
|
|
442
|
+
|
|
443
|
+
```jsx live
|
|
444
|
+
function MonthlyRewards() {
|
|
445
|
+
const months = ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'];
|
|
446
|
+
const currentMonth = 7;
|
|
447
|
+
const purple = [null, 6, 8, 10, 7, 6, 6, 8, null, null, null, null];
|
|
448
|
+
const blue = [null, 10, 12, 11, 10, 9, 10, 11, null, null, null, null];
|
|
449
|
+
const cyan = [null, 7, 10, 12, 11, 10, 8, 11, null, null, null, null];
|
|
450
|
+
const green = [10, null, null, null, 1, null, null, 6, null, null, null, null];
|
|
451
|
+
|
|
452
|
+
const series = [
|
|
453
|
+
{ id: 'purple', data: purple, color: '#b399ff' },
|
|
454
|
+
{ id: 'blue', data: blue, color: '#4f7cff' },
|
|
455
|
+
{ id: 'cyan', data: cyan, color: '#00c2df' },
|
|
456
|
+
{ id: 'green', data: green, color: '#33c481' },
|
|
457
|
+
];
|
|
458
|
+
|
|
459
|
+
const CustomBarStackComponent = ({ children, ...props }: BarStackComponentProps) => {
|
|
460
|
+
if (props.height === 0) {
|
|
461
|
+
const diameter = props.width;
|
|
462
|
+
return (
|
|
463
|
+
<Bar
|
|
464
|
+
roundBottom
|
|
465
|
+
roundTop
|
|
466
|
+
borderRadius={1000}
|
|
467
|
+
fill="var(--color-bgTertiary)"
|
|
468
|
+
height={diameter}
|
|
469
|
+
width={diameter}
|
|
470
|
+
x={props.x}
|
|
471
|
+
y={props.y - diameter}
|
|
472
|
+
/>
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
return <DefaultBarStack {...props}>{children}</DefaultBarStack>;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
return (
|
|
480
|
+
<BarChart
|
|
481
|
+
roundBaseline
|
|
482
|
+
showXAxis
|
|
483
|
+
stacked
|
|
484
|
+
BarStackComponent={CustomBarStackComponent}
|
|
485
|
+
borderRadius={1000}
|
|
486
|
+
height={300}
|
|
487
|
+
inset={0}
|
|
488
|
+
series={series}
|
|
489
|
+
showYAxis={false}
|
|
490
|
+
stackMinSize={3}
|
|
491
|
+
width={403}
|
|
492
|
+
xAxis={{
|
|
493
|
+
tickLabelFormatter: (index) => {
|
|
494
|
+
if (index == currentMonth) {
|
|
495
|
+
return <tspan style={{ fontWeight: 'bold' }}>{months[index]}</tspan>;
|
|
496
|
+
}
|
|
497
|
+
return months[index];
|
|
498
|
+
},
|
|
499
|
+
categoryPadding: 0.27,
|
|
500
|
+
}}
|
|
501
|
+
/>
|
|
502
|
+
);
|
|
503
|
+
};
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### Customization
|
|
507
|
+
|
|
508
|
+
#### Bar Spacing
|
|
509
|
+
|
|
510
|
+
There are two ways to control the spacing between bars. You can set the `barPadding` prop to control the spacing between bars within a series. You can also set the `categoryPadding` prop to control the spacing between stacks of bars.
|
|
511
|
+
|
|
512
|
+
```jsx live
|
|
513
|
+
<BarChart
|
|
514
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
515
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
516
|
+
series={[
|
|
517
|
+
{
|
|
518
|
+
id: 'pageViews',
|
|
519
|
+
data: [24, 13, 98, 39, 48, 38, 43],
|
|
520
|
+
color: 'var(--color-fgPositive)',
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
id: 'uniqueVisitors',
|
|
524
|
+
data: [12, 15, 18, 21, 24, 27, 30],
|
|
525
|
+
color: 'var(--color-fgNegative)',
|
|
526
|
+
},
|
|
527
|
+
]}
|
|
528
|
+
borderRadius={0}
|
|
529
|
+
barPadding={0}
|
|
530
|
+
showYAxis
|
|
531
|
+
yAxis={{
|
|
532
|
+
showGrid: true,
|
|
533
|
+
}}
|
|
534
|
+
xAxis={{
|
|
535
|
+
categoryPadding: 0.2,
|
|
536
|
+
}}
|
|
537
|
+
/>
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
#### Minimum Size
|
|
541
|
+
|
|
542
|
+
To better emphasize small values, you can set the `stackMinSize` or `barMinSize` prop to control the minimum size for entire stacks or individual bar.
|
|
543
|
+
It is recommended to only use `stackMinSize` for stacked charts and `barMinSize` for non-stacked charts.
|
|
544
|
+
|
|
545
|
+
##### Minimum Stack Size
|
|
546
|
+
|
|
547
|
+
You can set the `stackMinSize` prop to control the minimum size for entire stacks. This will only apply to stacks that have a value that is not `null` or `0`. It will proportionally scale the values of each bar in the stack to reach the minimum size.
|
|
548
|
+
|
|
549
|
+
```jsx live
|
|
550
|
+
<BarChart
|
|
551
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
552
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
553
|
+
series={[
|
|
554
|
+
{
|
|
555
|
+
id: 'pageViews',
|
|
556
|
+
data: [24, 3, 98, null, 48, null, 43],
|
|
557
|
+
color: 'var(--color-fgPositive)',
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
id: 'uniqueVisitors',
|
|
561
|
+
data: [12, 1, 18, null, 24, 1, 30],
|
|
562
|
+
color: 'var(--color-fgNegative)',
|
|
563
|
+
},
|
|
564
|
+
]}
|
|
565
|
+
stackMinSize={2}
|
|
566
|
+
stacked
|
|
567
|
+
showYAxis
|
|
568
|
+
yAxis={{
|
|
569
|
+
showGrid: true,
|
|
570
|
+
}}
|
|
571
|
+
/>
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
##### Minimum Bar Size
|
|
575
|
+
|
|
576
|
+
You can also set the `barMinSize` prop to control the minimum size for individual bars. This will only apply to bars that have a value that is not `null` or `0`.
|
|
577
|
+
|
|
578
|
+
```jsx live
|
|
579
|
+
<BarChart
|
|
580
|
+
showXAxis
|
|
581
|
+
showYAxis
|
|
582
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
583
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
584
|
+
series={[
|
|
585
|
+
{
|
|
586
|
+
id: 'weekly-data',
|
|
587
|
+
data: [45, 52, 0, 45, null, 1, 32],
|
|
588
|
+
},
|
|
589
|
+
]}
|
|
590
|
+
xAxis={{
|
|
591
|
+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
592
|
+
showTickMarks: true,
|
|
593
|
+
showLine: true,
|
|
594
|
+
}}
|
|
595
|
+
yAxis={{
|
|
596
|
+
requestedTickCount: 5,
|
|
597
|
+
tickLabelFormatter: (value) => `$${value}k`,
|
|
598
|
+
showGrid: true,
|
|
599
|
+
showTickMarks: true,
|
|
600
|
+
showLine: true,
|
|
601
|
+
tickMarkSize: 1.5,
|
|
602
|
+
domain: { max: 50 },
|
|
603
|
+
}}
|
|
604
|
+
barMinSize={4}
|
|
605
|
+
/>
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
#### Multiple Y Axes
|
|
609
|
+
|
|
610
|
+
You can render bars from separate y axes in one `BarPlot`, however they aren't able to be stack.
|
|
611
|
+
|
|
612
|
+
```jsx live
|
|
613
|
+
<VStack gap={2}>
|
|
614
|
+
<CartesianChart
|
|
615
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
616
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
617
|
+
series={[
|
|
618
|
+
{
|
|
619
|
+
id: 'revenue',
|
|
620
|
+
data: [455, 520, 380, 455, 285, 235],
|
|
621
|
+
yAxisId: 'revenue',
|
|
622
|
+
color: 'var(--color-accentBoldYellow)',
|
|
623
|
+
},
|
|
624
|
+
{
|
|
625
|
+
id: 'profitMargin',
|
|
626
|
+
data: [23, 20, 16, 38, 12, 9],
|
|
627
|
+
yAxisId: 'profitMargin',
|
|
628
|
+
color: 'var(--color-fgPositive)',
|
|
629
|
+
},
|
|
630
|
+
]}
|
|
631
|
+
xAxis={{
|
|
632
|
+
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
|
|
633
|
+
scaleType: 'band',
|
|
634
|
+
}}
|
|
635
|
+
yAxis={[
|
|
636
|
+
{
|
|
637
|
+
id: 'revenue',
|
|
638
|
+
domain: { min: 0 },
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: 'profitMargin',
|
|
642
|
+
domain: { min: 0, max: 100 },
|
|
643
|
+
},
|
|
644
|
+
]}
|
|
645
|
+
>
|
|
646
|
+
<XAxis showLine showTickMarks />
|
|
647
|
+
<YAxis
|
|
648
|
+
showGrid
|
|
649
|
+
showLine
|
|
650
|
+
showTickMarks
|
|
651
|
+
axisId="revenue"
|
|
652
|
+
position="left"
|
|
653
|
+
requestedTickCount={5}
|
|
654
|
+
width={60}
|
|
655
|
+
tickLabelFormatter={(value) => `$${value}k`}
|
|
656
|
+
/>
|
|
657
|
+
<YAxis
|
|
658
|
+
showLine
|
|
659
|
+
showTickMarks
|
|
660
|
+
axisId="profitMargin"
|
|
661
|
+
position="right"
|
|
662
|
+
requestedTickCount={5}
|
|
663
|
+
tickLabelFormatter={(value) => `${value}%`}
|
|
664
|
+
/>
|
|
665
|
+
<BarPlot />
|
|
666
|
+
</CartesianChart>
|
|
667
|
+
<HStack justifyContent="center" gap={2}>
|
|
668
|
+
<Box alignItems="center" gap={0.5}>
|
|
669
|
+
<Box
|
|
670
|
+
borderRadius={1000}
|
|
671
|
+
width={10}
|
|
672
|
+
height={10}
|
|
673
|
+
style={{ background: 'var(--color-accentBoldYellow)' }}
|
|
674
|
+
/>
|
|
675
|
+
<Text font="label2">Revenue ($)</Text>
|
|
676
|
+
</Box>
|
|
677
|
+
<Box alignItems="center" gap={0.5}>
|
|
678
|
+
<Box
|
|
679
|
+
borderRadius={1000}
|
|
680
|
+
width={10}
|
|
681
|
+
height={10}
|
|
682
|
+
style={{ background: 'var(--color-fgPositive)' }}
|
|
683
|
+
/>
|
|
684
|
+
<Text font="label2">Profit Margin (%)</Text>
|
|
685
|
+
</Box>
|
|
686
|
+
</HStack>
|
|
687
|
+
</VStack>
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
#### Custom Components
|
|
691
|
+
|
|
692
|
+
##### Candlesticks
|
|
693
|
+
|
|
694
|
+
You can set the `BarComponent` prop to render a custom component for bars.
|
|
695
|
+
|
|
696
|
+
```jsx live
|
|
697
|
+
function Candlesticks() {
|
|
698
|
+
const infoTextId = useId();
|
|
699
|
+
const infoTextRef = React.useRef<HTMLSpanElement>(null);
|
|
700
|
+
const selectedIndexRef = React.useRef<number | null>(null);
|
|
701
|
+
const stockData = btcCandles.slice(0, 90)
|
|
702
|
+
.reverse();
|
|
703
|
+
const min = Math.min(...stockData.map((data) => parseFloat(data.low)));
|
|
704
|
+
|
|
705
|
+
const ThinSolidLine = memo((props: SolidLineProps) => <SolidLine {...props} strokeWidth={1} />);
|
|
706
|
+
|
|
707
|
+
const candlesData = stockData.map((data) => [parseFloat(data.low), parseFloat(data.high)]) as [
|
|
708
|
+
number,
|
|
709
|
+
number,
|
|
710
|
+
][];
|
|
711
|
+
|
|
712
|
+
const CandlestickBarComponent = memo<BarComponentProps>(
|
|
713
|
+
({ x, y, width, height, originY, dataX, ...props }) => {
|
|
714
|
+
const { getYScale } = useCartesianChartContext();
|
|
715
|
+
const yScale = getYScale();
|
|
716
|
+
|
|
717
|
+
const wickX = x + width / 2;
|
|
718
|
+
|
|
719
|
+
const timePeriodValue = stockData[dataX as number];
|
|
720
|
+
|
|
721
|
+
const open = parseFloat(timePeriodValue.open);
|
|
722
|
+
const close = parseFloat(timePeriodValue.close);
|
|
723
|
+
|
|
724
|
+
const bullish = open < close;
|
|
725
|
+
const color = bullish ? 'var(--color-fgPositive)' : 'var(--color-fgNegative)';
|
|
726
|
+
const openY = yScale?.(open) ?? 0;
|
|
727
|
+
const closeY = yScale?.(close) ?? 0;
|
|
728
|
+
|
|
729
|
+
const bodyHeight = Math.abs(openY - closeY);
|
|
730
|
+
const bodyY = openY < closeY ? openY : closeY;
|
|
731
|
+
|
|
732
|
+
return (
|
|
733
|
+
<g>
|
|
734
|
+
<line stroke={color} strokeWidth={1} x1={wickX} x2={wickX} y1={y} y2={y + height} />
|
|
735
|
+
<rect fill={color} height={bodyHeight} width={width} x={x} y={bodyY} />
|
|
736
|
+
</g>
|
|
737
|
+
);
|
|
738
|
+
},
|
|
739
|
+
);
|
|
740
|
+
|
|
741
|
+
const formatPrice = React.useCallback((price: string) => {
|
|
742
|
+
return new Intl.NumberFormat('en-US', {
|
|
743
|
+
style: 'currency',
|
|
744
|
+
currency: 'USD',
|
|
745
|
+
}).format(parseFloat(price));
|
|
746
|
+
}, []);
|
|
747
|
+
|
|
748
|
+
const formatVolume = React.useCallback((volume: string) => {
|
|
749
|
+
const volumeInThousands = parseFloat(volume) / 1000;
|
|
750
|
+
return (
|
|
751
|
+
new Intl.NumberFormat('en-US', {
|
|
752
|
+
style: 'decimal',
|
|
753
|
+
minimumFractionDigits: 0,
|
|
754
|
+
maximumFractionDigits: 2,
|
|
755
|
+
}).format(volumeInThousands) + 'k'
|
|
756
|
+
);
|
|
757
|
+
}, []);
|
|
758
|
+
|
|
759
|
+
const formatTime = React.useCallback(
|
|
760
|
+
(index) => {
|
|
761
|
+
if (index === null || index === undefined || index >= stockData.length) return '';
|
|
762
|
+
const ts = parseInt(stockData[index].start);
|
|
763
|
+
return new Date(ts * 1000).toLocaleDateString('en-US', {
|
|
764
|
+
month: 'short',
|
|
765
|
+
day: 'numeric',
|
|
766
|
+
});
|
|
767
|
+
},
|
|
768
|
+
[stockData],
|
|
769
|
+
);
|
|
770
|
+
|
|
771
|
+
const updateInfoText = React.useCallback(
|
|
772
|
+
(index) => {
|
|
773
|
+
if (!infoTextRef.current) return;
|
|
774
|
+
|
|
775
|
+
const text =
|
|
776
|
+
index !== null && index !== undefined
|
|
777
|
+
? `Open: ${formatPrice(stockData[index].open)}, Close: ${formatPrice(
|
|
778
|
+
stockData[index].close,
|
|
779
|
+
)}, Volume: ${formatVolume(stockData[index].volume)}`
|
|
780
|
+
: formatPrice(stockData[stockData.length - 1].close);
|
|
781
|
+
|
|
782
|
+
infoTextRef.current.textContent = text;
|
|
783
|
+
selectedIndexRef.current = index;
|
|
784
|
+
},
|
|
785
|
+
[stockData, formatPrice, formatVolume],
|
|
786
|
+
);
|
|
787
|
+
const initialInfo = formatPrice(stockData[stockData.length - 1].close);
|
|
788
|
+
|
|
789
|
+
React.useEffect(() => {
|
|
790
|
+
updateInfoText(selectedIndexRef.current);
|
|
791
|
+
}, [stockData, updateInfoText]);
|
|
792
|
+
|
|
793
|
+
return (
|
|
794
|
+
<VStack gap={2}>
|
|
795
|
+
<Text font="headline" id={infoTextId} aria-live="polite">
|
|
796
|
+
<span ref={infoTextRef}>{initialInfo}</span>
|
|
797
|
+
</Text>
|
|
798
|
+
<BarChart
|
|
799
|
+
enableScrubbing
|
|
800
|
+
showXAxis
|
|
801
|
+
showYAxis
|
|
802
|
+
BarComponent={CandlestickBarComponent}
|
|
803
|
+
BarStackComponent={({ children }) => <g>{children}</g>}
|
|
804
|
+
animate={false}
|
|
805
|
+
borderRadius={0}
|
|
806
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
807
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
808
|
+
onScrubberPositionChange={updateInfoText}
|
|
809
|
+
series={[
|
|
810
|
+
{
|
|
811
|
+
id: 'stock-prices',
|
|
812
|
+
data: candlesData,
|
|
813
|
+
},
|
|
814
|
+
]}
|
|
815
|
+
xAxis={{
|
|
816
|
+
tickLabelFormatter: formatTime,
|
|
817
|
+
}}
|
|
818
|
+
yAxis={{
|
|
819
|
+
domain: { min },
|
|
820
|
+
tickLabelFormatter: formatPrice,
|
|
821
|
+
width: 92,
|
|
822
|
+
showGrid: true,
|
|
823
|
+
GridLineComponent: ThinSolidLine,
|
|
824
|
+
}}
|
|
825
|
+
aria-labelledby={infoTextId}
|
|
826
|
+
>
|
|
827
|
+
<Scrubber
|
|
828
|
+
hideOverlay
|
|
829
|
+
LineComponent={(props) => (
|
|
830
|
+
<ReferenceLine {...props} LineComponent={ThinSolidLine} />
|
|
831
|
+
)}
|
|
832
|
+
seriesIds={[]}
|
|
833
|
+
/>
|
|
834
|
+
</BarChart>
|
|
835
|
+
</VStack>
|
|
836
|
+
);
|
|
837
|
+
};
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
##### Outlined Stacks
|
|
841
|
+
|
|
842
|
+
You can set the `BarStackComponent` prop to render a custom component for stacks.
|
|
843
|
+
|
|
844
|
+
```jsx live
|
|
845
|
+
function MonthlyRewards() {
|
|
846
|
+
const CustomBarStackComponent = ({ children, ...props }: BarStackComponentProps) => {
|
|
847
|
+
return (
|
|
848
|
+
<>
|
|
849
|
+
<Bar
|
|
850
|
+
roundBottom
|
|
851
|
+
roundTop
|
|
852
|
+
borderRadius={1000}
|
|
853
|
+
stroke="var(--color-fg)"
|
|
854
|
+
strokeWidth={4}
|
|
855
|
+
height={props.height}
|
|
856
|
+
width={props.width}
|
|
857
|
+
x={props.x}
|
|
858
|
+
y={props.y}
|
|
859
|
+
clip
|
|
860
|
+
/>
|
|
861
|
+
<DefaultBarStack {...props}>{children}</DefaultBarStack>
|
|
862
|
+
</>
|
|
863
|
+
);
|
|
864
|
+
};
|
|
865
|
+
|
|
866
|
+
return (
|
|
867
|
+
<BarChart
|
|
868
|
+
roundBaseline
|
|
869
|
+
stacked
|
|
870
|
+
BarStackComponent={CustomBarStackComponent}
|
|
871
|
+
borderRadius={1000}
|
|
872
|
+
height={300}
|
|
873
|
+
maxWidth={400}
|
|
874
|
+
padding={0}
|
|
875
|
+
series={[
|
|
876
|
+
{ id: 'purple', data: [null, 6, 8, 10, 7, 6, 6, 8, 9, 12, 10, 4], color: '#b399ff' },
|
|
877
|
+
{ id: 'blue', data: [null, 10, 12, 11, 10, 9, 10, 11, 7, 4, 12, 18], color: '#4f7cff' },
|
|
878
|
+
{ id: 'cyan', data: [null, 7, 10, 12, 11, 10, 8, 11, 5, 12, 2, 9], color: '#00c2df' },
|
|
879
|
+
{
|
|
880
|
+
id: 'green',
|
|
881
|
+
data: [10, null, null, null, 1, null, null, 6, null, null, null, null],
|
|
882
|
+
color: '#33c481',
|
|
883
|
+
},
|
|
884
|
+
]}
|
|
885
|
+
showXAxis
|
|
886
|
+
xAxis={{
|
|
887
|
+
data: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
888
|
+
tickLabelFormatter: (value) => {
|
|
889
|
+
if (value === 'D') {
|
|
890
|
+
return <tspan style={{ fontWeight: 'bold' }}>{value}</tspan>;
|
|
891
|
+
}
|
|
892
|
+
return value;
|
|
893
|
+
},
|
|
894
|
+
}}
|
|
895
|
+
yAxis={{ range: ({ min, max }) => ({ min, max: max - 4 }) }}
|
|
896
|
+
style={{ margin: '0 auto' }}
|
|
897
|
+
/>
|
|
898
|
+
);
|
|
899
|
+
}
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
## Props
|
|
903
|
+
|
|
904
|
+
| Prop | Type | Required | Default | Description |
|
|
905
|
+
| --- | --- | --- | --- | --- |
|
|
906
|
+
| `BarComponent` | `BarComponent` | No | `-` | Component to render the bar. |
|
|
907
|
+
| `BarStackComponent` | `BarStackComponent` | No | `DefaultBarStack` | Custom component to render the stack container. Can be used to add clip paths, outlines, or other custom styling. |
|
|
908
|
+
| `accentHeight` | `string \| number` | No | `-` | - |
|
|
909
|
+
| `accumulate` | `none \| sum` | No | `-` | - |
|
|
910
|
+
| `additive` | `sum \| replace` | No | `-` | - |
|
|
911
|
+
| `alignContent` | `ResponsiveProp<center \| end \| normal \| start \| flex-start \| flex-end \| space-between \| space-around \| space-evenly \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
912
|
+
| `alignItems` | `ResponsiveProp<center \| end \| normal \| start \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| self-start \| self-end>` | No | `-` | - |
|
|
913
|
+
| `alignSelf` | `ResponsiveProp<center \| end \| normal \| auto \| start \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| self-start \| self-end>` | No | `-` | - |
|
|
914
|
+
| `alignmentBaseline` | `alphabetic \| hanging \| ideographic \| mathematical \| inherit \| auto \| baseline \| before-edge \| text-before-edge \| middle \| central \| after-edge \| text-after-edge` | No | `-` | - |
|
|
915
|
+
| `allowReorder` | `no \| yes` | No | `-` | - |
|
|
916
|
+
| `alphabetic` | `string \| number` | No | `-` | - |
|
|
917
|
+
| `amplitude` | `string \| number` | No | `-` | - |
|
|
918
|
+
| `animate` | `boolean` | No | `true` | Whether to animate the chart. |
|
|
919
|
+
| `arabicForm` | `initial \| medial \| terminal \| isolated` | No | `-` | - |
|
|
920
|
+
| `as` | `svg` | No | `-` | - |
|
|
921
|
+
| `ascent` | `string \| number` | No | `-` | - |
|
|
922
|
+
| `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
923
|
+
| `attributeName` | `string` | No | `-` | - |
|
|
924
|
+
| `attributeType` | `string` | No | `-` | - |
|
|
925
|
+
| `autoReverse` | `false \| true \| true \| false` | No | `-` | - |
|
|
926
|
+
| `azimuth` | `string \| number` | No | `-` | - |
|
|
927
|
+
| `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 | `-` | - |
|
|
928
|
+
| `barMinSize` | `number` | No | `-` | Minimum size for individual bars in the stack. |
|
|
929
|
+
| `barPadding` | `number` | No | `0.1` | Padding between bar groups (0-1). |
|
|
930
|
+
| `baseFrequency` | `string \| number` | No | `-` | - |
|
|
931
|
+
| `baseProfile` | `string \| number` | No | `-` | - |
|
|
932
|
+
| `baselineShift` | `string \| number` | No | `-` | - |
|
|
933
|
+
| `bbox` | `string \| number` | No | `-` | - |
|
|
934
|
+
| `begin` | `string \| number` | No | `-` | - |
|
|
935
|
+
| `bias` | `string \| number` | No | `-` | - |
|
|
936
|
+
| `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
937
|
+
| `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
938
|
+
| `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
939
|
+
| `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 | `-` | - |
|
|
940
|
+
| `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
941
|
+
| `borderRadius` | `((BorderRadius \| { base?: BorderRadius; phone?: BorderRadius \| undefined; tablet?: BorderRadius \| undefined; desktop?: BorderRadius \| undefined; }) & number) \| undefined` | No | `4` | Border radius of the bar. Border radius for the bar. |
|
|
942
|
+
| `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
943
|
+
| `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
944
|
+
| `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
945
|
+
| `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
946
|
+
| `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
947
|
+
| `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
|
|
948
|
+
| `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
|
|
949
|
+
| `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
|
|
950
|
+
| `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
|
|
951
|
+
| `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
|
|
952
|
+
| `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
|
|
953
|
+
| `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
|
|
954
|
+
| `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
|
|
955
|
+
| `by` | `string \| number` | No | `-` | - |
|
|
956
|
+
| `calcMode` | `string \| number` | No | `-` | - |
|
|
957
|
+
| `capHeight` | `string \| number` | No | `-` | - |
|
|
958
|
+
| `className` | `string` | No | `-` | - |
|
|
959
|
+
| `clip` | `string \| number` | No | `-` | - |
|
|
960
|
+
| `clipPath` | `string` | No | `-` | - |
|
|
961
|
+
| `clipPathUnits` | `string \| number` | No | `-` | - |
|
|
962
|
+
| `clipRule` | `string \| number` | No | `-` | - |
|
|
963
|
+
| `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 | `-` | - |
|
|
964
|
+
| `colorInterpolation` | `string \| number` | No | `-` | - |
|
|
965
|
+
| `colorInterpolationFilters` | `inherit \| auto \| sRGB \| linearRGB` | No | `-` | - |
|
|
966
|
+
| `colorProfile` | `string \| number` | No | `-` | - |
|
|
967
|
+
| `colorRendering` | `string \| number` | No | `-` | - |
|
|
968
|
+
| `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
969
|
+
| `contentScriptType` | `string \| number` | No | `-` | - |
|
|
970
|
+
| `contentStyleType` | `string \| number` | No | `-` | - |
|
|
971
|
+
| `crossOrigin` | ` \| anonymous \| use-credentials` | No | `-` | - |
|
|
972
|
+
| `cursor` | `string \| number` | No | `-` | - |
|
|
973
|
+
| `cx` | `string \| number` | No | `-` | - |
|
|
974
|
+
| `cy` | `string \| number` | No | `-` | - |
|
|
975
|
+
| `d` | `string` | No | `-` | - |
|
|
976
|
+
| `dangerouslySetBackground` | `string` | No | `-` | - |
|
|
977
|
+
| `decelerate` | `string \| number` | No | `-` | - |
|
|
978
|
+
| `descent` | `string \| number` | No | `-` | - |
|
|
979
|
+
| `diffuseConstant` | `string \| number` | No | `-` | - |
|
|
980
|
+
| `direction` | `string \| number` | No | `-` | - |
|
|
981
|
+
| `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
|
|
982
|
+
| `divisor` | `string \| number` | No | `-` | - |
|
|
983
|
+
| `dominantBaseline` | `string \| number` | No | `-` | - |
|
|
984
|
+
| `dur` | `string \| number` | No | `-` | - |
|
|
985
|
+
| `dx` | `string \| number` | No | `-` | - |
|
|
986
|
+
| `dy` | `string \| number` | No | `-` | - |
|
|
987
|
+
| `edgeMode` | `string \| number` | No | `-` | - |
|
|
988
|
+
| `elevation` | `0 \| 1 \| 2` | No | `-` | - |
|
|
989
|
+
| `enableBackground` | `string \| number` | No | `-` | - |
|
|
990
|
+
| `enableScrubbing` | `boolean` | No | `-` | Enables scrubbing interactions. When true, allows scrubbing and makes scrubber components interactive. |
|
|
991
|
+
| `end` | `string \| number` | No | `-` | - |
|
|
992
|
+
| `exponent` | `string \| number` | No | `-` | - |
|
|
993
|
+
| `externalResourcesRequired` | `false \| true \| true \| false` | No | `-` | - |
|
|
994
|
+
| `fill` | `string` | No | `-` | - |
|
|
995
|
+
| `fillOpacity` | `number` | No | `-` | Fill opacity for the bar. |
|
|
996
|
+
| `fillRule` | `inherit \| nonzero \| evenodd` | No | `-` | - |
|
|
997
|
+
| `filter` | `string` | No | `-` | - |
|
|
998
|
+
| `filterRes` | `string \| number` | No | `-` | - |
|
|
999
|
+
| `filterUnits` | `string \| number` | No | `-` | - |
|
|
1000
|
+
| `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
|
|
1001
|
+
| `flexDirection` | `ResponsiveProp<row \| row-reverse \| column \| column-reverse>` | No | `-` | - |
|
|
1002
|
+
| `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
|
|
1003
|
+
| `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
|
|
1004
|
+
| `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
|
|
1005
|
+
| `floodColor` | `string \| number` | No | `-` | - |
|
|
1006
|
+
| `floodOpacity` | `string \| number` | No | `-` | - |
|
|
1007
|
+
| `focusable` | `auto \| Booleanish` | No | `-` | - |
|
|
1008
|
+
| `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
1009
|
+
| `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
1010
|
+
| `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
|
|
1011
|
+
| `fontSizeAdjust` | `string \| number` | No | `-` | - |
|
|
1012
|
+
| `fontStretch` | `string \| number` | No | `-` | - |
|
|
1013
|
+
| `fontStyle` | `string \| number` | No | `-` | - |
|
|
1014
|
+
| `fontVariant` | `string \| number` | No | `-` | - |
|
|
1015
|
+
| `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
|
|
1016
|
+
| `format` | `string \| number` | No | `-` | - |
|
|
1017
|
+
| `fr` | `string \| number` | No | `-` | - |
|
|
1018
|
+
| `from` | `string \| number` | No | `-` | - |
|
|
1019
|
+
| `fx` | `string \| number` | No | `-` | - |
|
|
1020
|
+
| `fy` | `string \| number` | No | `-` | - |
|
|
1021
|
+
| `g1` | `string \| number` | No | `-` | - |
|
|
1022
|
+
| `g2` | `string \| number` | No | `-` | - |
|
|
1023
|
+
| `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1024
|
+
| `glyphName` | `string \| number` | No | `-` | - |
|
|
1025
|
+
| `glyphOrientationHorizontal` | `string \| number` | No | `-` | - |
|
|
1026
|
+
| `glyphOrientationVertical` | `string \| number` | No | `-` | - |
|
|
1027
|
+
| `glyphRef` | `string \| number` | No | `-` | - |
|
|
1028
|
+
| `gradientTransform` | `string` | No | `-` | - |
|
|
1029
|
+
| `gradientUnits` | `string` | No | `-` | - |
|
|
1030
|
+
| `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
|
|
1031
|
+
| `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1032
|
+
| `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
|
|
1033
|
+
| `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
|
|
1034
|
+
| `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
|
|
1035
|
+
| `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1036
|
+
| `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1037
|
+
| `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1038
|
+
| `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1039
|
+
| `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1040
|
+
| `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1041
|
+
| `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
|
|
1042
|
+
| `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
|
|
1043
|
+
| `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
|
|
1044
|
+
| `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
|
|
1045
|
+
| `hanging` | `string \| number` | No | `-` | - |
|
|
1046
|
+
| `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
|
|
1047
|
+
| `horizAdvX` | `string \| number` | No | `-` | - |
|
|
1048
|
+
| `horizOriginX` | `string \| number` | No | `-` | - |
|
|
1049
|
+
| `href` | `string` | No | `-` | - |
|
|
1050
|
+
| `id` | `string` | No | `-` | - |
|
|
1051
|
+
| `ideographic` | `string \| number` | No | `-` | - |
|
|
1052
|
+
| `imageRendering` | `string \| number` | No | `-` | - |
|
|
1053
|
+
| `in` | `string` | No | `-` | - |
|
|
1054
|
+
| `in2` | `string \| number` | No | `-` | - |
|
|
1055
|
+
| `inset` | `number \| Partial<ChartInset>` | No | `-` | Inset around the entire chart (outside the axes). |
|
|
1056
|
+
| `intercept` | `string \| number` | No | `-` | - |
|
|
1057
|
+
| `justifyContent` | `ResponsiveProp<left \| right \| center \| end \| normal \| start \| flex-start \| flex-end \| space-between \| space-around \| space-evenly \| stretch>` | No | `-` | - |
|
|
1058
|
+
| `k` | `string \| number` | No | `-` | - |
|
|
1059
|
+
| `k1` | `string \| number` | No | `-` | - |
|
|
1060
|
+
| `k2` | `string \| number` | No | `-` | - |
|
|
1061
|
+
| `k3` | `string \| number` | No | `-` | - |
|
|
1062
|
+
| `k4` | `string \| number` | No | `-` | - |
|
|
1063
|
+
| `kernelMatrix` | `string \| number` | No | `-` | - |
|
|
1064
|
+
| `kernelUnitLength` | `string \| number` | No | `-` | - |
|
|
1065
|
+
| `kerning` | `string \| number` | No | `-` | - |
|
|
1066
|
+
| `key` | `Key \| null` | No | `-` | - |
|
|
1067
|
+
| `keyPoints` | `string \| number` | No | `-` | - |
|
|
1068
|
+
| `keySplines` | `string \| number` | No | `-` | - |
|
|
1069
|
+
| `keyTimes` | `string \| number` | No | `-` | - |
|
|
1070
|
+
| `lang` | `string` | No | `-` | - |
|
|
1071
|
+
| `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
|
|
1072
|
+
| `lengthAdjust` | `string \| number` | No | `-` | - |
|
|
1073
|
+
| `letterSpacing` | `string \| number` | No | `-` | - |
|
|
1074
|
+
| `lightingColor` | `string \| number` | No | `-` | - |
|
|
1075
|
+
| `limitingConeAngle` | `string \| number` | No | `-` | - |
|
|
1076
|
+
| `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
|
|
1077
|
+
| `local` | `string \| number` | No | `-` | - |
|
|
1078
|
+
| `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1079
|
+
| `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1080
|
+
| `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1081
|
+
| `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1082
|
+
| `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1083
|
+
| `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1084
|
+
| `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
1085
|
+
| `markerEnd` | `string` | No | `-` | - |
|
|
1086
|
+
| `markerHeight` | `string \| number` | No | `-` | - |
|
|
1087
|
+
| `markerMid` | `string` | No | `-` | - |
|
|
1088
|
+
| `markerStart` | `string` | No | `-` | - |
|
|
1089
|
+
| `markerUnits` | `string \| number` | No | `-` | - |
|
|
1090
|
+
| `markerWidth` | `string \| number` | No | `-` | - |
|
|
1091
|
+
| `mask` | `string` | No | `-` | - |
|
|
1092
|
+
| `maskContentUnits` | `string \| number` | No | `-` | - |
|
|
1093
|
+
| `maskUnits` | `string \| number` | No | `-` | - |
|
|
1094
|
+
| `mathematical` | `string \| number` | No | `-` | - |
|
|
1095
|
+
| `max` | `string \| number` | No | `-` | - |
|
|
1096
|
+
| `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
|
|
1097
|
+
| `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
|
|
1098
|
+
| `media` | `string` | No | `-` | - |
|
|
1099
|
+
| `method` | `string` | No | `-` | - |
|
|
1100
|
+
| `min` | `string \| number` | No | `-` | - |
|
|
1101
|
+
| `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
|
|
1102
|
+
| `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
|
|
1103
|
+
| `mode` | `string \| number` | No | `-` | - |
|
|
1104
|
+
| `name` | `string` | No | `-` | - |
|
|
1105
|
+
| `numOctaves` | `string \| number` | No | `-` | - |
|
|
1106
|
+
| `offset` | `string \| number` | No | `-` | - |
|
|
1107
|
+
| `onChange` | `FormEventHandler<SVGSVGElement>` | No | `-` | - |
|
|
1108
|
+
| `onScrubberPositionChange` | `((index: number) => void) \| undefined` | No | `-` | Callback fired when the scrubber position changes. Receives the dataIndex of the scrubber or undefined when not scrubbing. |
|
|
1109
|
+
| `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
|
|
1110
|
+
| `operator` | `string \| number` | No | `-` | - |
|
|
1111
|
+
| `order` | `string \| number` | No | `-` | - |
|
|
1112
|
+
| `orient` | `string \| number` | No | `-` | - |
|
|
1113
|
+
| `orientation` | `string \| number` | No | `-` | - |
|
|
1114
|
+
| `origin` | `string \| number` | No | `-` | - |
|
|
1115
|
+
| `overflow` | `ResponsiveProp<clip \| auto \| visible \| hidden \| scroll>` | No | `-` | - |
|
|
1116
|
+
| `overlinePosition` | `string \| number` | No | `-` | - |
|
|
1117
|
+
| `overlineThickness` | `string \| number` | No | `-` | - |
|
|
1118
|
+
| `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1119
|
+
| `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1120
|
+
| `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1121
|
+
| `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1122
|
+
| `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1123
|
+
| `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1124
|
+
| `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1125
|
+
| `paintOrder` | `string \| number` | No | `-` | - |
|
|
1126
|
+
| `panose1` | `string \| number` | No | `-` | - |
|
|
1127
|
+
| `path` | `string` | No | `-` | - |
|
|
1128
|
+
| `pathLength` | `string \| number` | No | `-` | - |
|
|
1129
|
+
| `patternContentUnits` | `string` | No | `-` | - |
|
|
1130
|
+
| `patternTransform` | `string \| number` | No | `-` | - |
|
|
1131
|
+
| `patternUnits` | `string` | No | `-` | - |
|
|
1132
|
+
| `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
|
|
1133
|
+
| `pointerEvents` | `string \| number` | No | `-` | - |
|
|
1134
|
+
| `points` | `string` | No | `-` | - |
|
|
1135
|
+
| `pointsAtX` | `string \| number` | No | `-` | - |
|
|
1136
|
+
| `pointsAtY` | `string \| number` | No | `-` | - |
|
|
1137
|
+
| `pointsAtZ` | `string \| number` | No | `-` | - |
|
|
1138
|
+
| `position` | `ResponsiveProp<static \| relative \| absolute \| fixed \| sticky>` | No | `-` | - |
|
|
1139
|
+
| `preserveAlpha` | `false \| true \| true \| false` | No | `-` | - |
|
|
1140
|
+
| `preserveAspectRatio` | `string` | No | `-` | - |
|
|
1141
|
+
| `primitiveUnits` | `string \| number` | No | `-` | - |
|
|
1142
|
+
| `r` | `string \| number` | No | `-` | - |
|
|
1143
|
+
| `radius` | `string \| number` | No | `-` | - |
|
|
1144
|
+
| `ref` | `((instance: SVGSVGElement \| null) => void) \| RefObject<SVGSVGElement> \| null` | No | `-` | - |
|
|
1145
|
+
| `refX` | `string \| number` | No | `-` | - |
|
|
1146
|
+
| `refY` | `string \| number` | No | `-` | - |
|
|
1147
|
+
| `renderingIntent` | `string \| number` | No | `-` | - |
|
|
1148
|
+
| `repeatCount` | `string \| number` | No | `-` | - |
|
|
1149
|
+
| `repeatDur` | `string \| number` | No | `-` | - |
|
|
1150
|
+
| `requiredExtensions` | `string \| number` | No | `-` | - |
|
|
1151
|
+
| `requiredFeatures` | `string \| number` | No | `-` | - |
|
|
1152
|
+
| `restart` | `string \| number` | No | `-` | - |
|
|
1153
|
+
| `result` | `string` | No | `-` | - |
|
|
1154
|
+
| `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
|
|
1155
|
+
| `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 | `-` | - |
|
|
1156
|
+
| `rotate` | `string \| number` | No | `-` | - |
|
|
1157
|
+
| `roundBaseline` | `boolean` | No | `-` | Whether to round the baseline of a bar (where the value is 0). |
|
|
1158
|
+
| `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
|
|
1159
|
+
| `rx` | `string \| number` | No | `-` | - |
|
|
1160
|
+
| `ry` | `string \| number` | No | `-` | - |
|
|
1161
|
+
| `scale` | `string \| number` | No | `-` | - |
|
|
1162
|
+
| `seed` | `string \| number` | No | `-` | - |
|
|
1163
|
+
| `series` | `BarSeries[]` | No | `-` | Configuration objects that define how to visualize the data. Each series supports Bar component props for individual customization. |
|
|
1164
|
+
| `shapeRendering` | `string \| number` | No | `-` | - |
|
|
1165
|
+
| `showXAxis` | `boolean` | No | `-` | Whether to show the X axis. |
|
|
1166
|
+
| `showYAxis` | `boolean` | No | `-` | Whether to show the Y axis. |
|
|
1167
|
+
| `slope` | `string \| number` | No | `-` | - |
|
|
1168
|
+
| `spacing` | `string \| number` | No | `-` | - |
|
|
1169
|
+
| `specularConstant` | `string \| number` | No | `-` | - |
|
|
1170
|
+
| `specularExponent` | `string \| number` | No | `-` | - |
|
|
1171
|
+
| `speed` | `string \| number` | No | `-` | - |
|
|
1172
|
+
| `spreadMethod` | `string` | No | `-` | - |
|
|
1173
|
+
| `stackGap` | `number` | No | `-` | Gap between bars in the stack. |
|
|
1174
|
+
| `stackMinSize` | `number` | No | `-` | Minimum size for the entire stack. |
|
|
1175
|
+
| `stacked` | `boolean` | No | `-` | Whether to stack the areas on top of each other. When true, each series builds cumulative values on top of the previous series. **Note**: Only applies to series data containing singular numbers (e.g., [10, 20, 30]). Series with start & end value tuples (e.g., [[0, 10], [5, 20]]) will be skipped during stacking and rendered as-is. |
|
|
1176
|
+
| `startOffset` | `string \| number` | No | `-` | - |
|
|
1177
|
+
| `stdDeviation` | `string \| number` | No | `-` | - |
|
|
1178
|
+
| `stemh` | `string \| number` | No | `-` | - |
|
|
1179
|
+
| `stemv` | `string \| number` | No | `-` | - |
|
|
1180
|
+
| `stitchTiles` | `string \| number` | No | `-` | - |
|
|
1181
|
+
| `stopColor` | `string` | No | `-` | - |
|
|
1182
|
+
| `stopOpacity` | `string \| number` | No | `-` | - |
|
|
1183
|
+
| `strikethroughPosition` | `string \| number` | No | `-` | - |
|
|
1184
|
+
| `strikethroughThickness` | `string \| number` | No | `-` | - |
|
|
1185
|
+
| `string` | `string \| number` | No | `-` | - |
|
|
1186
|
+
| `stroke` | `string` | No | `-` | Stroke color for the bar outline. |
|
|
1187
|
+
| `strokeDasharray` | `string \| number` | No | `-` | - |
|
|
1188
|
+
| `strokeDashoffset` | `string \| number` | No | `-` | - |
|
|
1189
|
+
| `strokeLinecap` | `inherit \| butt \| round \| square` | No | `-` | - |
|
|
1190
|
+
| `strokeLinejoin` | `inherit \| round \| miter \| bevel` | No | `-` | - |
|
|
1191
|
+
| `strokeMiterlimit` | `string \| number` | No | `-` | - |
|
|
1192
|
+
| `strokeOpacity` | `string \| number` | No | `-` | - |
|
|
1193
|
+
| `strokeWidth` | `number` | No | `-` | Stroke width for the bar outline. |
|
|
1194
|
+
| `style` | `CSSProperties` | No | `-` | - |
|
|
1195
|
+
| `suppressHydrationWarning` | `boolean` | No | `-` | - |
|
|
1196
|
+
| `surfaceScale` | `string \| number` | No | `-` | - |
|
|
1197
|
+
| `systemLanguage` | `string \| number` | No | `-` | - |
|
|
1198
|
+
| `tabIndex` | `number` | No | `-` | - |
|
|
1199
|
+
| `tableValues` | `string \| number` | No | `-` | - |
|
|
1200
|
+
| `target` | `string` | No | `-` | - |
|
|
1201
|
+
| `targetX` | `string \| number` | No | `-` | - |
|
|
1202
|
+
| `targetY` | `string \| number` | No | `-` | - |
|
|
1203
|
+
| `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 |
|
|
1204
|
+
| `textAlign` | `ResponsiveProp<center \| end \| start \| justify>` | No | `-` | - |
|
|
1205
|
+
| `textAnchor` | `string` | No | `-` | - |
|
|
1206
|
+
| `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
|
|
1207
|
+
| `textLength` | `string \| number` | No | `-` | - |
|
|
1208
|
+
| `textRendering` | `string \| number` | No | `-` | - |
|
|
1209
|
+
| `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
|
|
1210
|
+
| `to` | `string \| number` | No | `-` | - |
|
|
1211
|
+
| `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
|
|
1212
|
+
| `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
|
|
1213
|
+
| `type` | `string` | No | `-` | - |
|
|
1214
|
+
| `u1` | `string \| number` | No | `-` | - |
|
|
1215
|
+
| `u2` | `string \| number` | No | `-` | - |
|
|
1216
|
+
| `underlinePosition` | `string \| number` | No | `-` | - |
|
|
1217
|
+
| `underlineThickness` | `string \| number` | No | `-` | - |
|
|
1218
|
+
| `unicode` | `string \| number` | No | `-` | - |
|
|
1219
|
+
| `unicodeBidi` | `string \| number` | No | `-` | - |
|
|
1220
|
+
| `unicodeRange` | `string \| number` | No | `-` | - |
|
|
1221
|
+
| `unitsPerEm` | `string \| number` | No | `-` | - |
|
|
1222
|
+
| `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
|
|
1223
|
+
| `vAlphabetic` | `string \| number` | No | `-` | - |
|
|
1224
|
+
| `vHanging` | `string \| number` | No | `-` | - |
|
|
1225
|
+
| `vIdeographic` | `string \| number` | No | `-` | - |
|
|
1226
|
+
| `vMathematical` | `string \| number` | No | `-` | - |
|
|
1227
|
+
| `values` | `string` | No | `-` | - |
|
|
1228
|
+
| `vectorEffect` | `string \| number` | No | `-` | - |
|
|
1229
|
+
| `version` | `string` | No | `-` | - |
|
|
1230
|
+
| `vertAdvY` | `string \| number` | No | `-` | - |
|
|
1231
|
+
| `vertOriginX` | `string \| number` | No | `-` | - |
|
|
1232
|
+
| `vertOriginY` | `string \| number` | No | `-` | - |
|
|
1233
|
+
| `viewBox` | `string` | No | `-` | - |
|
|
1234
|
+
| `viewTarget` | `string \| number` | No | `-` | - |
|
|
1235
|
+
| `visibility` | `ResponsiveProp<visible \| hidden>` | No | `-` | - |
|
|
1236
|
+
| `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
|
|
1237
|
+
| `widths` | `string \| number` | No | `-` | - |
|
|
1238
|
+
| `wordSpacing` | `string \| number` | No | `-` | - |
|
|
1239
|
+
| `writingMode` | `string \| number` | No | `-` | - |
|
|
1240
|
+
| `x` | `string \| number` | No | `-` | - |
|
|
1241
|
+
| `x1` | `string \| number` | No | `-` | - |
|
|
1242
|
+
| `x2` | `string \| number` | No | `-` | - |
|
|
1243
|
+
| `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 | `-` | - |
|
|
1244
|
+
| `xChannelSelector` | `string` | No | `-` | - |
|
|
1245
|
+
| `xHeight` | `string \| number` | No | `-` | - |
|
|
1246
|
+
| `xlinkActuate` | `string` | No | `-` | - |
|
|
1247
|
+
| `xlinkArcrole` | `string` | No | `-` | - |
|
|
1248
|
+
| `xlinkHref` | `string` | No | `-` | - |
|
|
1249
|
+
| `xlinkRole` | `string` | No | `-` | - |
|
|
1250
|
+
| `xlinkShow` | `string` | No | `-` | - |
|
|
1251
|
+
| `xlinkTitle` | `string` | No | `-` | - |
|
|
1252
|
+
| `xlinkType` | `string` | No | `-` | - |
|
|
1253
|
+
| `xmlBase` | `string` | No | `-` | - |
|
|
1254
|
+
| `xmlLang` | `string` | No | `-` | - |
|
|
1255
|
+
| `xmlSpace` | `string` | No | `-` | - |
|
|
1256
|
+
| `xmlns` | `string` | No | `-` | - |
|
|
1257
|
+
| `xmlnsXlink` | `string` | No | `-` | - |
|
|
1258
|
+
| `y` | `string \| number` | No | `-` | - |
|
|
1259
|
+
| `y1` | `string \| number` | No | `-` | - |
|
|
1260
|
+
| `y2` | `string \| number` | No | `-` | - |
|
|
1261
|
+
| `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 | `-` | - |
|
|
1262
|
+
| `yChannelSelector` | `string` | No | `-` | - |
|
|
1263
|
+
| `z` | `string \| number` | No | `-` | - |
|
|
1264
|
+
| `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
1265
|
+
| `zoomAndPan` | `string` | No | `-` | - |
|
|
1266
|
+
|
|
1267
|
+
|