@coinbase/cds-mcp-server 8.21.8 → 8.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/AreaChart.txt +39 -37
  3. package/mcp-docs/mobile/components/Avatar.txt +18 -18
  4. package/mcp-docs/mobile/components/AvatarButton.txt +19 -19
  5. package/mcp-docs/mobile/components/Banner.txt +62 -23
  6. package/mcp-docs/mobile/components/BarChart.txt +37 -35
  7. package/mcp-docs/mobile/components/Box.txt +18 -18
  8. package/mcp-docs/mobile/components/BrowserBar.txt +18 -18
  9. package/mcp-docs/mobile/components/Button.txt +19 -19
  10. package/mcp-docs/mobile/components/Carousel.txt +18 -18
  11. package/mcp-docs/mobile/components/CartesianChart.txt +75 -44
  12. package/mcp-docs/mobile/components/CheckboxCell.txt +19 -19
  13. package/mcp-docs/mobile/components/Chip.txt +20 -20
  14. package/mcp-docs/mobile/components/Coachmark.txt +18 -18
  15. package/mcp-docs/mobile/components/ContentCard.txt +18 -18
  16. package/mcp-docs/mobile/components/ContentCardBody.txt +18 -18
  17. package/mcp-docs/mobile/components/ContentCardFooter.txt +18 -18
  18. package/mcp-docs/mobile/components/ContentCardHeader.txt +18 -18
  19. package/mcp-docs/mobile/components/ContentCell.txt +18 -18
  20. package/mcp-docs/mobile/components/ControlGroup.txt +18 -18
  21. package/mcp-docs/mobile/components/DatePicker.txt +1 -1
  22. package/mcp-docs/mobile/components/Divider.txt +18 -18
  23. package/mcp-docs/mobile/components/DotCount.txt +1 -1
  24. package/mcp-docs/mobile/components/DotSymbol.txt +2 -2
  25. package/mcp-docs/mobile/components/Fallback.txt +18 -18
  26. package/mcp-docs/mobile/components/HStack.txt +18 -18
  27. package/mcp-docs/mobile/components/Icon.txt +6 -0
  28. package/mcp-docs/mobile/components/IconButton.txt +19 -19
  29. package/mcp-docs/mobile/components/InputChip.txt +20 -20
  30. package/mcp-docs/mobile/components/Interactable.txt +19 -19
  31. package/mcp-docs/mobile/components/LineChart.txt +1608 -898
  32. package/mcp-docs/mobile/components/Link.txt +18 -18
  33. package/mcp-docs/mobile/components/ListCell.txt +37 -19
  34. package/mcp-docs/mobile/components/Lottie.txt +18 -18
  35. package/mcp-docs/mobile/components/MediaChip.txt +20 -20
  36. package/mcp-docs/mobile/components/MultiContentModule.txt +18 -18
  37. package/mcp-docs/mobile/components/NavigationTitle.txt +18 -18
  38. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +18 -18
  39. package/mcp-docs/mobile/components/Numpad.txt +18 -18
  40. package/mcp-docs/mobile/components/Overlay.txt +18 -18
  41. package/mcp-docs/mobile/components/PageFooter.txt +17 -17
  42. package/mcp-docs/mobile/components/PageHeader.txt +17 -17
  43. package/mcp-docs/mobile/components/PeriodSelector.txt +26 -26
  44. package/mcp-docs/mobile/components/Point.txt +203 -98
  45. package/mcp-docs/mobile/components/Pressable.txt +19 -19
  46. package/mcp-docs/mobile/components/ProgressBar.txt +1 -1
  47. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +1 -1
  48. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +1 -1
  49. package/mcp-docs/mobile/components/ProgressCircle.txt +1 -1
  50. package/mcp-docs/mobile/components/RadioCell.txt +19 -19
  51. package/mcp-docs/mobile/components/ReferenceLine.txt +197 -54
  52. package/mcp-docs/mobile/components/RollingNumber.txt +18 -18
  53. package/mcp-docs/mobile/components/Scrubber.txt +597 -79
  54. package/mcp-docs/mobile/components/SegmentedTabs.txt +18 -18
  55. package/mcp-docs/mobile/components/SelectAlpha.txt +1 -1
  56. package/mcp-docs/mobile/components/SelectChip.txt +20 -20
  57. package/mcp-docs/mobile/components/SlideButton.txt +19 -19
  58. package/mcp-docs/mobile/components/Spacer.txt +6 -6
  59. package/mcp-docs/mobile/components/SparklineInteractive.txt +3 -3
  60. package/mcp-docs/mobile/components/Spinner.txt +1 -1
  61. package/mcp-docs/mobile/components/Stepper.txt +18 -18
  62. package/mcp-docs/mobile/components/TabLabel.txt +18 -18
  63. package/mcp-docs/mobile/components/TabNavigation.txt +18 -18
  64. package/mcp-docs/mobile/components/TabbedChips.txt +18 -18
  65. package/mcp-docs/mobile/components/TabbedChipsAlpha.txt +1 -1
  66. package/mcp-docs/mobile/components/Tabs.txt +18 -18
  67. package/mcp-docs/mobile/components/Tag.txt +18 -18
  68. package/mcp-docs/mobile/components/Text.txt +18 -18
  69. package/mcp-docs/mobile/components/Toast.txt +18 -18
  70. package/mcp-docs/mobile/components/Tooltip.txt +17 -1
  71. package/mcp-docs/mobile/components/TopNavBar.txt +18 -18
  72. package/mcp-docs/mobile/components/VStack.txt +18 -18
  73. package/mcp-docs/mobile/components/XAxis.txt +86 -24
  74. package/mcp-docs/mobile/components/YAxis.txt +75 -17
  75. package/mcp-docs/mobile/routes.txt +1 -1
  76. package/mcp-docs/web/components/AreaChart.txt +523 -301
  77. package/mcp-docs/web/components/Avatar.txt +27 -27
  78. package/mcp-docs/web/components/AvatarButton.txt +28 -28
  79. package/mcp-docs/web/components/Banner.txt +71 -32
  80. package/mcp-docs/web/components/BarChart.txt +182 -313
  81. package/mcp-docs/web/components/Box.txt +28 -28
  82. package/mcp-docs/web/components/Button.txt +28 -28
  83. package/mcp-docs/web/components/Calendar.txt +27 -27
  84. package/mcp-docs/web/components/Carousel.txt +27 -27
  85. package/mcp-docs/web/components/CartesianChart.txt +62 -309
  86. package/mcp-docs/web/components/CheckboxCell.txt +25 -25
  87. package/mcp-docs/web/components/Chip.txt +27 -27
  88. package/mcp-docs/web/components/Coachmark.txt +27 -27
  89. package/mcp-docs/web/components/ContainedAssetCard.txt +27 -27
  90. package/mcp-docs/web/components/ContentCard.txt +28 -28
  91. package/mcp-docs/web/components/ContentCardBody.txt +28 -28
  92. package/mcp-docs/web/components/ContentCardFooter.txt +28 -28
  93. package/mcp-docs/web/components/ContentCardHeader.txt +28 -28
  94. package/mcp-docs/web/components/ContentCell.txt +28 -28
  95. package/mcp-docs/web/components/ControlGroup.txt +27 -27
  96. package/mcp-docs/web/components/Divider.txt +27 -27
  97. package/mcp-docs/web/components/Fallback.txt +28 -28
  98. package/mcp-docs/web/components/FloatingAssetCard.txt +27 -27
  99. package/mcp-docs/web/components/Grid.txt +28 -28
  100. package/mcp-docs/web/components/GridColumn.txt +27 -27
  101. package/mcp-docs/web/components/HStack.txt +28 -28
  102. package/mcp-docs/web/components/Icon.txt +27 -27
  103. package/mcp-docs/web/components/IconButton.txt +28 -28
  104. package/mcp-docs/web/components/InputChip.txt +27 -27
  105. package/mcp-docs/web/components/Interactable.txt +28 -28
  106. package/mcp-docs/web/components/LineChart.txt +1598 -1116
  107. package/mcp-docs/web/components/Link.txt +28 -28
  108. package/mcp-docs/web/components/ListCell.txt +48 -30
  109. package/mcp-docs/web/components/Lottie.txt +27 -27
  110. package/mcp-docs/web/components/MediaChip.txt +27 -27
  111. package/mcp-docs/web/components/Modal.txt +27 -27
  112. package/mcp-docs/web/components/ModalBody.txt +27 -27
  113. package/mcp-docs/web/components/ModalFooter.txt +27 -27
  114. package/mcp-docs/web/components/ModalHeader.txt +27 -27
  115. package/mcp-docs/web/components/MultiContentModule.txt +28 -28
  116. package/mcp-docs/web/components/NavigationBar.txt +5 -5
  117. package/mcp-docs/web/components/NudgeCard.txt +27 -27
  118. package/mcp-docs/web/components/Overlay.txt +27 -27
  119. package/mcp-docs/web/components/PageFooter.txt +26 -26
  120. package/mcp-docs/web/components/PageHeader.txt +26 -26
  121. package/mcp-docs/web/components/Pagination.txt +27 -27
  122. package/mcp-docs/web/components/PeriodSelector.txt +49 -49
  123. package/mcp-docs/web/components/Point.txt +228 -79
  124. package/mcp-docs/web/components/Pressable.txt +28 -28
  125. package/mcp-docs/web/components/RadioCell.txt +25 -25
  126. package/mcp-docs/web/components/ReferenceLine.txt +208 -60
  127. package/mcp-docs/web/components/RemoteImage.txt +26 -26
  128. package/mcp-docs/web/components/RollingNumber.txt +28 -28
  129. package/mcp-docs/web/components/Scrubber.txt +463 -68
  130. package/mcp-docs/web/components/SectionHeader.txt +27 -27
  131. package/mcp-docs/web/components/SegmentedTabs.txt +27 -27
  132. package/mcp-docs/web/components/SelectChip.txt +27 -27
  133. package/mcp-docs/web/components/SelectOption.txt +27 -27
  134. package/mcp-docs/web/components/Sidebar.txt +27 -27
  135. package/mcp-docs/web/components/SidebarItem.txt +27 -27
  136. package/mcp-docs/web/components/Spacer.txt +34 -34
  137. package/mcp-docs/web/components/SparklineInteractive.txt +1 -1
  138. package/mcp-docs/web/components/Spinner.txt +27 -27
  139. package/mcp-docs/web/components/Stepper.txt +27 -27
  140. package/mcp-docs/web/components/TabLabel.txt +27 -27
  141. package/mcp-docs/web/components/TabNavigation.txt +26 -26
  142. package/mcp-docs/web/components/TabbedChips.txt +26 -26
  143. package/mcp-docs/web/components/TabbedChipsAlpha.txt +1 -1
  144. package/mcp-docs/web/components/Tabs.txt +27 -27
  145. package/mcp-docs/web/components/Tag.txt +27 -27
  146. package/mcp-docs/web/components/Text.txt +28 -28
  147. package/mcp-docs/web/components/TileButton.txt +28 -28
  148. package/mcp-docs/web/components/Toast.txt +27 -27
  149. package/mcp-docs/web/components/Tooltip.txt +17 -1
  150. package/mcp-docs/web/components/VStack.txt +28 -28
  151. package/mcp-docs/web/components/XAxis.txt +86 -22
  152. package/mcp-docs/web/components/YAxis.txt +133 -89
  153. package/package.json +1 -1
