@coinbase/cds-web-visualization 3.4.0-beta.5 → 3.4.0-beta.7

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 (167) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dts/chart/CartesianChart.d.ts +38 -2
  3. package/dts/chart/CartesianChart.d.ts.map +1 -1
  4. package/dts/chart/Path.d.ts +27 -7
  5. package/dts/chart/Path.d.ts.map +1 -1
  6. package/dts/chart/PeriodSelector.d.ts +0 -4
  7. package/dts/chart/PeriodSelector.d.ts.map +1 -1
  8. package/dts/chart/area/Area.d.ts +54 -24
  9. package/dts/chart/area/Area.d.ts.map +1 -1
  10. package/dts/chart/area/AreaChart.d.ts +33 -6
  11. package/dts/chart/area/AreaChart.d.ts.map +1 -1
  12. package/dts/chart/area/DottedArea.d.ts +21 -44
  13. package/dts/chart/area/DottedArea.d.ts.map +1 -1
  14. package/dts/chart/area/GradientArea.d.ts +21 -12
  15. package/dts/chart/area/GradientArea.d.ts.map +1 -1
  16. package/dts/chart/area/SolidArea.d.ts +16 -1
  17. package/dts/chart/area/SolidArea.d.ts.map +1 -1
  18. package/dts/chart/axis/Axis.d.ts +89 -43
  19. package/dts/chart/axis/Axis.d.ts.map +1 -1
  20. package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
  21. package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
  22. package/dts/chart/axis/XAxis.d.ts +1 -1
  23. package/dts/chart/axis/XAxis.d.ts.map +1 -1
  24. package/dts/chart/axis/YAxis.d.ts +1 -1
  25. package/dts/chart/axis/YAxis.d.ts.map +1 -1
  26. package/dts/chart/axis/index.d.ts +1 -0
  27. package/dts/chart/axis/index.d.ts.map +1 -1
  28. package/dts/chart/bar/Bar.d.ts +16 -13
  29. package/dts/chart/bar/Bar.d.ts.map +1 -1
  30. package/dts/chart/bar/BarChart.d.ts +17 -8
  31. package/dts/chart/bar/BarChart.d.ts.map +1 -1
  32. package/dts/chart/bar/BarPlot.d.ts +2 -1
  33. package/dts/chart/bar/BarPlot.d.ts.map +1 -1
  34. package/dts/chart/bar/BarStack.d.ts +40 -48
  35. package/dts/chart/bar/BarStack.d.ts.map +1 -1
  36. package/dts/chart/bar/BarStackGroup.d.ts +1 -0
  37. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
  38. package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
  39. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
  40. package/dts/chart/gradient/Gradient.d.ts +35 -0
  41. package/dts/chart/gradient/Gradient.d.ts.map +1 -0
  42. package/dts/chart/gradient/index.d.ts +2 -0
  43. package/dts/chart/gradient/index.d.ts.map +1 -0
  44. package/dts/chart/index.d.ts +2 -1
  45. package/dts/chart/index.d.ts.map +1 -1
  46. package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
  47. package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
  48. package/dts/chart/line/DottedLine.d.ts +15 -3
  49. package/dts/chart/line/DottedLine.d.ts.map +1 -1
  50. package/dts/chart/line/Line.d.ts +70 -28
  51. package/dts/chart/line/Line.d.ts.map +1 -1
  52. package/dts/chart/line/LineChart.d.ts +26 -8
  53. package/dts/chart/line/LineChart.d.ts.map +1 -1
  54. package/dts/chart/line/ReferenceLine.d.ts +91 -44
  55. package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
  56. package/dts/chart/line/SolidLine.d.ts +14 -3
  57. package/dts/chart/line/SolidLine.d.ts.map +1 -1
  58. package/dts/chart/line/index.d.ts +1 -1
  59. package/dts/chart/line/index.d.ts.map +1 -1
  60. package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
  61. package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
  62. package/dts/chart/point/Point.d.ts +201 -0
  63. package/dts/chart/point/Point.d.ts.map +1 -0
  64. package/dts/chart/point/index.d.ts +3 -0
  65. package/dts/chart/point/index.d.ts.map +1 -0
  66. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +24 -0
  67. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
  68. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
  69. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
  70. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +10 -0
  71. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
  72. package/dts/chart/scrubber/Scrubber.d.ts +207 -66
  73. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
  74. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +70 -0
  75. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
  76. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +32 -0
  77. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
  78. package/dts/chart/scrubber/index.d.ts +3 -0
  79. package/dts/chart/scrubber/index.d.ts.map +1 -1
  80. package/dts/chart/text/ChartText.d.ts +46 -43
  81. package/dts/chart/text/ChartText.d.ts.map +1 -1
  82. package/dts/chart/text/{SmartChartTextGroup.d.ts → ChartTextGroup.d.ts} +9 -3
  83. package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
  84. package/dts/chart/text/index.d.ts +1 -1
  85. package/dts/chart/text/index.d.ts.map +1 -1
  86. package/dts/chart/utils/chart.d.ts +27 -7
  87. package/dts/chart/utils/chart.d.ts.map +1 -1
  88. package/dts/chart/utils/context.d.ts +6 -0
  89. package/dts/chart/utils/context.d.ts.map +1 -1
  90. package/dts/chart/utils/gradient.d.ts +104 -0
  91. package/dts/chart/utils/gradient.d.ts.map +1 -0
  92. package/dts/chart/utils/index.d.ts +4 -0
  93. package/dts/chart/utils/index.d.ts.map +1 -1
  94. package/dts/chart/utils/interpolate.d.ts +112 -0
  95. package/dts/chart/utils/interpolate.d.ts.map +1 -0
  96. package/dts/chart/utils/path.d.ts +24 -1
  97. package/dts/chart/utils/path.d.ts.map +1 -1
  98. package/dts/chart/utils/point.d.ts +29 -0
  99. package/dts/chart/utils/point.d.ts.map +1 -1
  100. package/dts/chart/utils/scrubber.d.ts +39 -0
  101. package/dts/chart/utils/scrubber.d.ts.map +1 -0
  102. package/dts/chart/utils/transition.d.ts +65 -0
  103. package/dts/chart/utils/transition.d.ts.map +1 -0
  104. package/esm/chart/CartesianChart.js +140 -85
  105. package/esm/chart/Path.js +51 -46
  106. package/esm/chart/PeriodSelector.js +4 -18
  107. package/esm/chart/area/Area.js +24 -34
  108. package/esm/chart/area/AreaChart.js +24 -15
  109. package/esm/chart/area/DottedArea.js +35 -89
  110. package/esm/chart/area/GradientArea.js +34 -80
  111. package/esm/chart/area/SolidArea.js +29 -11
  112. package/esm/chart/axis/Axis.js +4 -25
  113. package/esm/chart/axis/DefaultAxisTickLabel.js +15 -0
  114. package/esm/chart/axis/XAxis.js +53 -36
  115. package/esm/chart/axis/YAxis.js +55 -32
  116. package/esm/chart/axis/index.js +1 -0
  117. package/esm/chart/bar/Bar.js +3 -1
  118. package/esm/chart/bar/BarChart.js +15 -32
  119. package/esm/chart/bar/BarPlot.js +3 -2
  120. package/esm/chart/bar/BarStack.js +65 -23
  121. package/esm/chart/bar/BarStackGroup.js +7 -17
  122. package/esm/chart/bar/DefaultBar.js +4 -7
  123. package/esm/chart/bar/DefaultBarStack.js +5 -7
  124. package/esm/chart/gradient/Gradient.js +104 -0
  125. package/esm/chart/gradient/index.js +1 -0
  126. package/esm/chart/index.js +2 -1
  127. package/esm/chart/line/DefaultReferenceLineLabel.js +81 -0
  128. package/esm/chart/line/DottedLine.js +38 -17
  129. package/esm/chart/line/Line.js +96 -70
  130. package/esm/chart/line/LineChart.js +18 -6
  131. package/esm/chart/line/ReferenceLine.js +41 -43
  132. package/esm/chart/line/SolidLine.js +36 -15
  133. package/esm/chart/line/index.js +1 -1
  134. package/esm/chart/{line/GradientLine.js → point/DefaultPointLabel.js} +31 -45
  135. package/esm/chart/point/Point.css +2 -0
  136. package/esm/chart/{Point.js → point/Point.js} +66 -57
  137. package/esm/chart/point/index.js +2 -0
  138. package/esm/chart/scrubber/DefaultScrubberBeacon.js +155 -0
  139. package/esm/chart/scrubber/{ScrubberBeaconLabel.js → DefaultScrubberBeaconLabel.js} +23 -10
  140. package/esm/chart/scrubber/DefaultScrubberLabel.js +30 -0
  141. package/esm/chart/scrubber/Scrubber.js +98 -392
  142. package/esm/chart/scrubber/ScrubberBeaconGroup.js +166 -0
  143. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +186 -0
  144. package/esm/chart/scrubber/index.js +3 -1
  145. package/esm/chart/text/ChartText.js +13 -19
  146. package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +4 -3
  147. package/esm/chart/text/index.js +1 -1
  148. package/esm/chart/utils/chart.js +29 -3
  149. package/esm/chart/utils/gradient.js +257 -0
  150. package/esm/chart/utils/index.js +4 -0
  151. package/esm/chart/utils/interpolate.js +644 -0
  152. package/esm/chart/utils/path.js +32 -9
  153. package/esm/chart/utils/point.js +69 -0
  154. package/esm/chart/utils/scrubber.js +132 -0
  155. package/esm/chart/utils/transition.js +111 -0
  156. package/package.json +5 -5
  157. package/dts/chart/Point.d.ts +0 -153
  158. package/dts/chart/Point.d.ts.map +0 -1
  159. package/dts/chart/line/GradientLine.d.ts +0 -42
  160. package/dts/chart/line/GradientLine.d.ts.map +0 -1
  161. package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -93
  162. package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
  163. package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts +0 -7
  164. package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts.map +0 -1
  165. package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
  166. package/esm/chart/Point.css +0 -2
  167. package/esm/chart/scrubber/ScrubberBeacon.js +0 -195
