@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,815 @@
|
|
|
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-mobile-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
|
|
21
|
+
<BarChart
|
|
22
|
+
height={150}
|
|
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
|
|
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={150}
|
|
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
|
|
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={150}
|
|
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
|
|
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={150}
|
|
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
|
|
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={150}
|
|
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
|
|
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
|
|
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
|
|
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={150}
|
|
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
|
|
413
|
+
<BarChart
|
|
414
|
+
showXAxis
|
|
415
|
+
showYAxis
|
|
416
|
+
height={150}
|
|
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
|
|
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
|
|
513
|
+
<BarChart
|
|
514
|
+
height={150}
|
|
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
|
|
550
|
+
<BarChart
|
|
551
|
+
height={150}
|
|
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
|
|
579
|
+
<BarChart
|
|
580
|
+
showXAxis
|
|
581
|
+
showYAxis
|
|
582
|
+
height={150}
|
|
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
|
|
613
|
+
function MultipleYAxes() {
|
|
614
|
+
const theme = useTheme();
|
|
615
|
+
|
|
616
|
+
return (
|
|
617
|
+
<VStack gap={2}>
|
|
618
|
+
<CartesianChart
|
|
619
|
+
height={150}
|
|
620
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
621
|
+
series={[
|
|
622
|
+
{
|
|
623
|
+
id: 'revenue',
|
|
624
|
+
data: [455, 520, 380, 455, 285, 235],
|
|
625
|
+
yAxisId: 'revenue',
|
|
626
|
+
color: theme.color.accentBoldYellow,
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: 'profitMargin',
|
|
630
|
+
data: [23, 20, 16, 38, 12, 9],
|
|
631
|
+
yAxisId: 'profitMargin',
|
|
632
|
+
color: theme.color.fgPositive,
|
|
633
|
+
},
|
|
634
|
+
]}
|
|
635
|
+
xAxis={{
|
|
636
|
+
data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
|
|
637
|
+
scaleType: 'band',
|
|
638
|
+
}}
|
|
639
|
+
yAxis={[
|
|
640
|
+
{
|
|
641
|
+
id: 'revenue',
|
|
642
|
+
domain: { min: 0 },
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
id: 'profitMargin',
|
|
646
|
+
domain: { min: 0, max: 100 },
|
|
647
|
+
},
|
|
648
|
+
]}
|
|
649
|
+
>
|
|
650
|
+
<XAxis showLine showTickMarks />
|
|
651
|
+
<YAxis
|
|
652
|
+
showGrid
|
|
653
|
+
showLine
|
|
654
|
+
showTickMarks
|
|
655
|
+
axisId="revenue"
|
|
656
|
+
position="left"
|
|
657
|
+
requestedTickCount={5}
|
|
658
|
+
width={60}
|
|
659
|
+
tickLabelFormatter={(value) => `$${value}k`}
|
|
660
|
+
/>
|
|
661
|
+
<YAxis
|
|
662
|
+
showLine
|
|
663
|
+
showTickMarks
|
|
664
|
+
axisId="profitMargin"
|
|
665
|
+
position="right"
|
|
666
|
+
requestedTickCount={5}
|
|
667
|
+
tickLabelFormatter={(value) => `${value}%`}
|
|
668
|
+
/>
|
|
669
|
+
<BarPlot />
|
|
670
|
+
</CartesianChart>
|
|
671
|
+
<HStack justifyContent="center" gap={2}>
|
|
672
|
+
<Box alignItems="center" gap={0.5}>
|
|
673
|
+
<Box
|
|
674
|
+
borderRadius={1000}
|
|
675
|
+
width={10}
|
|
676
|
+
height={10}
|
|
677
|
+
style={{ background: theme.color.accentBoldYellow }}
|
|
678
|
+
/>
|
|
679
|
+
<Text font="label2">Revenue ($)</Text>
|
|
680
|
+
</Box>
|
|
681
|
+
<Box alignItems="center" gap={0.5}>
|
|
682
|
+
<Box
|
|
683
|
+
borderRadius={1000}
|
|
684
|
+
width={10}
|
|
685
|
+
height={10}
|
|
686
|
+
style={{ background: theme.color.fgPositive }}
|
|
687
|
+
/>
|
|
688
|
+
<Text font="label2">Profit Margin (%)</Text>
|
|
689
|
+
</Box>
|
|
690
|
+
</HStack>
|
|
691
|
+
</VStack>
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
## Props
|
|
697
|
+
|
|
698
|
+
| Prop | Type | Required | Default | Description |
|
|
699
|
+
| --- | --- | --- | --- | --- |
|
|
700
|
+
| `BarComponent` | `BarComponent` | No | `-` | Component to render the bar. |
|
|
701
|
+
| `BarStackComponent` | `BarStackComponent` | No | `DefaultBarStack` | Custom component to render the stack container. Can be used to add clip paths, outlines, or other custom styling. |
|
|
702
|
+
| `alignContent` | `flex-start \| flex-end \| center \| stretch \| space-between \| space-around \| space-evenly` | No | `-` | - |
|
|
703
|
+
| `alignItems` | `flex-start \| flex-end \| center \| stretch \| baseline` | No | `-` | - |
|
|
704
|
+
| `alignSelf` | `auto \| FlexAlignType` | No | `-` | - |
|
|
705
|
+
| `allowOverflowGestures` | `boolean` | No | `-` | Allows continuous gestures on the chart to continue outside the bounds of the chart element. |
|
|
706
|
+
| `animate` | `boolean` | No | `true` | Whether to animate the chart. |
|
|
707
|
+
| `animated` | `boolean` | No | `-` | - |
|
|
708
|
+
| `aspectRatio` | `string \| number` | No | `-` | - |
|
|
709
|
+
| `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 | `-` | - |
|
|
710
|
+
| `barMinSize` | `number` | No | `-` | Minimum size for individual bars in the stack. |
|
|
711
|
+
| `barPadding` | `number` | No | `0.1` | Padding between bar groups (0-1). |
|
|
712
|
+
| `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
713
|
+
| `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
714
|
+
| `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
715
|
+
| `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 | `-` | - |
|
|
716
|
+
| `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
717
|
+
| `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `4` | Border radius of the bar. Border radius for the bar. |
|
|
718
|
+
| `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
719
|
+
| `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
720
|
+
| `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
721
|
+
| `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
722
|
+
| `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
|
|
723
|
+
| `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
|
|
724
|
+
| `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
|
|
725
|
+
| `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
|
|
726
|
+
| `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
|
|
727
|
+
| `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
|
|
728
|
+
| `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
|
|
729
|
+
| `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
|
|
730
|
+
| `bottom` | `string \| number` | No | `-` | - |
|
|
731
|
+
| `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 | `-` | - |
|
|
732
|
+
| `columnGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
733
|
+
| `dangerouslySetBackground` | `string` | No | `-` | - |
|
|
734
|
+
| `display` | `flex \| none` | No | `-` | - |
|
|
735
|
+
| `elevation` | `0 \| 1 \| 2` | No | `-` | Determines box shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. |
|
|
736
|
+
| `enableScrubbing` | `boolean` | No | `-` | Enables scrubbing interactions. When true, allows scrubbing and makes scrubber components interactive. |
|
|
737
|
+
| `fillOpacity` | `number` | No | `-` | Fill opacity for the bar. |
|
|
738
|
+
| `flexBasis` | `string \| number` | No | `-` | - |
|
|
739
|
+
| `flexDirection` | `row \| column \| row-reverse \| column-reverse` | No | `-` | - |
|
|
740
|
+
| `flexGrow` | `number` | No | `-` | - |
|
|
741
|
+
| `flexShrink` | `number` | No | `-` | - |
|
|
742
|
+
| `flexWrap` | `wrap \| nowrap \| wrap-reverse` | No | `-` | - |
|
|
743
|
+
| `font` | `inherit \| FontFamily` | No | `-` | - |
|
|
744
|
+
| `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
|
|
745
|
+
| `fontSize` | `inherit \| FontSize` | No | `-` | - |
|
|
746
|
+
| `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
|
|
747
|
+
| `gap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
748
|
+
| `height` | `string \| number` | No | `-` | Chart height. If not provided, will use the containers measured height. |
|
|
749
|
+
| `inset` | `number \| Partial<ChartInset>` | No | `-` | Inset around the entire chart (outside the axes). |
|
|
750
|
+
| `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
|
|
751
|
+
| `key` | `Key \| null` | No | `-` | - |
|
|
752
|
+
| `left` | `string \| number` | No | `-` | - |
|
|
753
|
+
| `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
|
|
754
|
+
| `margin` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
755
|
+
| `marginBottom` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
756
|
+
| `marginEnd` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
757
|
+
| `marginStart` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
758
|
+
| `marginTop` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
759
|
+
| `marginX` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
760
|
+
| `marginY` | `0 \| -1 \| -2 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1.5` | No | `-` | - |
|
|
761
|
+
| `maxHeight` | `string \| number` | No | `-` | - |
|
|
762
|
+
| `maxWidth` | `string \| number` | No | `-` | - |
|
|
763
|
+
| `minHeight` | `string \| number` | No | `-` | - |
|
|
764
|
+
| `minWidth` | `string \| number` | No | `-` | - |
|
|
765
|
+
| `onPointerCancel` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
766
|
+
| `onPointerCancelCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
767
|
+
| `onPointerDown` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
768
|
+
| `onPointerDownCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
769
|
+
| `onPointerEnter` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
770
|
+
| `onPointerEnterCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
771
|
+
| `onPointerLeave` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
772
|
+
| `onPointerLeaveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
773
|
+
| `onPointerMove` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
774
|
+
| `onPointerMoveCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
775
|
+
| `onPointerUp` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
776
|
+
| `onPointerUpCapture` | `((event: PointerEvent) => void)` | No | `-` | - |
|
|
777
|
+
| `onScrubberPositionChange` | `((index: number) => void) \| undefined` | No | `-` | Callback fired when the scrubber position changes. Receives the dataIndex of the scrubber or undefined when not scrubbing. |
|
|
778
|
+
| `opacity` | `number \| AnimatedNode` | No | `-` | - |
|
|
779
|
+
| `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
|
|
780
|
+
| `padding` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
781
|
+
| `paddingBottom` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
782
|
+
| `paddingEnd` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
783
|
+
| `paddingStart` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
784
|
+
| `paddingTop` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
785
|
+
| `paddingX` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
786
|
+
| `paddingY` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
787
|
+
| `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
|
|
788
|
+
| `position` | `absolute \| relative \| static \| fixed \| sticky` | No | `-` | - |
|
|
789
|
+
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
790
|
+
| `right` | `string \| number` | No | `-` | - |
|
|
791
|
+
| `roundBaseline` | `boolean` | No | `-` | Whether to round the baseline of a bar (where the value is 0). |
|
|
792
|
+
| `rowGap` | `0 \| 1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1.5` | No | `-` | - |
|
|
793
|
+
| `series` | `BarSeries[]` | No | `-` | Configuration objects that define how to visualize the data. Each series supports Bar component props for individual customization. |
|
|
794
|
+
| `showXAxis` | `boolean` | No | `-` | Whether to show the X axis. |
|
|
795
|
+
| `showYAxis` | `boolean` | No | `-` | Whether to show the Y axis. |
|
|
796
|
+
| `stackGap` | `number` | No | `-` | Gap between bars in the stack. |
|
|
797
|
+
| `stackMinSize` | `number` | No | `-` | Minimum size for the entire stack. |
|
|
798
|
+
| `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. |
|
|
799
|
+
| `stroke` | `string` | No | `-` | Stroke color for the bar outline. |
|
|
800
|
+
| `strokeWidth` | `number` | No | `-` | Stroke width for the bar outline. |
|
|
801
|
+
| `style` | `false \| RegisteredStyle<ViewStyle> \| Value \| AnimatedInterpolation<string \| number> \| WithAnimatedObject<ViewStyle> \| WithAnimatedArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>> \| readonly (Falsy \| ViewStyle \| RegisteredStyle<ViewStyle>)[]> \| null` | No | `-` | - |
|
|
802
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Used to locate this view in end-to-end tests. |
|
|
803
|
+
| `textAlign` | `auto \| left \| right \| center \| justify` | No | `-` | - |
|
|
804
|
+
| `textDecorationLine` | `none \| underline \| line-through \| underline line-through` | No | `-` | - |
|
|
805
|
+
| `textDecorationStyle` | `solid \| dotted \| dashed \| double` | No | `-` | - |
|
|
806
|
+
| `textTransform` | `none \| capitalize \| uppercase \| lowercase` | No | `-` | - |
|
|
807
|
+
| `top` | `string \| number` | No | `-` | - |
|
|
808
|
+
| `transform` | `string \| (({ scaleX: AnimatableNumericValue; } & { scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scaleY: AnimatableNumericValue; } & { scaleX?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateX: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ translateY: AnimatableNumericValue \| ${number}%; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ perspective: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotate: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ rotateZ: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ scale: AnimatableNumericValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; skewX?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewX: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewY?: undefined; matrix?: undefined; }) \| ({ skewY: AnimatableStringValue; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; matrix?: undefined; }) \| ({ matrix: AnimatableNumericValue[]; } & { scaleX?: undefined; scaleY?: undefined; translateX?: undefined; translateY?: undefined; perspective?: undefined; rotate?: undefined; rotateX?: undefined; rotateY?: undefined; rotateZ?: undefined; scale?: undefined; skewX?: undefined; skewY?: undefined; }))[]` | No | `-` | - |
|
|
809
|
+
| `userSelect` | `auto \| none \| text \| contain \| all` | No | `-` | - |
|
|
810
|
+
| `width` | `string \| number` | No | `-` | Chart width. If not provided, will use the containers measured width. |
|
|
811
|
+
| `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 | `-` | - |
|
|
812
|
+
| `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 | `-` | - |
|
|
813
|
+
| `zIndex` | `number` | No | `-` | - |
|
|
814
|
+
|
|
815
|
+
|