@@ -29,7 +29,7 @@ The XAxis component provides a horizontal axis for charts with automatic tick ge
29
29
  }}
30
30
  >
31
31
  <XAxis showLine showTickMarks showGrid />
32
- <Line seriesId="prices" curve="monotone" showArea />
32
+ <Line seriesId="prices" showArea />
33
33
  <Scrubber />
34
34
  </CartesianChart>
35
35
  ```
@@ -58,7 +58,7 @@ XAxis supports `linear` (default), `log`, and `band` scale types.
58
58
  }}
59
59
  >
60
60
  <XAxis showLine showTickMarks showGrid />
61
- <Line seriesId="prices" curve="monotone" showArea />
61
+ <Line seriesId="prices" showArea />
62
62
  </CartesianChart>
63
63
  ```
64
64
 
@@ -81,7 +81,7 @@ You can pass in either an object (AxisBounds) with `min` and `max` properties (b
81
81
  }}
82
82
  >
83
83
  <XAxis showLine showTickMarks showGrid tickInterval={16} />
84
- <Line seriesId="prices" curve="monotone" showArea />
84
+ <Line seriesId="prices" showArea />
85
85
  </CartesianChart>
86
86
  ```
87
87
 
@@ -108,7 +108,7 @@ You can pass in either an object (AxisBounds) with `min` and `max` properties (b
108
108
  range: ({ min, max }) => ({ min, max: max - 64 }),
109
109
  }}
110
110
  >
111
- <Line seriesId="prices" curve="monotone" showArea />
111
+ <Line seriesId="prices" showArea />
112
112
  </CartesianChart>
113
113
  ```