@@ -3,12 +3,24 @@ import type { SharedProps } from '@coinbase/cds-common/types';
3
3
  import { type PathProps } from '../Path';
4
4
  import type { LineComponentProps } from './Line';
5
5
  export type DottedLineProps = SharedProps &
6
- Omit<PathProps, 'fill' | 'strokeWidth'> &
7
- Pick<LineComponentProps, 'strokeWidth'> & {
6
+ Pick<
7
+ PathProps,
8
+ | 'className'
9
+ | 'clipOffset'
10
+ | 'clipRect'
11
+ | 'strokeLinecap'
12
+ | 'strokeLinejoin'
13
+ | 'strokeDasharray'
14
+ | 'strokeDashoffset'
15
+ | 'style'
16
+ | 'vectorEffect'
17
+ > &
18
+ LineComponentProps & {
8
19
  fill?: SVGProps<SVGPathElement>['fill'];
9
20
  };
10
21
  /**
11
- * A customizable dotted line component which uses path element.
22
+ * A customizable dotted line component.
23
+ * Supports gradient for gradient effects on the dots.
12
24
  */
13
25
  export declare const DottedLine: import('react').NamedExoticComponent<DottedLineProps>;
14
26
  //# sourceMappingURL=DottedLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DottedLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/DottedLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,WAAW,GACvC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,GACvC,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG;IACxC,IAAI,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,UAAU,uDA2BtB,CAAC"}
1
+ {"version":3,"file":"DottedLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/DottedLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAS,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,WAAW,GACvC,IAAI,CACF,SAAS,EACP,WAAW,GACX,YAAY,GACZ,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,OAAO,GACP,cAAc,CACjB,GACD,kBAAkB,GAAG;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,UAAU,uDAkDtB,CAAC"}
@@ -1,40 +1,27 @@
1
1
  import React from 'react';
2
2
  import type { SVGProps } from 'react';
3
3
  import type { SharedProps } from '@coinbase/cds-common/types';
4
+ import { type Transition } from 'framer-motion';
4
5
  import { type AreaComponent } from '../area/Area';
5
- import { type PointConfig, type RenderPointsParams } from '../Point';
6
- import { type ChartPathCurveType } from '../utils';
7
- export type LineComponentProps = {
8
- d: SVGProps<SVGPathElement>['d'];
9
- stroke: string;
10
- strokeOpacity?: number;
11
- strokeWidth?: number;
12
- testID?: string;
13
- animate?: boolean;
14
- };
15
- export type LineComponent = React.FC<LineComponentProps>;
16
- export type LineProps = SharedProps & {
6
+ import { type PointBaseProps, type PointProps } from '../point';
7
+ import { type ChartPathCurveType, type GradientDefinition } from '../utils';
8
+ export type LineBaseProps = SharedProps & {
17
9
  /**
18
10
  * The ID of the series to render. Will be used to find the data from the chart context.
19
11
  */
20
12
  seriesId: string;
21
13
  /**
22
14
  * The curve interpolation method to use for the line.
23
- * @default 'linear'
15
+ * @default 'bump'
24
16
  */
25
17
  curve?: ChartPathCurveType;
26
18
  /**
27
19
  * The type of line to render.
28
20
  * @default 'solid'
29
21
  */
30
- type?: 'solid' | 'dotted' | 'gradient';
31
- /**
32
- * Handler for when a dot is clicked.
33
- * Automatically makes dots appear pressable when provided.
34
- */
35
- onPointClick?: PointConfig['onClick'];
22
+ type?: 'solid' | 'dotted';
36
23
  /**
37
- * Show area fill under the line.
24
+ * Whether to show area fill under the line.
38
25
  */
39
26
  showArea?: boolean;
40
27
  /**
@@ -56,25 +43,80 @@ export type LineProps = SharedProps & {
56
43
  * Custom component to render line area fill.
57
44
  */
58
45
  AreaComponent?: AreaComponent;
46
+ /**
47
+ * Opacity of the line's stroke.
48
+ * Will also be applied to points and area fill.
49
+ * @default 1
50
+ */
51
+ opacity?: number;
52
+ /**
53
+ * Controls whether and how to render points at each data point in the series.
54
+ * - `true`: Show all points with default styling
55
+ * - `false` or `undefined`: Hide all points
56
+ * - Function: Called for every entry in the data array to customize individual points
57
+ *
58
+ * @param defaults - The default point props computed by the Line component
59
+ * @returns true for default point, false/null/undefined for no point, or Partial<PointProps> to customize
60
+ */
61
+ points?:
62
+ | boolean
63
+ | ((defaults: PointBaseProps) => boolean | null | undefined | Partial<PointProps>);
64
+ /**
65
+ * When true, the area is connected across null values.
66
+ */
67
+ connectNulls?: boolean;
59
68
  /**
60
69
  * The color of the line.
61
70
  * @default color of the series or 'var(--color-fgPrimary)'
62
71
  */
63
72
  stroke?: string;
64
73
  /**
65
- * Opacity of the line.
74
+ * Opacity of the line
75
+ * @note when combined with gradient, both will be applied
66
76
  * @default 1
67
77
  */
68
- opacity?: number;
78
+ strokeOpacity?: number;
69
79
  /**
70
- * Callback function to determine how to render points at each data point in the series.
71
- * Called for every entry in the data array.
72
- *
73
- * @param params - Contains the data and pixel coordinates of the data point.
74
- * @returns true for default point, false/null/undefined for no point, or PointConfig for custom point
80
+ * Width of the line
81
+ * @default 2
75
82
  */
76
- renderPoints?: (params: RenderPointsParams) => boolean | null | undefined | PointConfig;
77
83
  strokeWidth?: number;
84
+ /**
85
+ * Gradient configuration.
86
+ * When provided, creates gradient or threshold-based coloring.
87
+ */
88
+ gradient?: GradientDefinition;
89
+ /**
90
+ * Whether to animate the line.
91
+ * Overrides the animate value from the chart context.
92
+ */
93
+ animate?: boolean;
94
+ };
95
+ export type LineProps = LineBaseProps & {
96
+ /**
97
+ * Transition configuration for line animations.
98
+ */
99
+ transition?: Transition;
100
+ /**
101
+ * Handler for when a point is clicked.
102
+ * Passed through to Point components rendered via points.
103
+ */
104
+ onPointClick?: PointProps['onClick'];
78
105
  };
106
+ export type LineComponentProps = Pick<
107
+ LineProps,
108
+ 'stroke' | 'strokeOpacity' | 'strokeWidth' | 'gradient' | 'animate' | 'transition'
109
+ > & {
110
+ /**
111
+ * Path of the line
112
+ */
113
+ d: SVGProps<SVGPathElement>['d'];
114
+ /**
115
+ * ID of the y-axis to use.
116
+ * If not provided, defaults to the default y-axis.
117
+ */
118
+ yAxisId?: string;
119
+ };
120
+ export type LineComponent = React.FC<LineComponentProps>;
79
121
  export declare const Line: React.NamedExoticComponent<LineProps>;
80
122
  //# sourceMappingURL=Line.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../src/chart/line/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAS,KAAK,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,UAAU,CAAC;AAMhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,G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AM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,SAAS,EACT,QAAQ,GAAG,eAAe,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,CACnF,GAAG;IACF;;OAEG;IACH,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEzD,eAAO,MAAM,IAAI,uCA8MhB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type XAxisProps } from '../axis/XAxis';
2
2
  import { type YAxisProps } from '../axis/YAxis';
3
- import { type CartesianChartProps } from '../CartesianChart';
3
+ import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
4
4
  import { type AxisConfigProps, type Series } from '../utils';
5
5
  import { type LineProps } from './Line';
6
6
  export type LineSeries = Series &
@@ -8,32 +8,38 @@ export type LineSeries = Series &
8
8
  Pick<
9
9
  LineProps,
10
10
  | 'curve'
11
- | 'onPointClick'
12
11
  | 'showArea'
13
12
  | 'areaType'
14
13
  | 'areaBaseline'
15
14
  | 'type'
16
- | 'type'
17
15
  | 'LineComponent'
18
16
  | 'AreaComponent'
19
17
  | 'stroke'
20
- | 'opacity'
21
- | 'renderPoints'
22
18
  | 'strokeWidth'
19
+ | 'strokeOpacity'
20
+ | 'opacity'
21
+ | 'points'
22
+ | 'connectNulls'
23
+ | 'transition'
24
+ | 'onPointClick'
23
25
  >
24
26
  >;
25
- export type LineChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'> &
27
+ export type LineChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
26
28
  Pick<
27
29
  LineProps,
28
30
  | 'showArea'
29
31
  | 'areaType'
30
32
  | 'type'
31
- | 'onPointClick'
32
33
  | 'LineComponent'
33
34
  | 'AreaComponent'
34
35
  | 'curve'
35
- | 'renderPoints'
36
+ | 'points'
36
37
  | 'strokeWidth'
38
+ | 'strokeOpacity'
39
+ | 'connectNulls'
40
+ | 'transition'
41
+ | 'onPointClick'
42
+ | 'opacity'
37
43
  > & {
38
44
  /**
39
45
  * Configuration objects that define how to visualize the data.
@@ -48,9 +54,21 @@ export type LineChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'seri
48
54
  * Whether to show the Y axis.
49
55
  */
50
56
  showYAxis?: boolean;
57
+ /**
58
+ * Configuration for x-axis.
59
+ * Accepts axis config and axis props.
60
+ * To show the axis, set `showXAxis` to true.
61
+ */
51
62
  xAxis?: Partial<AxisConfigProps> & XAxisProps;
63
+ /**
64
+ * Configuration for y-axis.
65
+ * Accepts axis config and axis props.
66
+ * To show the axis, set `showYAxis` to true.
67
+ */
52
68
  yAxis?: Partial<AxisConfigProps> & YAxisProps;
53
69
  };
70
+ export type LineChartProps = LineChartBaseProps &
71
+ Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
54
72
  export declare const LineChart: import('react').MemoExoticComponent<
55
73
  import('react').ForwardRefExoticComponent<
56
74
  Omit<LineChartProps, 'ref'> & import('react').RefAttributes<SVGSVGElement>
@@ -1 +1 @@
1
- {"version":3,"file":"LineChart.d.ts","sourceRoot":"","sources":["../../../src/chart/line/LineChart.tsx"],"names":[],"mappings":"AAEA,OAA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AAO,GAAG,QAAQ,CAAC,CAAC;AAE1D,eAAO,MAAM,SAAS,4JA0HrB,CAAC"}
@@ -6,12 +6,14 @@ import type {
6
6
  TextHorizontalAlignment,
7
7
  TextVerticalAlignment,
8
8
  } from '../text/ChartText';
9
+ import type { ChartInset } from '../utils';
9
10
  import type { LineComponent } from './Line';
10
- /**
11
- * Configuration for ReferenceLine label rendering using ChartText.
12
- */
13
- export type ReferenceLineLabelProps = Pick<
11
+ export type ReferenceLineLabelComponentProps = Pick<
14
12
  ChartTextProps,
13
+ | 'x'
14
+ | 'y'
15
+ | 'children'
16
+ | 'testID'
15
17
  | 'dx'
16
18
  | 'dy'
17
19
  | 'font'
@@ -19,18 +21,27 @@ export type ReferenceLineLabelProps = Pick<
19
21
  | 'fontSize'
20
22
  | 'fontWeight'
21
23
  | 'color'
22
- | 'elevation'
24
+ | 'elevated'
23
25
  | 'inset'
24
26
  | 'background'
25
27
  | 'borderRadius'
26
28
  | 'disableRepositioning'
27
- | 'bounds'
28
29
  | 'styles'
29
30
  | 'classNames'
30
31
  | 'horizontalAlignment'
31
32
  | 'verticalAlignment'
32
- >;
33
- type BaseReferenceLineProps = SharedProps & {
33
+ | 'className'
34
+ | 'style'
35
+ | 'opacity'
36
+ > & {
37
+ /**
38
+ * Bounds inset for label to prevent cutoff at chart edges.
39
+ * @default { top: 4, bottom: 20, left: 12, right: 12 } when elevated is true, otherwise undefined
40
+ */
41
+ boundsInset?: number | ChartInset;
42
+ };
43
+ export type ReferenceLineLabelComponent = React.FC<ReferenceLineLabelComponentProps>;
44
+ export type ReferenceLineBaseProps = SharedProps & {
34
45
  /**
35
46
  * Label content to display near the reference line.
36
47
  * Can be a string or ReactNode for rich formatting.
@@ -49,17 +60,85 @@ type BaseReferenceLineProps = SharedProps & {
49
60
  * @default DottedLine
50
61
  */
51
62
  LineComponent?: LineComponent;
63
+ /**
64
+ * Component to render the label.
65
+ * @default DefaultReferenceLineLabel
66
+ */
67
+ LabelComponent?: ReferenceLineLabelComponent;
68
+ /**
69
+ * Whether to elevate the label with a shadow.
70
+ * When true, applies elevation and automatically adds bounds to keep label within chart area.
71
+ */
72
+ labelElevated?: boolean;
73
+ /**
74
+ * Font style for the label text.
75
+ */
76
+ labelFont?: ChartTextProps['font'];
77
+ /**
78
+ * Horizontal offset for the label in pixels.
79
+ */
80
+ labelDx?: number;
81
+ /**
82
+ * Vertical offset for the label in pixels.
83
+ */
84
+ labelDy?: number;
85
+ /**
86
+ * Horizontal alignment of the label text.
87
+ */
88
+ labelHorizontalAlignment?: TextHorizontalAlignment;
89
+ /**
90
+ * Vertical alignment of the label text.
91
+ */
92
+ labelVerticalAlignment?: TextVerticalAlignment;
93
+ /**
94
+ * Bounds inset for the label to prevent cutoff at chart edges.
95
+ * Especially useful when labelElevated is true to prevent shadow clipping.
96
+ * Can be a number (applied to all sides) or a ChartInset object.
97
+ * @default { top: 4, bottom: 20, left: 12, right: 12 } when labelElevated is true, otherwise none
98
+ */
99
+ labelBoundsInset?: number | ChartInset;
52
100
  /**
53
101
  * The color of the line.
54
102
  * @default 'var(--color-bgLine)'
55
103
  */
56
104
  stroke?: string;
57
105
  /**
58
- * Props for the label rendering.
59
- * Consolidates styling and positioning options for the ChartText component.
60
- * Alignment defaults are set based on line orientation and can be overridden here.
106
+ * Opacity applied to both the line and label.
107
+ * @default 1
108
+ */
109
+ opacity?: number;
110
+ };
111
+ export type HorizontalReferenceLineProps = ReferenceLineBaseProps & {
112
+ /**
113
+ * Y-value for horizontal reference line (data value).
114
+ */
115
+ dataY: number;
116
+ /**
117
+ * The ID of the y-axis to use for positioning.
118
+ * Defaults to defaultAxisId if not specified.
119
+ */
120
+ yAxisId?: string;
121
+ /**
122
+ * Position of the label along the horizontal line.
123
+ * @default 'right'
124
+ */
125
+ labelPosition?: TextHorizontalAlignment;
126
+ dataX?: never;
127
+ };
128
+ export type VerticalReferenceLineProps = ReferenceLineBaseProps & {
129
+ /**
130
+ * X-value for vertical reference line (data index).
131
+ */
132
+ dataX: number;
133
+ /**
134
+ * Position of the label along the vertical line.
135
+ * @default 'top'
61
136
  */
62
- labelProps?: ReferenceLineLabelProps;
137
+ labelPosition?: TextVerticalAlignment;
138
+ dataY?: never;
139
+ yAxisId?: never;
140
+ };
141
+ export type ReferenceLineProps = (HorizontalReferenceLineProps | VerticalReferenceLineProps) & {
63
142
  /**
64
143
  * Custom class name for the root element.
65
144
  */
@@ -95,37 +174,5 @@ type BaseReferenceLineProps = SharedProps & {
95
174
  label?: React.CSSProperties;
96
175
  };
97
176
  };
98
- export type HorizontalReferenceLineProps = BaseReferenceLineProps & {
99
- /**
100
- * Y-value for horizontal reference line (data value).
101
- */
102
- dataY: number;
103
- /**
104
- * The ID of the y-axis to use for positioning.
105
- * Defaults to defaultAxisId if not specified.
106
- */
107
- yAxisId?: string;
108
- /**
109
- * Position of the label along the horizontal line.
110
- * @default 'right'
111
- */
112
- labelPosition?: TextHorizontalAlignment;
113
- dataX?: never;
114
- };
115
- export type VerticalReferenceLineProps = BaseReferenceLineProps & {
116
- /**
117
- * X-value for vertical reference line (data index).
118
- */
119
- dataX: number;
120
- /**
121
- * Position of the label along the vertical line.
122
- * @default 'top'
123
- */
124
- labelPosition?: TextVerticalAlignment;
125
- dataY?: never;
126
- yAxisId?: never;
127
- };
128
- export type ReferenceLineProps = HorizontalReferenceLineProps | VerticalReferenceLineProps;
129
177
  export declare const ReferenceLine: React.NamedExoticComponent<ReferenceLineProps>;
130
- export {};
131
178
  //# sourceMappingURL=ReferenceLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReferenceLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/ReferenceLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAK9D,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,mBAAmB,CAA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GAAG;IAC7F;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC7B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,aAAa,gDA2IzB,CAAC"}
@@ -3,12 +3,23 @@ import type { SharedProps } from '@coinbase/cds-common/types';
3
3
  import { type PathProps } from '../Path';
4
4
  import type { LineComponentProps } from './Line';
5
5
  export type SolidLineProps = SharedProps &
6
- Omit<PathProps, 'fill' | 'strokeWidth'> &
7
- Pick<LineComponentProps, 'strokeWidth'> & {
6
+ Pick<
7
+ PathProps,
8
+ | 'className'
9
+ | 'clipOffset'
10
+ | 'clipRect'
11
+ | 'strokeLinecap'
12
+ | 'strokeLinejoin'
13
+ | 'strokeDasharray'
14
+ | 'strokeDashoffset'
15
+ | 'style'
16
+ > &
17
+ LineComponentProps & {
8
18
  fill?: SVGProps<SVGPathElement>['fill'];
9
19
  };
10
20
  /**
11
- * A customizable solid line component which uses path element.
21
+ * A customizable solid line component.
22
+ * Supports gradient for gradient effects and smooth data transitions.
12
23
  */
13
24
  export declare const SolidLine: import('react').NamedExoticComponent<SolidLineProps>;
14
25
  //# sourceMappingURL=SolidLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/SolidLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,WAAW,GACtC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,GACvC,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GAAG;IACxC,IAAI,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,SAAS,sDAuBrB,CAAC"}
1
+ {"version":3,"file":"SolidLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/SolidLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAS,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,WAAW,GACtC,IAAI,CACF,SAAS,EACP,WAAW,GACX,YAAY,GACZ,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,OAAO,CACV,GACD,kBAAkB,GAAG;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,SAAS,sDA8CrB,CAAC"}
@@ -1,5 +1,5 @@
1
+ export * from './DefaultReferenceLineLabel';
1
2
  export * from './DottedLine';
2
- export * from './GradientLine';
3
3
  export * from './Line';
4
4
  export * from './LineChart';
5
5
  export * from './ReferenceLine';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/line/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/line/index.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type ChartTextProps } from '../text';
2
+ import type { PointLabelProps } from './Point';
3
+ export type DefaultPointLabelProps = PointLabelProps &
4
+ Omit<ChartTextProps, 'children' | 'x' | 'y' | 'horizontalAlignment' | 'verticalAlignment'>;
5
+ /**
6
+ * DefaultPointLabel is the default label component for point labels.
7
+ * It renders text at the specified position relative to the point.
8
+ */
9
+ export declare const DefaultPointLabel: import('react').NamedExoticComponent<DefaultPointLabelProps>;
10
+ //# sourceMappingURL=DefaultPointLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultPointLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/point/DefaultPointLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8DAwB7B,CAAC"}