@coinbase/cds-mcp-server 8.21.8 → 8.22.2
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 +12 -0
- package/mcp-docs/mobile/components/AreaChart.txt +39 -37
- package/mcp-docs/mobile/components/Avatar.txt +18 -18
- package/mcp-docs/mobile/components/AvatarButton.txt +19 -19
- package/mcp-docs/mobile/components/Banner.txt +62 -23
- package/mcp-docs/mobile/components/BarChart.txt +37 -35
- package/mcp-docs/mobile/components/Box.txt +18 -18
- package/mcp-docs/mobile/components/BrowserBar.txt +18 -18
- package/mcp-docs/mobile/components/Button.txt +19 -19
- package/mcp-docs/mobile/components/Carousel.txt +18 -18
- package/mcp-docs/mobile/components/CartesianChart.txt +75 -44
- package/mcp-docs/mobile/components/CheckboxCell.txt +19 -19
- package/mcp-docs/mobile/components/Chip.txt +20 -20
- package/mcp-docs/mobile/components/Coachmark.txt +18 -18
- package/mcp-docs/mobile/components/ContentCard.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardBody.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardFooter.txt +18 -18
- package/mcp-docs/mobile/components/ContentCardHeader.txt +18 -18
- package/mcp-docs/mobile/components/ContentCell.txt +18 -18
- package/mcp-docs/mobile/components/ControlGroup.txt +18 -18
- package/mcp-docs/mobile/components/DatePicker.txt +1 -1
- package/mcp-docs/mobile/components/Divider.txt +18 -18
- package/mcp-docs/mobile/components/DotCount.txt +1 -1
- package/mcp-docs/mobile/components/DotSymbol.txt +2 -2
- package/mcp-docs/mobile/components/Fallback.txt +18 -18
- package/mcp-docs/mobile/components/HStack.txt +18 -18
- package/mcp-docs/mobile/components/Icon.txt +6 -0
- package/mcp-docs/mobile/components/IconButton.txt +19 -19
- package/mcp-docs/mobile/components/InputChip.txt +20 -20
- package/mcp-docs/mobile/components/Interactable.txt +19 -19
- package/mcp-docs/mobile/components/LineChart.txt +1608 -898
- package/mcp-docs/mobile/components/Link.txt +18 -18
- package/mcp-docs/mobile/components/ListCell.txt +37 -19
- package/mcp-docs/mobile/components/Lottie.txt +18 -18
- package/mcp-docs/mobile/components/MediaChip.txt +20 -20
- package/mcp-docs/mobile/components/MultiContentModule.txt +18 -18
- package/mcp-docs/mobile/components/NavigationTitle.txt +18 -18
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +18 -18
- package/mcp-docs/mobile/components/Numpad.txt +18 -18
- package/mcp-docs/mobile/components/Overlay.txt +18 -18
- package/mcp-docs/mobile/components/PageFooter.txt +17 -17
- package/mcp-docs/mobile/components/PageHeader.txt +17 -17
- package/mcp-docs/mobile/components/PeriodSelector.txt +26 -26
- package/mcp-docs/mobile/components/Point.txt +203 -98
- package/mcp-docs/mobile/components/Pressable.txt +19 -19
- package/mcp-docs/mobile/components/ProgressBar.txt +1 -1
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +1 -1
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +1 -1
- package/mcp-docs/mobile/components/ProgressCircle.txt +1 -1
- package/mcp-docs/mobile/components/RadioCell.txt +19 -19
- package/mcp-docs/mobile/components/ReferenceLine.txt +197 -54
- package/mcp-docs/mobile/components/RollingNumber.txt +18 -18
- package/mcp-docs/mobile/components/Scrubber.txt +597 -79
- package/mcp-docs/mobile/components/SegmentedTabs.txt +18 -18
- package/mcp-docs/mobile/components/SelectAlpha.txt +1 -1
- package/mcp-docs/mobile/components/SelectChip.txt +20 -20
- package/mcp-docs/mobile/components/SlideButton.txt +19 -19
- package/mcp-docs/mobile/components/Spacer.txt +6 -6
- package/mcp-docs/mobile/components/SparklineInteractive.txt +3 -3
- package/mcp-docs/mobile/components/Spinner.txt +1 -1
- package/mcp-docs/mobile/components/Stepper.txt +18 -18
- package/mcp-docs/mobile/components/TabLabel.txt +18 -18
- package/mcp-docs/mobile/components/TabNavigation.txt +18 -18
- package/mcp-docs/mobile/components/TabbedChips.txt +18 -18
- package/mcp-docs/mobile/components/TabbedChipsAlpha.txt +1 -1
- package/mcp-docs/mobile/components/Tabs.txt +18 -18
- package/mcp-docs/mobile/components/Tag.txt +18 -18
- package/mcp-docs/mobile/components/Text.txt +18 -18
- package/mcp-docs/mobile/components/Toast.txt +18 -18
- package/mcp-docs/mobile/components/Tooltip.txt +17 -1
- package/mcp-docs/mobile/components/TopNavBar.txt +18 -18
- package/mcp-docs/mobile/components/VStack.txt +18 -18
- package/mcp-docs/mobile/components/XAxis.txt +86 -24
- package/mcp-docs/mobile/components/YAxis.txt +75 -17
- package/mcp-docs/mobile/routes.txt +1 -1
- package/mcp-docs/web/components/AreaChart.txt +523 -301
- package/mcp-docs/web/components/Avatar.txt +27 -27
- package/mcp-docs/web/components/AvatarButton.txt +28 -28
- package/mcp-docs/web/components/Banner.txt +71 -32
- package/mcp-docs/web/components/BarChart.txt +182 -313
- package/mcp-docs/web/components/Box.txt +28 -28
- package/mcp-docs/web/components/Button.txt +28 -28
- package/mcp-docs/web/components/Calendar.txt +27 -27
- package/mcp-docs/web/components/Carousel.txt +27 -27
- package/mcp-docs/web/components/CartesianChart.txt +62 -309
- package/mcp-docs/web/components/CheckboxCell.txt +25 -25
- package/mcp-docs/web/components/Chip.txt +27 -27
- package/mcp-docs/web/components/Coachmark.txt +27 -27
- package/mcp-docs/web/components/ContainedAssetCard.txt +27 -27
- package/mcp-docs/web/components/ContentCard.txt +28 -28
- package/mcp-docs/web/components/ContentCardBody.txt +28 -28
- package/mcp-docs/web/components/ContentCardFooter.txt +28 -28
- package/mcp-docs/web/components/ContentCardHeader.txt +28 -28
- package/mcp-docs/web/components/ContentCell.txt +28 -28
- package/mcp-docs/web/components/ControlGroup.txt +27 -27
- package/mcp-docs/web/components/Divider.txt +27 -27
- package/mcp-docs/web/components/Fallback.txt +28 -28
- package/mcp-docs/web/components/FloatingAssetCard.txt +27 -27
- package/mcp-docs/web/components/Grid.txt +28 -28
- package/mcp-docs/web/components/GridColumn.txt +27 -27
- package/mcp-docs/web/components/HStack.txt +28 -28
- package/mcp-docs/web/components/Icon.txt +27 -27
- package/mcp-docs/web/components/IconButton.txt +28 -28
- package/mcp-docs/web/components/InputChip.txt +27 -27
- package/mcp-docs/web/components/Interactable.txt +28 -28
- package/mcp-docs/web/components/LineChart.txt +1598 -1116
- package/mcp-docs/web/components/Link.txt +28 -28
- package/mcp-docs/web/components/ListCell.txt +48 -30
- package/mcp-docs/web/components/Lottie.txt +27 -27
- package/mcp-docs/web/components/MediaChip.txt +27 -27
- package/mcp-docs/web/components/Modal.txt +27 -27
- package/mcp-docs/web/components/ModalBody.txt +27 -27
- package/mcp-docs/web/components/ModalFooter.txt +27 -27
- package/mcp-docs/web/components/ModalHeader.txt +27 -27
- package/mcp-docs/web/components/MultiContentModule.txt +28 -28
- package/mcp-docs/web/components/NavigationBar.txt +5 -5
- package/mcp-docs/web/components/NudgeCard.txt +27 -27
- package/mcp-docs/web/components/Overlay.txt +27 -27
- package/mcp-docs/web/components/PageFooter.txt +26 -26
- package/mcp-docs/web/components/PageHeader.txt +26 -26
- package/mcp-docs/web/components/Pagination.txt +27 -27
- package/mcp-docs/web/components/PeriodSelector.txt +49 -49
- package/mcp-docs/web/components/Point.txt +228 -79
- package/mcp-docs/web/components/Pressable.txt +28 -28
- package/mcp-docs/web/components/RadioCell.txt +25 -25
- package/mcp-docs/web/components/ReferenceLine.txt +208 -60
- package/mcp-docs/web/components/RemoteImage.txt +26 -26
- package/mcp-docs/web/components/RollingNumber.txt +28 -28
- package/mcp-docs/web/components/Scrubber.txt +463 -68
- package/mcp-docs/web/components/SectionHeader.txt +27 -27
- package/mcp-docs/web/components/SegmentedTabs.txt +27 -27
- package/mcp-docs/web/components/SelectChip.txt +27 -27
- package/mcp-docs/web/components/SelectOption.txt +27 -27
- package/mcp-docs/web/components/Sidebar.txt +27 -27
- package/mcp-docs/web/components/SidebarItem.txt +27 -27
- package/mcp-docs/web/components/Spacer.txt +34 -34
- package/mcp-docs/web/components/SparklineInteractive.txt +1 -1
- package/mcp-docs/web/components/Spinner.txt +27 -27
- package/mcp-docs/web/components/Stepper.txt +27 -27
- package/mcp-docs/web/components/TabLabel.txt +27 -27
- package/mcp-docs/web/components/TabNavigation.txt +26 -26
- package/mcp-docs/web/components/TabbedChips.txt +26 -26
- package/mcp-docs/web/components/TabbedChipsAlpha.txt +1 -1
- package/mcp-docs/web/components/Tabs.txt +27 -27
- package/mcp-docs/web/components/Tag.txt +27 -27
- package/mcp-docs/web/components/Text.txt +28 -28
- package/mcp-docs/web/components/TileButton.txt +28 -28
- package/mcp-docs/web/components/Toast.txt +27 -27
- package/mcp-docs/web/components/Tooltip.txt +17 -1
- package/mcp-docs/web/components/VStack.txt +28 -28
- package/mcp-docs/web/components/XAxis.txt +86 -22
- package/mcp-docs/web/components/YAxis.txt +133 -89
- package/package.json +1 -1
|
@@ -10,34 +10,74 @@ import { ReferenceLine } from '@coinbase/cds-mobile-visualization'
|
|
|
10
10
|
|
|
11
11
|
## Examples
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Basics
|
|
14
14
|
|
|
15
|
-
ReferenceLine can be used to add important details to a chart, such as a reference price or date.
|
|
15
|
+
ReferenceLine can be used to add important details to a chart, such as a reference price or date. You can create horizontal lines using `dataY` or vertical lines using `dataX`.
|
|
16
|
+
|
|
17
|
+
#### Simple Reference Line
|
|
18
|
+
|
|
19
|
+
A minimal reference line without labels, useful for marking key thresholds:
|
|
16
20
|
|
|
17
21
|
```jsx
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
function SimpleReferenceLineExample() {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<LineChart
|
|
27
|
+
showArea
|
|
28
|
+
height={150}
|
|
29
|
+
series={[
|
|
30
|
+
{
|
|
31
|
+
id: 'prices',
|
|
32
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
33
|
+
color: theme.color.fgPositive,
|
|
34
|
+
},
|
|
35
|
+
]}
|
|
36
|
+
>
|
|
37
|
+
<ReferenceLine
|
|
38
|
+
LineComponent={(props) => <DottedLine {...props} dashIntervals={[0, 16]} strokeWidth={3} />}
|
|
39
|
+
dataY={10}
|
|
40
|
+
stroke={theme.color.fg}
|
|
41
|
+
/>
|
|
42
|
+
</LineChart>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### With Labels
|
|
48
|
+
|
|
49
|
+
You can add text labels to reference lines and position them using alignment and offset props:
|
|
50
|
+
|
|
51
|
+
```jsx
|
|
52
|
+
function WithLabelsExample() {
|
|
53
|
+
return (
|
|
54
|
+
<LineChart
|
|
55
|
+
height={150}
|
|
56
|
+
series={[
|
|
57
|
+
{
|
|
58
|
+
id: 'prices',
|
|
59
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
60
|
+
},
|
|
61
|
+
]}
|
|
62
|
+
inset={0}
|
|
63
|
+
showArea
|
|
64
|
+
>
|
|
65
|
+
<ReferenceLine
|
|
66
|
+
dataX={5}
|
|
67
|
+
label="Vertical Reference Line"
|
|
68
|
+
labelDx={8}
|
|
69
|
+
labelHorizontalAlignment="left"
|
|
70
|
+
/>
|
|
71
|
+
<ReferenceLine
|
|
72
|
+
dataY={50}
|
|
73
|
+
label="Horizontal Reference Line"
|
|
74
|
+
labelDy={-8}
|
|
75
|
+
labelHorizontalAlignment="right"
|
|
76
|
+
labelVerticalAlignment="bottom"
|
|
77
|
+
/>
|
|
78
|
+
</LineChart>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
41
81
|
```
|
|
42
82
|
|
|
43
83
|
### Data Values
|
|
@@ -47,6 +87,7 @@ ReferenceLine relies on `dataX` or `dataY` to position the line. Passing in `dat
|
|
|
47
87
|
```jsx
|
|
48
88
|
function DataValuesExample() {
|
|
49
89
|
const theme = useTheme();
|
|
90
|
+
|
|
50
91
|
return (
|
|
51
92
|
<LineChart
|
|
52
93
|
showArea
|
|
@@ -65,32 +106,144 @@ function DataValuesExample() {
|
|
|
65
106
|
<ReferenceLine
|
|
66
107
|
dataY={10000}
|
|
67
108
|
label="10,000"
|
|
109
|
+
labelDy={-4}
|
|
68
110
|
labelPosition="left"
|
|
69
|
-
|
|
111
|
+
labelVerticalAlignment="bottom"
|
|
70
112
|
/>
|
|
71
113
|
<ReferenceLine
|
|
72
114
|
dataY={100000}
|
|
73
115
|
label="100,000"
|
|
116
|
+
labelDy={-4}
|
|
74
117
|
labelPosition="left"
|
|
75
|
-
|
|
118
|
+
labelVerticalAlignment="bottom"
|
|
76
119
|
/>
|
|
77
120
|
</LineChart>
|
|
78
121
|
);
|
|
79
122
|
}
|
|
80
123
|
```
|
|
81
124
|
|
|
82
|
-
###
|
|
125
|
+
### Labels
|
|
83
126
|
|
|
84
|
-
####
|
|
127
|
+
#### Customization
|
|
85
128
|
|
|
86
|
-
You can
|
|
129
|
+
You can customize label appearance using `labelFont`, `labelDx`, `labelDy`, `labelHorizontalAlignment`, and `labelVerticalAlignment` props.
|
|
130
|
+
|
|
131
|
+
```jsx
|
|
132
|
+
function LabelCustomizationExample() {
|
|
133
|
+
return (
|
|
134
|
+
<LineChart
|
|
135
|
+
height={150}
|
|
136
|
+
series={[
|
|
137
|
+
{
|
|
138
|
+
id: 'prices',
|
|
139
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
140
|
+
},
|
|
141
|
+
]}
|
|
142
|
+
showArea
|
|
143
|
+
>
|
|
144
|
+
<ReferenceLine
|
|
145
|
+
dataY={50}
|
|
146
|
+
label="Target Price"
|
|
147
|
+
labelDy={-8}
|
|
148
|
+
labelFont="legal"
|
|
149
|
+
labelHorizontalAlignment="right"
|
|
150
|
+
labelPosition="right"
|
|
151
|
+
labelVerticalAlignment="bottom"
|
|
152
|
+
/>
|
|
153
|
+
<ReferenceLine
|
|
154
|
+
dataX={7}
|
|
155
|
+
label="Midpoint"
|
|
156
|
+
labelDx={8}
|
|
157
|
+
labelFont="label1"
|
|
158
|
+
labelHorizontalAlignment="left"
|
|
159
|
+
labelPosition="top"
|
|
160
|
+
/>
|
|
161
|
+
</LineChart>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Bounds
|
|
167
|
+
|
|
168
|
+
Use `labelBoundsInset` to prevent labels from getting too close to chart edges.
|
|
169
|
+
|
|
170
|
+
```jsx
|
|
171
|
+
function BoundsExample() {
|
|
172
|
+
return (
|
|
173
|
+
<LineChart
|
|
174
|
+
height={150}
|
|
175
|
+
inset={{ left: 0, right: 0 }}
|
|
176
|
+
series={[
|
|
177
|
+
{
|
|
178
|
+
id: 'prices',
|
|
179
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
180
|
+
},
|
|
181
|
+
]}
|
|
182
|
+
showArea
|
|
183
|
+
>
|
|
184
|
+
<ReferenceLine
|
|
185
|
+
dataX={0}
|
|
186
|
+
label="No Bounds Inset"
|
|
187
|
+
labelBoundsInset={0}
|
|
188
|
+
labelDy={0}
|
|
189
|
+
labelPosition="top"
|
|
190
|
+
/>
|
|
191
|
+
<ReferenceLine
|
|
192
|
+
dataX={13}
|
|
193
|
+
label="12px Bounds Inset"
|
|
194
|
+
labelBoundsInset={{ left: 12, right: 12 }}
|
|
195
|
+
labelDy={0}
|
|
196
|
+
labelPosition="top"
|
|
197
|
+
/>
|
|
198
|
+
</LineChart>
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### Custom Component
|
|
204
|
+
|
|
205
|
+
You can adjust the style of the label using a custom `LabelComponent`.
|
|
87
206
|
|
|
88
207
|
```jsx
|
|
89
208
|
function LabelStyleExample() {
|
|
90
209
|
const theme = useTheme();
|
|
210
|
+
|
|
211
|
+
const LiquidationLabel = useMemo(
|
|
212
|
+
() =>
|
|
213
|
+
memo((props) => (
|
|
214
|
+
<DefaultReferenceLineLabel
|
|
215
|
+
{...props}
|
|
216
|
+
background={theme.color.accentSubtleYellow}
|
|
217
|
+
borderRadius={4}
|
|
218
|
+
color={`rgb(${theme.color.accentSubtleYellow})`}
|
|
219
|
+
dx={12}
|
|
220
|
+
font="label1"
|
|
221
|
+
horizontalAlignment="left"
|
|
222
|
+
inset={{ top: 4, bottom: 4, left: 8, right: 8 }}
|
|
223
|
+
/>
|
|
224
|
+
)),
|
|
225
|
+
[theme.color.accentSubtleYellow],
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
const PriceLabel = useMemo(
|
|
229
|
+
() =>
|
|
230
|
+
memo((props) => (
|
|
231
|
+
<DefaultReferenceLineLabel
|
|
232
|
+
{...props}
|
|
233
|
+
background={theme.color.bg}
|
|
234
|
+
borderRadius={4}
|
|
235
|
+
color={`rgb(${theme.color.yellow70})`}
|
|
236
|
+
dx={-12}
|
|
237
|
+
font="label1"
|
|
238
|
+
horizontalAlignment="right"
|
|
239
|
+
inset={{ top: 2, bottom: 2, left: 4, right: 4 }}
|
|
240
|
+
/>
|
|
241
|
+
)),
|
|
242
|
+
[theme.color.bg, theme.color.yellow70],
|
|
243
|
+
);
|
|
244
|
+
|
|
91
245
|
return (
|
|
92
246
|
<LineChart
|
|
93
|
-
curve="monotone"
|
|
94
247
|
height={150}
|
|
95
248
|
inset={{ right: 4 }}
|
|
96
249
|
series={[
|
|
@@ -101,33 +254,17 @@ function LabelStyleExample() {
|
|
|
101
254
|
]}
|
|
102
255
|
>
|
|
103
256
|
<ReferenceLine
|
|
257
|
+
LabelComponent={LiquidationLabel}
|
|
104
258
|
dataY={25}
|
|
105
259
|
label="Liquidation"
|
|
106
260
|
labelPosition="left"
|
|
107
|
-
labelProps={{
|
|
108
|
-
horizontalAlignment: 'left',
|
|
109
|
-
dx: 12,
|
|
110
|
-
borderRadius: 4,
|
|
111
|
-
inset: { top: 4, bottom: 4, left: 8, right: 8 },
|
|
112
|
-
color: `rgb(${theme.color.accentSubtleYellow})`,
|
|
113
|
-
background: theme.color.accentSubtleYellow,
|
|
114
|
-
font: 'label1',
|
|
115
|
-
}}
|
|
116
261
|
stroke={theme.color.bgWarning}
|
|
117
262
|
/>
|
|
118
263
|
<ReferenceLine
|
|
264
|
+
LabelComponent={PriceLabel}
|
|
119
265
|
dataY={25}
|
|
120
266
|
label="$25"
|
|
121
267
|
labelPosition="right"
|
|
122
|
-
labelProps={{
|
|
123
|
-
horizontalAlignment: 'right',
|
|
124
|
-
dx: -12,
|
|
125
|
-
borderRadius: 4,
|
|
126
|
-
inset: { top: 2, bottom: 2, left: 4, right: 4 },
|
|
127
|
-
color: `rgb(${theme.color.yellow70})`,
|
|
128
|
-
background: theme.color.bg,
|
|
129
|
-
font: 'label1',
|
|
130
|
-
}}
|
|
131
268
|
stroke="transparent"
|
|
132
269
|
/>
|
|
133
270
|
</LineChart>
|
|
@@ -139,14 +276,20 @@ function LabelStyleExample() {
|
|
|
139
276
|
|
|
140
277
|
| Prop | Type | Required | Default | Description |
|
|
141
278
|
| --- | --- | --- | --- | --- |
|
|
279
|
+
| `LabelComponent` | `ReferenceLineLabelComponent` | No | `DefaultReferenceLineLabel` | Component to render the label. |
|
|
142
280
|
| `LineComponent` | `LineComponent` | No | `DottedLine` | Component to render the line. |
|
|
143
|
-
| `dataX` | `number` | No | `-` | X-value for vertical reference line (data index). |
|
|
144
|
-
| `dataY` | `number` | No | `-` | Y-value for horizontal reference line (data value). |
|
|
145
|
-
| `label` | `
|
|
281
|
+
| `dataX` | `number \| { value: number; }` | No | `-` | X-value for vertical reference line (data index). |
|
|
282
|
+
| `dataY` | `number \| { value: number; }` | No | `-` | Y-value for horizontal reference line (data value). |
|
|
283
|
+
| `label` | `string \| SkParagraph \| { value: string \| SkParagraph; }` | No | `-` | Label content to display near the reference line. Can be a string or ReactNode for rich formatting. |
|
|
284
|
+
| `labelBoundsInset` | `number \| ChartInset` | No | `{ top: 4, bottom: 20, left: 12, right: 12 } when labelElevated is true, otherwise none` | Bounds inset for the label to prevent cutoff at chart edges. Especially useful when labelElevated is true to prevent shadow clipping. Can be a number (applied to all sides) or a ChartInset object. |
|
|
285
|
+
| `labelDx` | `number` | No | `-` | Horizontal offset for the label in pixels. |
|
|
286
|
+
| `labelDy` | `number` | No | `-` | Vertical offset for the label in pixels. |
|
|
287
|
+
| `labelElevated` | `boolean` | No | `-` | Whether to elevate the label with a shadow. When true, applies elevation and automatically adds bounds to keep label within chart area. |
|
|
288
|
+
| `labelFont` | `display1 \| display2 \| display3 \| title1 \| title2 \| title3 \| title4 \| headline \| body \| label1 \| label2 \| caption \| legal` | No | `-` | Font style for the label text. |
|
|
289
|
+
| `labelHorizontalAlignment` | `left \| right \| center` | No | `-` | Horizontal alignment of the label text. |
|
|
146
290
|
| `labelPosition` | `TextHorizontalAlignment \| TextVerticalAlignment` | No | `'right' 'top'` | Position of the label along the horizontal line. Position of the label along the vertical line. |
|
|
147
|
-
| `
|
|
291
|
+
| `labelVerticalAlignment` | `top \| bottom \| middle` | No | `-` | Vertical alignment of the label text. |
|
|
148
292
|
| `stroke` | `string` | No | `theme.color.bgLine` | The color of the line. |
|
|
149
|
-
| `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 |
|
|
150
293
|
| `yAxisId` | `string` | No | `-` | The ID of the y-axis to use for positioning. Defaults to defaultAxisId if not specified. |
|
|
151
294
|
|
|
152
295
|
|
|
@@ -692,7 +692,7 @@ ValueSection
|
|
|
692
692
|
| `bottom` | `string \| number` | No | `-` | - |
|
|
693
693
|
| `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 | `-` | Base text color token. When {@link colorPulseOnUpdate } is true, the color briefly pulses to a positive or negative mid color before returning to this base color. Defaults to {@code fg}. |
|
|
694
694
|
| `colorPulseOnUpdate` | `boolean` | No | `-` | Enables color pulsing on positive or negative changes. |
|
|
695
|
-
| `columnGap` | `0 \| 1 \| 2 \|
|
|
695
|
+
| `columnGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
696
696
|
| `dangerouslySetBackground` | `string \| OpaqueColorValue` | No | `-` | - |
|
|
697
697
|
| `dangerouslySetColor` | `string \| OpaqueColorValue` | No | `-` | - |
|
|
698
698
|
| `dataDetectorType` | `link \| none \| all \| email \| phoneNumber \| null` | No | `-` | Determines the types of data converted to clickable URLs in the text element. By default no data types are detected. |
|
|
@@ -714,7 +714,7 @@ ValueSection
|
|
|
714
714
|
| `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
|
|
715
715
|
| `format` | `(Omit<NumberFormatOptions, notation> & { notation?: compact \| standard; }) \| undefined` | No | `-` | Intl.NumberFormat options applied when formatting the value. Scientific and engineering notation are not supported. |
|
|
716
716
|
| `formattedValue` | `string` | No | `-` | Preformatted value rendered instead of formatting {@link value }. {@link value } is still used to determine numeric deltas. |
|
|
717
|
-
| `gap` | `0 \| 1 \| 2 \|
|
|
717
|
+
| `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
718
718
|
| `height` | `string \| number` | No | `-` | - |
|
|
719
719
|
| `id` | `string` | No | `-` | Used to reference react managed views from native code. |
|
|
720
720
|
| `justifyContent` | `flex-start \| flex-end \| center \| space-between \| space-around \| space-evenly` | No | `-` | - |
|
|
@@ -724,13 +724,13 @@ ValueSection
|
|
|
724
724
|
| `lineBreakStrategyIOS` | `none \| standard \| hangul-word \| push-out` | No | `-` | Set line break strategy on iOS. |
|
|
725
725
|
| `lineHeight` | `inherit \| LineHeight` | No | `-` | - |
|
|
726
726
|
| `locale` | `string \| Locale \| readonly (string \| Locale)[]` | No | `-` | Locale used for formatting. Defaults to the locale from {@link LocaleProvider }. |
|
|
727
|
-
| `margin` | `0 \| -1 \| -2 \| -
|
|
728
|
-
| `marginBottom` | `0 \| -1 \| -2 \| -
|
|
729
|
-
| `marginEnd` | `0 \| -1 \| -2 \| -
|
|
730
|
-
| `marginStart` | `0 \| -1 \| -2 \| -
|
|
731
|
-
| `marginTop` | `0 \| -1 \| -2 \| -
|
|
732
|
-
| `marginX` | `0 \| -1 \| -2 \| -
|
|
733
|
-
| `marginY` | `0 \| -1 \| -2 \| -
|
|
727
|
+
| `margin` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
728
|
+
| `marginBottom` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
729
|
+
| `marginEnd` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
730
|
+
| `marginStart` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
731
|
+
| `marginTop` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
732
|
+
| `marginX` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
733
|
+
| `marginY` | `0 \| -1 \| -2 \| -0.25 \| -0.5 \| -0.75 \| -1.5 \| -3 \| -4 \| -5 \| -6 \| -7 \| -8 \| -9 \| -10` | No | `-` | - |
|
|
734
734
|
| `maxFontSizeMultiplier` | `number \| null` | No | `-` | Specifies largest possible scale a font can reach when allowFontScaling is enabled. Possible values: - null/undefined (default): inherit from the parent node or the global default (0) - 0: no max, ignore parent/global default - >= 1: sets the maxFontSizeMultiplier of this node to this value |
|
|
735
735
|
| `maxHeight` | `string \| number` | No | `-` | - |
|
|
736
736
|
| `maxWidth` | `string \| number` | No | `-` | - |
|
|
@@ -750,20 +750,20 @@ ValueSection
|
|
|
750
750
|
| `onTextLayout` | `((event: NativeSyntheticEvent<TextLayoutEventData>) => void)` | No | `-` | Invoked on Text layout |
|
|
751
751
|
| `opacity` | `number \| AnimatedNode` | No | `-` | - |
|
|
752
752
|
| `overflow` | `visible \| hidden \| scroll` | No | `-` | - |
|
|
753
|
-
| `padding` | `0 \| 1 \| 2 \|
|
|
754
|
-
| `paddingBottom` | `0 \| 1 \| 2 \|
|
|
755
|
-
| `paddingEnd` | `0 \| 1 \| 2 \|
|
|
756
|
-
| `paddingStart` | `0 \| 1 \| 2 \|
|
|
757
|
-
| `paddingTop` | `0 \| 1 \| 2 \|
|
|
758
|
-
| `paddingX` | `0 \| 1 \| 2 \|
|
|
759
|
-
| `paddingY` | `0 \| 1 \| 2 \|
|
|
760
|
-
| `position` | `
|
|
753
|
+
| `padding` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
754
|
+
| `paddingBottom` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
755
|
+
| `paddingEnd` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
756
|
+
| `paddingStart` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
757
|
+
| `paddingTop` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
758
|
+
| `paddingX` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
759
|
+
| `paddingY` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
760
|
+
| `position` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | - |
|
|
761
761
|
| `positivePulseColor` | `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 | `-` | Color token used for positive numeric changes. Defaults to {@code fgPositive}. |
|
|
762
762
|
| `prefix` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Content rendered before the formatted value. |
|
|
763
763
|
| `ref` | `((instance: View \| null) => void) \| RefObject<View> \| null` | No | `-` | - |
|
|
764
764
|
| `renderEmptyNode` | `boolean` | No | `-` | - |
|
|
765
765
|
| `right` | `string \| number` | No | `-` | - |
|
|
766
|
-
| `rowGap` | `0 \| 1 \| 2 \|
|
|
766
|
+
| `rowGap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
767
767
|
| `selectable` | `boolean` | No | `-` | Lets the user select text, to use the native copy and paste functionality. |
|
|
768
768
|
| `selectionColor` | `string \| OpaqueColorValue` | No | `-` | The highlight color of the text. |
|
|
769
769
|
| `style` | `false \| Value \| AnimatedInterpolation<string \| number> \| RegisteredStyle<TextStyle> \| WithAnimatedObject<TextStyle> \| WithAnimatedArray<Falsy \| TextStyle \| RegisteredStyle<TextStyle> \| RecursiveArray<Falsy \| TextStyle \| RegisteredStyle<TextStyle>> \| readonly (Falsy \| TextStyle \| RegisteredStyle<TextStyle>)[]> \| null` | No | `-` | - |
|