114
114
 
@@ -134,7 +134,7 @@ Using string data will allow you to set string x values for each data point.
134
134
  }}
135
135
  >
136
136
  <XAxis showLine showTickMarks showGrid />
137
- <Line seriesId="prices" curve="monotone" showArea />
137
+ <Line seriesId="prices" showArea />
138
138
  </CartesianChart>
139
139
  ```
140
140
 
@@ -153,7 +153,7 @@ Using number data with a numeric scale will allow you to adjust the x values for
153
153
  ]}
154
154
  height={250}
155
155
  showArea
156
- renderPoints={() => true}
156
+ points
157
157
  curve="natural"
158
158
  showXAxis
159
159
  xAxis={{ data: [1, 2, 3, 5, 8, 10], showLine: true, showTickMarks: true, showGrid: true }}
@@ -252,7 +252,7 @@ function XAxisPositionExample() {
252
252
  return (
253
253
  <LineChart
254
254
  enableScrubbing
255
- curve="monotone"
255
+
256
256
  height={400}
257
257
  series={[
258
258
  {
@@ -318,7 +318,7 @@ function XAxisGridExample() {
318
318
  }}
319
319
  >
320
320
  <XAxis showLine showTickMarks showGrid={showGrid} />
321
- <Line seriesId="prices" curve="monotone" showArea />
321
+ <Line seriesId="prices" showArea />
322
322
  <Scrubber />
323
323
  </CartesianChart>
324
324
  </VStack>
@@ -347,7 +347,7 @@ function CustomGridLineExample() {
347
347
  }}
348
348
  >
349
349
  <XAxis showLine showTickMarks showGrid GridLineComponent={ThinSolidLine} />
350
- <Line seriesId="prices" curve="monotone" showArea />
350
+ <Line seriesId="prices" showArea />
351
351
  <Scrubber />
352
352
  </CartesianChart>
353
353
  );
@@ -382,7 +382,7 @@ function XAxisLineExample() {
382
382
  }}
383
383
  >
384
384
  <XAxis showLine={showLine} showTickMarks showGrid />
385
- <Line seriesId="prices" curve="monotone" showArea />
385
+ <Line seriesId="prices" showArea />
386
386
  <Scrubber />
387
387
  </CartesianChart>
388
388
  </VStack>
@@ -417,7 +417,7 @@ function XAxisLineStylesExample() {
417
417
  showGrid
418
418
  styles={{ line: { stroke: 'var(--color-accentBoldGreen)', strokeWidth: 4 } }}
419
419
  />
420
- <Line seriesId="prices" curve="monotone" showArea />
420
+ <Line seriesId="prices" showArea />
421
421
  <Scrubber />
422
422
  </CartesianChart>
423
423
  </VStack>
@@ -444,7 +444,7 @@ The `size` prop sets the size of the axis in pixels. The default is 32 for XAxis
444
444
  }}
445
445
  >
446
446
  <XAxis showLine showTickMarks showGrid height={64} />
447
- <Line seriesId="prices" curve="monotone" showArea />
447
+ <Line seriesId="prices" showArea />
448
448
  <Scrubber />
449
449
  </CartesianChart>
450
450
  ```
@@ -467,7 +467,7 @@ You can use the `ticks`, `requestedTickCount`, and `tickInterval` (default for X
467
467
  ]}
468
468
  >
469
469
  <XAxis showLine showTickMarks showGrid ticks={[0, 2, 4, 6]} />
470
- <Line seriesId="prices" curve="monotone" showArea />
470
+ <Line seriesId="prices" showArea />
471
471
  <Scrubber />
472
472
  </CartesianChart>
473
473
  ```
@@ -486,7 +486,7 @@ Using `requestedTickCount` will use [D3's ticks function](https://d3js.org/d3-ar
486
486
  ]}
487
487
  >
488
488
  <XAxis showLine showTickMarks showGrid requestedTickCount={4} />
489
- <Line seriesId="prices" curve="monotone" showArea />
489
+ <Line seriesId="prices" showArea />
490
490
  <Scrubber />
491
491
  </CartesianChart>
492
492
  ```
@@ -505,7 +505,7 @@ Using `requestedTickCount` will use [D3's ticks function](https://d3js.org/d3-ar
505
505
  ]}
506
506
  >
507
507
  <XAxis showLine showTickMarks showGrid tickInterval={16} />
508
- <Line seriesId="prices" curve="monotone" showArea />
508
+ <Line seriesId="prices" showArea />
509
509
  <Scrubber />
510
510
  </CartesianChart>
511
511
  ```
@@ -538,7 +538,7 @@ function XAxisTickMarksExample() {
538
538
  }}
539
539
  >
540
540
  <XAxis showLine showTickMarks={showTickMarks} tickMarkSize={16} showGrid />
541
- <Line seriesId="prices" curve="monotone" showArea />
541
+ <Line seriesId="prices" showArea />
542
542
  <Scrubber />
543
543
  </CartesianChart>
544
544
  </VStack>
@@ -565,7 +565,7 @@ You can customize the tick labels using the `tickLabelFormatter` prop. It will r
565
565
  }}
566
566
  >
567
567
  <XAxis showGrid tickLabelFormatter={(value) => `Day of ${value}`} />
568
- <Line seriesId="prices" curve="monotone" showArea />
568
+ <Line seriesId="prices" showArea />
569
569
  <Scrubber />
570
570
  </CartesianChart>
571
571
  ```
@@ -587,19 +587,83 @@ If no data is set for the axis, it will receive the regular number value of the
587
587
  }}
588
588
  >
589
589
  <XAxis showGrid tickLabelFormatter={(value) => value * 2} />
590
- <Line seriesId="prices" curve="monotone" showArea />
590
+ <Line seriesId="prices" showArea />
591
591
  <Scrubber />
592
592
  </CartesianChart>
593
593
  ```
594
594
 
595
+ #### Label
596
+
597
+ You can add a label to the axis using the `label` prop.
598
+
599
+ ```jsx live
600
+ <CartesianChart
601
+ enableScrubbing
602
+ height={250}
603
+ series={[
604
+ {
605
+ id: 'prices',
606
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
607
+ },
608
+ ]}
609
+ xAxis={{
610
+ data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
611
+ }}
612
+ >
613
+ <XAxis showLine showTickMarks showGrid label="Month" />
614
+ <YAxis showGrid />
615
+ <Line seriesId="prices" showArea />
616
+ <Scrubber />
617
+ </CartesianChart>
618
+ ```
619
+
620
+ ##### Custom Tick Labels
621
+
622
+ You can create custom tick label components using the `TickLabelComponent` prop for advanced styling that works cross-platform.
623
+
624
+ ```jsx live
625
+ function CustomTickLabelExample() {
626
+ const CustomXAxisTickLabel = useCallback(
627
+ (props) => <DefaultAxisTickLabel {...props} color="var(--color-accentBoldBlue)" />,
628
+ [],
629
+ );
630
+
631
+ return (
632
+ <CartesianChart
633
+ enableScrubbing
634
+ height={250}
635
+ series={[
636
+ {
637
+ id: 'prices',
638
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
639
+ },
640
+ ]}
641
+ xAxis={{
642
+ data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
643
+ }}
644
+ >
645
+ <XAxis showLine showTickMarks showGrid TickLabelComponent={CustomXAxisTickLabel} />
646
+ <YAxis showGrid />
647
+ <Line seriesId="prices" showArea />
648
+ <Scrubber />
649
+ </CartesianChart>
650
+ );
651
+ }
652
+ ```
653
+
595
654
  ## Props
596
655
 
597
656
  | Prop | Type | Required | Default | Description |
598
657
  | --- | --- | --- | --- | --- |
599
658
  | `GridLineComponent` | `LineComponent` | No | `DottedLine` | Component to render the grid lines. |
659
+ | `LineComponent` | `LineComponent` | No | `SolidLine` | Component to render the axis line. |
660
+ | `TickLabelComponent` | `AxisTickLabelComponent` | No | `DefaultAxisTickLabel` | Component to render tick labels. Allows for custom styling and formatting that works cross-platform. |
661
+ | `TickMarkLineComponent` | `LineComponent` | No | `SolidLine` | Component to render the tick marks. |
600
662
  | `className` | `string` | No | `-` | Custom className for the axis. |
601
- | `classNames` | `{ root?: string; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined` | No | `-` | Custom classNames for the axis. |
602
- | `height` | `number` | No | `32` | Height of the axis. This value is inclusive of the padding. |
663
+ | `classNames` | `{ root?: string; label?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined` | No | `-` | Custom classNames for the axis. |
664
+ | `height` | `number` | No | `32 when no label is provided, 52 when a label is provided` | Height of the axis. This value is inclusive of the padding. |
665
+ | `label` | `string` | No | `-` | Label text to display for the axis. |
666
+ | `labelGap` | `number` | No | `4` | Gap between the tick labels and the axis label. |
603
667
  | `minTickLabelGap` | `number` | No | `4` | Minimum gap between tick labels. Labels will be hidden if they are closer than this gap. |
604
668
  | `position` | `top \| bottom` | No | `'bottom'` | The position of the axis relative to the charts drawing area. |
605
669
  | `requestedTickCount` | `number` | No | `5 (for y-axis)` | Requested number of ticks to display. This value is passed into d3 and may not be respected. |
@@ -607,9 +671,9 @@ If no data is set for the axis, it will receive the regular number value of the
607
671
  | `showLine` | `boolean` | No | `-` | Whether to show the axis line. |
608
672
  | `showTickMarks` | `boolean` | No | `-` | Whether to show tick marks on the axis. |
609
673
  | `style` | `CSSProperties` | No | `-` | Custom style for the axis. |
610
- | `styles` | `{ root?: CSSProperties; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the axis. |
674
+ | `styles` | `{ root?: CSSProperties; label?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the axis. |
611
675
  | `tickInterval` | `number` | No | `32 (for x-axis)` | Interval at which to show ticks. When provided, calculates tick count based on available space. |
612
- | `tickLabelFormatter` | `((value: any) => ChartTextChildren)` | No | `-` | Formatter function for axis tick values. Tick values will be wrapped in ChartText component. |
676
+ | `tickLabelFormatter` | `((value: number) => ChartTextChildren)` | No | `-` | Formatter function for axis tick values. Tick values will be wrapped in ChartText component. |
613
677
  | `tickMarkLabelGap` | `number` | No | `2 for x-axis, 8 for y-axis` | Space between the axis tick mark and labels. If tick marks are not shown, this is the gap between the axis and the chart. |
614
678
  | `tickMarkSize` | `number` | No | `4` | Size of the tick marks. |
615
679
  | `tickMaxStep` | `number` | No | `-` | Maximum step size for tick generation. Prevents the step from being larger than this value. |
@@ -26,7 +26,7 @@ The YAxis component provides a vertical axis for charts with automatic tick gene
26
26
  ]}
27
27
  >
28
28
  <YAxis showGrid />
29
- <Line seriesId="prices" curve="monotone" showArea />
29
+ <Line seriesId="prices" showArea />
30
30
  <Scrubber />
31
31
  </CartesianChart>
32
32
  ```
@@ -55,7 +55,7 @@ YAxis supports `linear` (default) and `log` scale types. Both `linear` and `log`
55
55
  scaleType: 'log',
56
56
  }}
57
57
  >
58
- <Line seriesId="growthExponential" />
58
+ <Line seriesId="growthExponential" showArea />
59
59
  <YAxis
60
60
  showGrid
61
61
  showLine
@@ -86,7 +86,7 @@ You can pass in either an object (AxisBounds) with `min` and `max` properties (b
86
86
  }}
87
87
  >
88
88
  <YAxis showGrid />
89
- <Line seriesId="prices" curve="monotone" showArea />
89
+ <Line seriesId="prices" showArea />
90
90
  </CartesianChart>
91
91
  ```
92
92
 
@@ -113,7 +113,7 @@ You can pass in either an object (AxisBounds) with `min` and `max` properties (b
113
113
  range: ({ min, max }) => ({ min: min + 96, max: max - 96 }),
114
114
  }}
115
115
  >
116
- <Line seriesId="prices" curve="monotone" showArea />
116
+ <Line seriesId="prices" showArea />
117
117
  </CartesianChart>
118
118
  ```
119
119
 
@@ -177,7 +177,7 @@ function YAxisGridExample() {
177
177
  ]}
178
178
  >
179
179
  <YAxis showGrid={showGrid} />
180
- <Line seriesId="prices" curve="monotone" showArea />
180
+ <Line seriesId="prices" showArea />
181
181
  <Scrubber />
182
182
  </CartesianChart>
183
183
  </VStack>
@@ -250,7 +250,7 @@ function YAxisLineExample() {
250
250
  ]}
251
251
  >
252
252
  <YAxis showLine={showLine} />
253
- <Line seriesId="prices" curve="monotone" showArea />
253
+ <Line seriesId="prices" showArea />
254
254
  <Scrubber />
255
255
  </CartesianChart>
256
256
  </VStack>
@@ -285,7 +285,7 @@ function YAxisLineStylesExample() {
285
285
  showGrid
286
286
  styles={{ line: { stroke: 'var(--color-accentBoldGreen)', strokeWidth: 4 } }}
287
287
  />
288
- <Line seriesId="prices" curve="monotone" showArea />
288
+ <Line seriesId="prices" showArea />
289
289
  <Scrubber />
290
290
  </CartesianChart>
291
291
  </VStack>
@@ -340,7 +340,7 @@ You can use the `ticks`, `requestedTickCount` (default for YAxis), and `tickInte
340
340
  ]}
341
341
  >
342
342
  <YAxis showLine showTickMarks showGrid ticks={[34, 56, 80]} />
343
- <Line seriesId="prices" curve="monotone" showArea />
343
+ <Line seriesId="prices" showArea />
344
344
  <Scrubber />
345
345
  </CartesianChart>
346
346
  ```
@@ -361,7 +361,7 @@ This is the default behavior for YAxis, and defaults to `5`.
361
361
  ]}
362
362
  >
363
363
  <YAxis showLine showTickMarks showGrid requestedTickCount={5} />
364
- <Line seriesId="prices" curve="monotone" showArea />
364
+ <Line seriesId="prices" showArea />
365
365
  <Scrubber />
366
366
  </CartesianChart>
367
367
  ```
@@ -380,7 +380,7 @@ This is the default behavior for YAxis, and defaults to `5`.
380
380
  ]}
381
381
  >
382
382
  <YAxis showLine showTickMarks showGrid tickInterval={8} />
383
- <Line seriesId="prices" curve="monotone" showArea />
383
+ <Line seriesId="prices" showArea />
384
384
  <Scrubber />
385
385
  </CartesianChart>
386
386
  ```
@@ -411,7 +411,7 @@ function YAxisTickMarksExample() {
411
411
  ]}
412
412
  >
413
413
  <YAxis showLine showTickMarks={showTickMarks} tickMarkSize={16} showGrid />
414
- <Line seriesId="prices" curve="monotone" showArea />
414
+ <Line seriesId="prices" showArea />
415
415
  <Scrubber />
416
416
  </CartesianChart>
417
417
  </VStack>
@@ -435,89 +435,128 @@ You can customize the tick labels using the `tickLabelFormatter` prop.
435
435
  ]}
436
436
  >
437
437
  <YAxis showGrid tickLabelFormatter={(value) => `$${value}`} />
438
- <Line seriesId="prices" curve="monotone" showArea />
438
+ <Line seriesId="prices" showArea />
439
439
  <Scrubber />
440
440
  </CartesianChart>
441
441
  ```
442
442
 
443
+ #### Label
444
+
445
+ You can add a label to the axis using the `label` prop.
446
+
447
+ ```jsx live
448
+ <CartesianChart
449
+ enableScrubbing
450
+ height={250}
451
+ series={[
452
+ {
453
+ id: 'prices',
454
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
455
+ },
456
+ ]}
457
+ >
458
+ <YAxis showGrid label="Price ($)" tickLabelFormatter={(value) => `$${value}`} />
459
+ <Line seriesId="prices" showArea />
460
+ <Scrubber />
461
+ </CartesianChart>
462
+ ```
463
+
464
+ ##### Custom Tick Labels
465
+
466
+ You can create custom tick label components using the `TickLabelComponent` prop for advanced styling and positioning that works cross-platform.
467
+
468
+ ```jsx live
469
+ function CustomTickLabelExample() {
470
+ const CustomYAxisTickLabel = useCallback(
471
+ (props) => <DefaultAxisTickLabel {...props} dx={4} dy={-12} horizontalAlignment="left" />,
472
+ [],
473
+ );
474
+
475
+ return (
476
+ <CartesianChart
477
+ enableScrubbing
478
+ height={250}
479
+ series={[
480
+ {
481
+ id: 'prices',
482
+ data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
483
+ },
484
+ ]}
485
+ >
486
+ <YAxis
487
+ showGrid
488
+ position="left"
489
+ width={0}
490
+ tickLabelFormatter={(value) => `$${value}`}
491
+ TickLabelComponent={CustomYAxisTickLabel}
492
+ />
493
+ <Line seriesId="prices" showArea />
494
+ <Scrubber />
495
+ </CartesianChart>
496
+ );
497
+ }
498
+ ```
499
+
443
500
  ### Customization
444
501
 
445
502
  #### Multiple Y Axes
446
503
 
447
504
  ```jsx live
448
- <VStack gap={2}>
449
- <CartesianChart
450
- height={400}
451
- series={[
452
- {
453
- id: 'revenue',
454
- data: [455, 520, 380, 455, 285, 235],
455
- yAxisId: 'revenue',
456
- color: 'var(--color-accentBoldYellow)',
457
- },
458
- {
459
- id: 'profitMargin',
460
- data: [23, 20, 16, 38, 12, 9],
461
- yAxisId: 'profitMargin',
462
- color: 'var(--color-fgPositive)',
463
- },
464
- ]}
465
- xAxis={{
466
- data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
467
- scaleType: 'band',
468
- }}
469
- yAxis={[
470
- {
471
- id: 'revenue',
472
- domain: { min: 0 },
473
- },
474
- {
475
- id: 'profitMargin',
476
- domain: { min: 0, max: 100 },
477
- },
478
- ]}
479
- >
480
- <XAxis showLine showTickMarks />
481
- <YAxis
482
- showGrid
483
- showLine
484
- showTickMarks
485
- axisId="revenue"
486
- position="left"
487
- requestedTickCount={5}
488
- width={60}
489
- tickLabelFormatter={(value) => `$${value}k`}
490
- />
491
- <YAxis
492
- showLine
493
- showTickMarks
494
- axisId="profitMargin"
495
- requestedTickCount={5}
496
- tickLabelFormatter={(value) => `${value}%`}
497
- />
498
- <BarPlot />
499
- </CartesianChart>
500
- <HStack justifyContent="center" gap={2}>
501
- <Box alignItems="center" gap={0.5}>
502
- <Box
503
- borderRadius={1000}
504
- width={10}
505
- height={10}
506
- style={{ background: 'var(--color-accentBoldYellow)' }}
507
- />
508
- <Text font="label2">Revenue ($)</Text>
509
- </Box>
510
- <Box alignItems="center" gap={0.5}>
511
- <Box
512
- borderRadius={1000}
513
- width={10}
514
- height={10}
515
- style={{ background: 'var(--color-fgPositive)' }}
516
- />
517
- <Text font="label2">Profit Margin (%)</Text>
518
- </Box>
519
- </HStack>
520
- </VStack>
505
+ <CartesianChart
506
+ height={400}
507
+ series={[
508
+ {
509
+ id: 'revenue',
510
+ data: [455, 520, 380, 455, 285, 235],
511
+ yAxisId: 'revenue',
512
+ color: 'var(--color-accentBoldYellow)',
513
+ },
514
+ {
515
+ id: 'profitMargin',
516
+ data: [23, 20, 16, 38, 12, 9],
517
+ yAxisId: 'profitMargin',
518
+ color: 'var(--color-fgPositive)',
519
+ },
520
+ ]}
521
+ xAxis={{
522
+ data: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
523
+ scaleType: 'band',
524
+ }}
525
+ yAxis={[
526
+ {
527
+ id: 'revenue',
528
+ domain: { min: 0 },
529
+ },
530
+ {
531
+ id: 'profitMargin',
532
+ domain: { min: 0, max: 100 },
533
+ },
534
+ ]}
535
+ inset={{ left: 0, right: 0 }}
536
+ >
537
+ <XAxis showLine showTickMarks label="Month" />
538
+ <YAxis
539
+ showGrid
540
+ showLine
541
+ showTickMarks
542
+ axisId="revenue"
543
+ position="left"
544
+ label="Revenue"
545
+ width={80}
546
+ requestedTickCount={5}
547
+ tickLabelFormatter={(value) => `$${value}k`}
548
+ />
549
+ <YAxis
550
+ showLine
551
+ showTickMarks
552
+ axisId="profitMargin"
553
+ label="Profit Margin"
554
+ width={70}
555
+ requestedTickCount={5}
556
+ tickLabelFormatter={(value) => `${value}%`}
557
+ />
558
+ <BarPlot />
559
+ </CartesianChart>
521
560
  ```
522
561
 
523
562
  ## Props
@@ -525,9 +564,14 @@ You can customize the tick labels using the `tickLabelFormatter` prop.
525
564
  | Prop | Type | Required | Default | Description |
526
565
  | --- | --- | --- | --- | --- |
527
566
  | `GridLineComponent` | `LineComponent` | No | `DottedLine` | Component to render the grid lines. |
567
+ | `LineComponent` | `LineComponent` | No | `SolidLine` | Component to render the axis line. |
568
+ | `TickLabelComponent` | `AxisTickLabelComponent` | No | `DefaultAxisTickLabel` | Component to render tick labels. Allows for custom styling and formatting that works cross-platform. |
569
+ | `TickMarkLineComponent` | `LineComponent` | No | `SolidLine` | Component to render the tick marks. |
528
570
  | `axisId` | `string` | No | `-` | The ID of the axis to render. Defaults to defaultAxisId if not specified. |
529
571
  | `className` | `string` | No | `-` | Custom className for the axis. |
530
- | `classNames` | `{ root?: string; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined` | No | `-` | Custom classNames for the axis. |
572
+ | `classNames` | `{ root?: string; label?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined` | No | `-` | Custom classNames for the axis. |
573
+ | `label` | `string` | No | `-` | Label text to display for the axis. |
574
+ | `labelGap` | `number` | No | `4` | Gap between the tick labels and the axis label. |
531
575
  | `minTickLabelGap` | `number` | No | `4` | Minimum gap between tick labels. Labels will be hidden if they are closer than this gap. |
532
576
  | `position` | `left \| right` | No | `'right'` | The position of the axis relative to the charts drawing area. |
533
577
  | `requestedTickCount` | `number` | No | `5 (for y-axis)` | Requested number of ticks to display. This value is passed into d3 and may not be respected. |
@@ -535,14 +579,14 @@ You can customize the tick labels using the `tickLabelFormatter` prop.
535
579
  | `showLine` | `boolean` | No | `-` | Whether to show the axis line. |
536
580
  | `showTickMarks` | `boolean` | No | `-` | Whether to show tick marks on the axis. |
537
581
  | `style` | `CSSProperties` | No | `-` | Custom style for the axis. |
538
- | `styles` | `{ root?: CSSProperties; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the axis. |
582
+ | `styles` | `{ root?: CSSProperties; label?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the axis. |
539
583
  | `tickInterval` | `number` | No | `32 (for x-axis)` | Interval at which to show ticks. When provided, calculates tick count based on available space. |
540
- | `tickLabelFormatter` | `((value: any) => ChartTextChildren)` | No | `-` | Formatter function for axis tick values. Tick values will be wrapped in ChartText component. |
584
+ | `tickLabelFormatter` | `((value: number) => ChartTextChildren)` | No | `-` | Formatter function for axis tick values. Tick values will be wrapped in ChartText component. |
541
585
  | `tickMarkLabelGap` | `number` | No | `2 for x-axis, 8 for y-axis` | Space between the axis tick mark and labels. If tick marks are not shown, this is the gap between the axis and the chart. |
542
586
  | `tickMarkSize` | `number` | No | `4` | Size of the tick marks. |
543
587
  | `tickMaxStep` | `number` | No | `-` | Maximum step size for tick generation. Prevents the step from being larger than this value. |
544
588
  | `tickMinStep` | `number` | No | `1` | Minimum step size for tick generation. Prevents the step from being smaller than this value. |
545
589
  | `ticks` | `number[] \| ((value: number) => boolean)` | No | `-` | Custom tick configuration for the axis. When provided, this overrides the requestedTickCount property. - **Array**: Uses these exact values for tick positioning and labels. - **Function**: Filters based on the predicate function. - For **x-axis**: Checks every data index (0, 1, 2, ..., dataLength-1) - For **y-axis**: Filters d3-generated tick values |
546
- | `width` | `number` | No | `44` | Width of the axis. This value is inclusive of the padding. |
590
+ | `width` | `number` | No | `44 when no label is provided, 64 when a label is provided` | Width of the axis. This value is inclusive of the padding. |
547
591
 
548
592
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mcp-server",
3
- "version": "8.21.8",
3
+ "version": "8.22.1",
4
4
  "description": "Coinbase Design System - MCP Server",
5
5
  "repository": {
6
6
  "type": "git",