@coinbase/cds-web-visualization 3.3.2 → 3.4.0-beta.10
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 +50 -2
- package/dts/chart/CartesianChart.d.ts +72 -0
- package/dts/chart/CartesianChart.d.ts.map +1 -0
- package/dts/chart/ChartProvider.d.ts +6 -0
- package/dts/chart/ChartProvider.d.ts.map +1 -0
- package/dts/chart/Path.d.ts +54 -0
- package/dts/chart/Path.d.ts.map +1 -0
- package/dts/chart/PeriodSelector.d.ts +57 -0
- package/dts/chart/PeriodSelector.d.ts.map +1 -0
- package/dts/chart/area/Area.d.ts +78 -0
- package/dts/chart/area/Area.d.ts.map +1 -0
- package/dts/chart/area/AreaChart.d.ts +79 -0
- package/dts/chart/area/AreaChart.d.ts.map +1 -0
- package/dts/chart/area/DottedArea.d.ts +45 -0
- package/dts/chart/area/DottedArea.d.ts.map +1 -0
- package/dts/chart/area/GradientArea.d.ts +39 -0
- package/dts/chart/area/GradientArea.d.ts.map +1 -0
- package/dts/chart/area/SolidArea.d.ts +23 -0
- package/dts/chart/area/SolidArea.d.ts.map +1 -0
- package/dts/chart/area/index.d.ts +6 -0
- package/dts/chart/area/index.d.ts.map +1 -0
- package/dts/chart/axis/Axis.d.ts +255 -0
- package/dts/chart/axis/Axis.d.ts.map +1 -0
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
- package/dts/chart/axis/XAxis.d.ts +16 -0
- package/dts/chart/axis/XAxis.d.ts.map +1 -0
- package/dts/chart/axis/YAxis.d.ts +21 -0
- package/dts/chart/axis/YAxis.d.ts.map +1 -0
- package/dts/chart/axis/index.d.ts +5 -0
- package/dts/chart/axis/index.d.ts.map +1 -0
- package/dts/chart/bar/Bar.d.ts +94 -0
- package/dts/chart/bar/Bar.d.ts.map +1 -0
- package/dts/chart/bar/BarChart.d.ts +62 -0
- package/dts/chart/bar/BarChart.d.ts.map +1 -0
- package/dts/chart/bar/BarPlot.d.ts +30 -0
- package/dts/chart/bar/BarPlot.d.ts.map +1 -0
- package/dts/chart/bar/BarStack.d.ts +103 -0
- package/dts/chart/bar/BarStack.d.ts.map +1 -0
- package/dts/chart/bar/BarStackGroup.d.ts +36 -0
- package/dts/chart/bar/BarStackGroup.d.ts.map +1 -0
- package/dts/chart/bar/DefaultBar.d.ts +17 -0
- package/dts/chart/bar/DefaultBar.d.ts.map +1 -0
- package/dts/chart/bar/DefaultBarStack.d.ts +16 -0
- package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -0
- package/dts/chart/bar/index.d.ts +8 -0
- package/dts/chart/bar/index.d.ts.map +1 -0
- package/dts/chart/gradient/Gradient.d.ts +35 -0
- package/dts/chart/gradient/Gradient.d.ts.map +1 -0
- package/dts/chart/gradient/index.d.ts +2 -0
- package/dts/chart/gradient/index.d.ts.map +1 -0
- package/dts/chart/index.d.ts +14 -0
- package/dts/chart/index.d.ts.map +1 -0
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
- package/dts/chart/line/DottedLine.d.ts +26 -0
- package/dts/chart/line/DottedLine.d.ts.map +1 -0
- package/dts/chart/line/Line.d.ts +122 -0
- package/dts/chart/line/Line.d.ts.map +1 -0
- package/dts/chart/line/LineChart.d.ts +77 -0
- package/dts/chart/line/LineChart.d.ts.map +1 -0
- package/dts/chart/line/ReferenceLine.d.ts +178 -0
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -0
- package/dts/chart/line/SolidLine.d.ts +25 -0
- package/dts/chart/line/SolidLine.d.ts.map +1 -0
- package/dts/chart/line/index.d.ts +7 -0
- package/dts/chart/line/index.d.ts.map +1 -0
- package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
- package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
- package/dts/chart/point/Point.d.ts +201 -0
- package/dts/chart/point/Point.d.ts.map +1 -0
- package/dts/chart/point/index.d.ts +3 -0
- package/dts/chart/point/index.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +24 -0
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +10 -0
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/Scrubber.d.ts +290 -0
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +70 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +32 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts +17 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
- package/dts/chart/scrubber/index.d.ts +5 -0
- package/dts/chart/scrubber/index.d.ts.map +1 -0
- package/dts/chart/text/ChartText.d.ts +117 -0
- package/dts/chart/text/ChartText.d.ts.map +1 -0
- package/dts/chart/text/ChartTextGroup.d.ts +61 -0
- package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
- package/dts/chart/text/index.d.ts +3 -0
- package/dts/chart/text/index.d.ts.map +1 -0
- package/dts/chart/utils/axis.d.ts +342 -0
- package/dts/chart/utils/axis.d.ts.map +1 -0
- package/dts/chart/utils/bar.d.ts +20 -0
- package/dts/chart/utils/bar.d.ts.map +1 -0
- package/dts/chart/utils/chart.d.ts +117 -0
- package/dts/chart/utils/chart.d.ts.map +1 -0
- package/dts/chart/utils/context.d.ts +101 -0
- package/dts/chart/utils/context.d.ts.map +1 -0
- package/dts/chart/utils/gradient.d.ts +104 -0
- package/dts/chart/utils/gradient.d.ts.map +1 -0
- package/dts/chart/utils/index.d.ts +12 -0
- package/dts/chart/utils/index.d.ts.map +1 -0
- package/dts/chart/utils/interpolate.d.ts +112 -0
- package/dts/chart/utils/interpolate.d.ts.map +1 -0
- package/dts/chart/utils/path.d.ts +130 -0
- package/dts/chart/utils/path.d.ts.map +1 -0
- package/dts/chart/utils/point.d.ts +104 -0
- package/dts/chart/utils/point.d.ts.map +1 -0
- package/dts/chart/utils/scale.d.ts +43 -0
- package/dts/chart/utils/scale.d.ts.map +1 -0
- package/dts/chart/utils/scrubber.d.ts +39 -0
- package/dts/chart/utils/scrubber.d.ts.map +1 -0
- package/dts/chart/utils/transition.d.ts +65 -0
- package/dts/chart/utils/transition.d.ts.map +1 -0
- package/dts/index.d.ts +1 -0
- package/dts/index.d.ts.map +1 -1
- package/dts/sparkline/Sparkline.d.ts +44 -9
- package/dts/sparkline/Sparkline.d.ts.map +1 -1
- package/dts/sparkline/SparklineArea.d.ts +4 -0
- package/dts/sparkline/SparklineArea.d.ts.map +1 -1
- package/dts/sparkline/SparklineAreaPattern.d.ts +5 -0
- package/dts/sparkline/SparklineAreaPattern.d.ts.map +1 -1
- package/dts/sparkline/SparklineGradient.d.ts +5 -0
- package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
- package/dts/sparkline/generateSparklineWithId.d.ts +1 -0
- package/dts/sparkline/generateSparklineWithId.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +9 -0
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +3 -0
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +2 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -1
- package/esm/chart/CartesianChart.css +1 -0
- package/esm/chart/CartesianChart.js +313 -0
- package/esm/chart/ChartProvider.js +10 -0
- package/esm/chart/Path.js +95 -0
- package/esm/chart/PeriodSelector.css +1 -0
- package/esm/chart/PeriodSelector.js +112 -0
- package/esm/chart/area/Area.js +75 -0
- package/esm/chart/area/AreaChart.js +173 -0
- package/esm/chart/area/DottedArea.js +87 -0
- package/esm/chart/area/GradientArea.js +65 -0
- package/esm/chart/area/SolidArea.js +47 -0
- package/esm/chart/area/index.js +7 -0
- package/esm/chart/axis/Axis.js +25 -0
- package/esm/chart/axis/DefaultAxisTickLabel.js +15 -0
- package/esm/chart/axis/XAxis.css +2 -0
- package/esm/chart/axis/XAxis.js +219 -0
- package/esm/chart/axis/YAxis.css +2 -0
- package/esm/chart/axis/YAxis.js +214 -0
- package/esm/chart/axis/index.js +6 -0
- package/esm/chart/bar/Bar.js +61 -0
- package/esm/chart/bar/BarChart.js +130 -0
- package/esm/chart/bar/BarPlot.js +97 -0
- package/esm/chart/bar/BarStack.js +561 -0
- package/esm/chart/bar/BarStackGroup.js +86 -0
- package/esm/chart/bar/DefaultBar.js +61 -0
- package/esm/chart/bar/DefaultBarStack.js +58 -0
- package/esm/chart/bar/index.js +9 -0
- package/esm/chart/gradient/Gradient.js +104 -0
- package/esm/chart/gradient/index.js +1 -0
- package/esm/chart/index.js +15 -0
- package/esm/chart/line/DefaultReferenceLineLabel.js +81 -0
- package/esm/chart/line/DottedLine.js +59 -0
- package/esm/chart/line/Line.js +185 -0
- package/esm/chart/line/LineChart.js +132 -0
- package/esm/chart/line/ReferenceLine.js +140 -0
- package/esm/chart/line/SolidLine.js +55 -0
- package/esm/chart/line/index.js +8 -0
- package/esm/chart/point/DefaultPointLabel.js +44 -0
- package/esm/chart/point/Point.css +2 -0
- package/esm/chart/point/Point.js +180 -0
- package/esm/chart/point/index.js +2 -0
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +155 -0
- package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +46 -0
- package/esm/chart/scrubber/DefaultScrubberLabel.js +30 -0
- package/esm/chart/scrubber/Scrubber.js +189 -0
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +166 -0
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +186 -0
- package/esm/chart/scrubber/ScrubberProvider.js +228 -0
- package/esm/chart/scrubber/index.js +4 -0
- package/esm/chart/text/ChartText.js +230 -0
- package/esm/chart/text/ChartTextGroup.js +227 -0
- package/esm/chart/text/index.js +4 -0
- package/esm/chart/utils/axis.js +593 -0
- package/esm/chart/utils/bar.js +24 -0
- package/esm/chart/utils/chart.js +255 -0
- package/esm/chart/utils/context.js +15 -0
- package/esm/chart/utils/gradient.js +257 -0
- package/esm/chart/utils/index.js +13 -0
- package/esm/chart/utils/interpolate.js +644 -0
- package/esm/chart/utils/path.js +227 -0
- package/esm/chart/utils/point.js +187 -0
- package/esm/chart/utils/scale.js +48 -0
- package/esm/chart/utils/scrubber.js +132 -0
- package/esm/chart/utils/transition.js +111 -0
- package/esm/index.js +4 -1
- package/esm/sparkline/Sparkline.js +129 -15
- package/esm/sparkline/SparklineArea.js +7 -2
- package/esm/sparkline/SparklineAreaPattern.js +4 -2
- package/esm/sparkline/SparklineGradient.js +16 -58
- package/esm/sparkline/generateSparklineWithId.js +3 -2
- package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +5 -1
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +5 -2
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.js +1 -1
- package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +4 -0
- package/package.json +13 -9
package/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,59 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
-
## 3.
|
|
11
|
+
## 3.4.0-beta.10 (1/6/2026 PST)
|
|
12
12
|
|
|
13
13
|
#### 🐞 Fixes
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- Fix axis clip line issues when multiple axes are present on one side. [[#285](https://github.com/coinbase/cds/pull/285)]
|
|
16
|
+
|
|
17
|
+
## 3.4.0-beta.9 (12/18/2025 PST)
|
|
18
|
+
|
|
19
|
+
This is an artificial version bump with no new change.
|
|
20
|
+
|
|
21
|
+
## 3.4.0-beta.8 (12/2/2025 PST)
|
|
22
|
+
|
|
23
|
+
This is an artificial version bump with no new change.
|
|
24
|
+
|
|
25
|
+
## 3.4.0-beta.7 (12/2/2025 PST)
|
|
26
|
+
|
|
27
|
+
#### 🐞 Fixes
|
|
28
|
+
|
|
29
|
+
- Improve opacity customization for ReferenceLine. [[#201](https://github.com/coinbase/cds/pull/201)]
|
|
30
|
+
|
|
31
|
+
## 3.4.0-beta.6 (10/16/2025 PST)
|
|
32
|
+
|
|
33
|
+
#### 🚀 Updates
|
|
34
|
+
|
|
35
|
+
- Support connecting null values in Area and Line
|
|
36
|
+
- Added label to XAxis and YAxis
|
|
37
|
+
- Added gradient support
|
|
38
|
+
- Improved charts accessibility support
|
|
39
|
+
|
|
40
|
+
## 3.4.0-beta.5 (11/4/2025 PST)
|
|
41
|
+
|
|
42
|
+
This is an artificial version bump with no new change.
|
|
43
|
+
|
|
44
|
+
## 3.4.0-beta.4 (10/27/2025 PST)
|
|
45
|
+
|
|
46
|
+
This is an artificial version bump with no new change.
|
|
47
|
+
|
|
48
|
+
## 3.4.0-beta.3 (10/6/2025 PST)
|
|
49
|
+
|
|
50
|
+
#### 🐞 Fixes
|
|
51
|
+
|
|
52
|
+
- Factor sparkline container offset in axis label calculations. [[#88](https://github.com/coinbase/cds/pull/88)]
|
|
53
|
+
|
|
54
|
+
## 3.4.0-beta.2 (10/6/2025 PST)
|
|
55
|
+
|
|
56
|
+
This is an artificial version bump with no new change.
|
|
57
|
+
|
|
58
|
+
## 3.4.0-beta.1 (10/3/2025 PST)
|
|
59
|
+
|
|
60
|
+
#### 🚀 Updates
|
|
61
|
+
|
|
62
|
+
- Introduces new data visualization components: CartesianChart, LineChart, BarChart, etc,
|
|
63
|
+
- Deprecates Sparkline components.
|
|
16
64
|
|
|
17
65
|
## 3.3.1 (10/1/2025 PST)
|
|
18
66
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type BoxBaseProps, type BoxProps } from '@coinbase/cds-web/layout';
|
|
3
|
+
import { type ScrubberProviderProps } from './scrubber/ScrubberProvider';
|
|
4
|
+
import { type AxisConfigProps, type ChartInset, type Series } from './utils';
|
|
5
|
+
export type CartesianChartBaseProps = BoxBaseProps &
|
|
6
|
+
Pick<ScrubberProviderProps, 'enableScrubbing' | 'onScrubberPositionChange'> & {
|
|
7
|
+
/**
|
|
8
|
+
* Configuration objects that define how to visualize the data.
|
|
9
|
+
* Each series contains its own data array.
|
|
10
|
+
*/
|
|
11
|
+
series?: Array<Series>;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to animate the chart.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
animate?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Configuration for x-axis.
|
|
19
|
+
*/
|
|
20
|
+
xAxis?: Partial<Omit<AxisConfigProps, 'id'>>;
|
|
21
|
+
/**
|
|
22
|
+
* Configuration for y-axis(es). Can be a single config or array of configs.
|
|
23
|
+
*/
|
|
24
|
+
yAxis?: Partial<Omit<AxisConfigProps, 'data'>> | Partial<Omit<AxisConfigProps, 'data'>>[];
|
|
25
|
+
/**
|
|
26
|
+
* Inset around the entire chart (outside the axes).
|
|
27
|
+
*/
|
|
28
|
+
inset?: number | Partial<ChartInset>;
|
|
29
|
+
};
|
|
30
|
+
export type CartesianChartProps = Omit<BoxProps<'div'>, 'title'> &
|
|
31
|
+
CartesianChartBaseProps & {
|
|
32
|
+
/**
|
|
33
|
+
* Custom class name for the root element.
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom class names for the component.
|
|
38
|
+
*/
|
|
39
|
+
classNames?: {
|
|
40
|
+
/**
|
|
41
|
+
* Custom class name for the root element.
|
|
42
|
+
*/
|
|
43
|
+
root?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Custom class name for the chart SVG element.
|
|
46
|
+
*/
|
|
47
|
+
chart?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Custom styles for the root element.
|
|
51
|
+
*/
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
/**
|
|
54
|
+
* Custom styles for the component.
|
|
55
|
+
*/
|
|
56
|
+
styles?: {
|
|
57
|
+
/**
|
|
58
|
+
* Custom styles for the root element.
|
|
59
|
+
*/
|
|
60
|
+
root?: React.CSSProperties;
|
|
61
|
+
/**
|
|
62
|
+
* Custom styles for the chart SVG element.
|
|
63
|
+
*/
|
|
64
|
+
chart?: React.CSSProperties;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const CartesianChart: React.MemoExoticComponent<
|
|
68
|
+
React.ForwardRefExoticComponent<
|
|
69
|
+
Omit<CartesianChartProps, 'ref'> & React.RefAttributes<SVGSVGElement>
|
|
70
|
+
>
|
|
71
|
+
>;
|
|
72
|
+
//# sourceMappingURL=CartesianChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../src/chart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAI9E,OAAO,EAAO,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGjF,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE3F,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EAUf,KAAK,MAAM,EAEZ,MAAM,SAAS,CAAC;AAYjB,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAChD,IAAI,CAAC,qBAAqB,EAAE,iBAAiB,GAAG,0BAA0B,CAAC,GAAG;IAC5E;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAC1F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAC9D,uBAAuB,GAAG;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;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,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;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;AAEJ,eAAO,MAAM,cAAc,mIA6U1B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CartesianChartContextValue } from './utils/context';
|
|
2
|
+
export declare const useCartesianChartContext: () => CartesianChartContextValue;
|
|
3
|
+
export declare const CartesianChartProvider: import('react').Provider<
|
|
4
|
+
CartesianChartContextValue | undefined
|
|
5
|
+
>;
|
|
6
|
+
//# sourceMappingURL=ChartProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartProvider.d.ts","sourceRoot":"","sources":["../../src/chart/ChartProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAIlE,eAAO,MAAM,wBAAwB,QAAO,0BAQ3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,kEAAiC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
import type { Rect, SharedProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import { type Transition } from 'framer-motion';
|
|
4
|
+
/**
|
|
5
|
+
* Duration in seconds for path enter transition.
|
|
6
|
+
*/
|
|
7
|
+
export declare const pathEnterTransitionDuration = 0.5;
|
|
8
|
+
export type PathBaseProps = SharedProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Whether to animate this path. Overrides the animate prop on the Chart component.
|
|
11
|
+
*/
|
|
12
|
+
animate?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type PathProps = PathBaseProps &
|
|
15
|
+
Omit<
|
|
16
|
+
SVGProps<SVGPathElement>,
|
|
17
|
+
| 'onAnimationStart'
|
|
18
|
+
| 'onAnimationEnd'
|
|
19
|
+
| 'onAnimationIteration'
|
|
20
|
+
| 'onAnimationStartCapture'
|
|
21
|
+
| 'onAnimationEndCapture'
|
|
22
|
+
| 'onAnimationIterationCapture'
|
|
23
|
+
| 'onDrag'
|
|
24
|
+
| 'onDragEnd'
|
|
25
|
+
| 'onDragStart'
|
|
26
|
+
| 'onDragCapture'
|
|
27
|
+
| 'onDragEndCapture'
|
|
28
|
+
| 'onDragStartCapture'
|
|
29
|
+
> & {
|
|
30
|
+
/**
|
|
31
|
+
* Offset added to the clip rect boundaries.
|
|
32
|
+
*/
|
|
33
|
+
clipOffset?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Custom clip path rect. If provided, this overrides the default chart rect for clipping.
|
|
36
|
+
* Pass null to disable clipping.
|
|
37
|
+
* @default drawingArea of chart + clipOffset
|
|
38
|
+
*/
|
|
39
|
+
clipRect?: Rect | null;
|
|
40
|
+
/**
|
|
41
|
+
* Transition configuration for path.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Timing based animation
|
|
45
|
+
* transition={{ type: 'tween', duration: 0.2, ease: 'easeOut' }}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* // Spring animation
|
|
49
|
+
* transition={{ type: 'spring', damping: 20, stiffness: 300 }}
|
|
50
|
+
*/
|
|
51
|
+
transition?: Transition;
|
|
52
|
+
};
|
|
53
|
+
export declare const Path: import('react').NamedExoticComponent<PathProps>;
|
|
54
|
+
//# sourceMappingURL=Path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../src/chart/Path.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GACnC,IAAI,CACF,QAAQ,CAAC,cAAc,CAAC,EACtB,kBAAkB,GAClB,gBAAgB,GAChB,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,6BAA6B,GAC7B,QAAQ,GACR,WAAW,GACX,aAAa,GACb,eAAe,GACf,kBAAkB,GAClB,oBAAoB,CACvB,GAAG;IACF;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAWJ,eAAO,MAAM,IAAI,iDA+DhB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Polymorphic } from '@coinbase/cds-web/core/polymorphism';
|
|
3
|
+
import { type SegmentedTabsProps, type TabsActiveIndicatorProps } from '@coinbase/cds-web/tabs';
|
|
4
|
+
import { type TextBaseProps } from '@coinbase/cds-web/typography';
|
|
5
|
+
export declare const PeriodSelectorActiveIndicator: React.MemoExoticComponent<
|
|
6
|
+
({
|
|
7
|
+
activeTabRect,
|
|
8
|
+
background,
|
|
9
|
+
position,
|
|
10
|
+
borderRadius,
|
|
11
|
+
style,
|
|
12
|
+
}: TabsActiveIndicatorProps) => import('react/jsx-runtime').JSX.Element | null
|
|
13
|
+
>;
|
|
14
|
+
export declare const liveTabLabelDefaultElement = 'span';
|
|
15
|
+
export type LiveTabLabelDefaultElement = typeof liveTabLabelDefaultElement;
|
|
16
|
+
export type LiveTabLabelBaseProps = TextBaseProps & {
|
|
17
|
+
/**
|
|
18
|
+
* The label to display.
|
|
19
|
+
* @default 'LIVE'
|
|
20
|
+
*/
|
|
21
|
+
label?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to hide the dot.
|
|
24
|
+
*/
|
|
25
|
+
hideDot?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type LiveTabLabelProps<AsComponent extends React.ElementType> = Polymorphic.Props<
|
|
28
|
+
AsComponent,
|
|
29
|
+
LiveTabLabelBaseProps
|
|
30
|
+
>;
|
|
31
|
+
type LiveTabLabelComponent = (<AsComponent extends React.ElementType = LiveTabLabelDefaultElement>(
|
|
32
|
+
props: LiveTabLabelProps<AsComponent>,
|
|
33
|
+
) => Polymorphic.ReactReturn) &
|
|
34
|
+
Polymorphic.ReactNamed;
|
|
35
|
+
export declare const LiveTabLabel: LiveTabLabelComponent;
|
|
36
|
+
export type PeriodSelectorProps = SegmentedTabsProps;
|
|
37
|
+
/**
|
|
38
|
+
* PeriodSelector is a specialized version of SegmentedTabs optimized for chart period selection.
|
|
39
|
+
* It provides transparent background, primary wash active state, and full-width layout by default.
|
|
40
|
+
*/
|
|
41
|
+
export declare const PeriodSelector: React.MemoExoticComponent<
|
|
42
|
+
React.ForwardRefExoticComponent<
|
|
43
|
+
Partial<
|
|
44
|
+
Pick<
|
|
45
|
+
import('@coinbase/cds-web/tabs').TabsProps<string>,
|
|
46
|
+
'TabComponent' | 'TabsActiveIndicatorComponent'
|
|
47
|
+
>
|
|
48
|
+
> &
|
|
49
|
+
Omit<
|
|
50
|
+
import('@coinbase/cds-web/tabs').TabsProps<string>,
|
|
51
|
+
'TabComponent' | 'TabsActiveIndicatorComponent'
|
|
52
|
+
> &
|
|
53
|
+
React.RefAttributes<HTMLElement>
|
|
54
|
+
>
|
|
55
|
+
>;
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=PeriodSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeriodSelector.d.ts","sourceRoot":"","sources":["../../src/chart/PeriodSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAOxE,eAAO,MAAM,6BAA6B,4FAOrC,wBAAwB,oDAwB5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,SAAS,CAAC;AAEjD,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,IAAI,WAAW,CAAC,KAAK,CACtF,WAAW,EACX,qBAAqB,CACtB,CAAC;AAYF,KAAK,qBAAqB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,0BAA0B,EAC/F,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAClC,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,YAAY,EAAE,qBAiC1B,CAAC;AASF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,+TA0B1B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SVGProps } from 'react';
|
|
3
|
+
import type { Transition } from 'framer-motion';
|
|
4
|
+
import { type ChartPathCurveType, type GradientDefinition } from '../utils';
|
|
5
|
+
export type AreaBaseProps = {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of the series to render. Will be used to find the data from the chart context.
|
|
8
|
+
*/
|
|
9
|
+
seriesId: string;
|
|
10
|
+
/**
|
|
11
|
+
* The curve interpolation method to use for the line.
|
|
12
|
+
* @default 'bump'
|
|
13
|
+
*/
|
|
14
|
+
curve?: ChartPathCurveType;
|
|
15
|
+
/**
|
|
16
|
+
* The type of area to render.
|
|
17
|
+
* @default 'solid'
|
|
18
|
+
*/
|
|
19
|
+
type?: 'solid' | 'dotted' | 'gradient';
|
|
20
|
+
/**
|
|
21
|
+
* Component to render the area.
|
|
22
|
+
* Takes precedence over the type prop if provided.
|
|
23
|
+
*/
|
|
24
|
+
AreaComponent?: AreaComponent;
|
|
25
|
+
/**
|
|
26
|
+
* When true, the area is connected across null values.
|
|
27
|
+
*/
|
|
28
|
+
connectNulls?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The color of the area.
|
|
31
|
+
* @default color of the series or 'var(--color-fgPrimary)'
|
|
32
|
+
*/
|
|
33
|
+
fill?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Opacity of the area
|
|
36
|
+
* @note when combined with gradient, both will be applied
|
|
37
|
+
* @default 1
|
|
38
|
+
*/
|
|
39
|
+
fillOpacity?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Baseline value for the gradient.
|
|
42
|
+
* When set, overrides the default baseline.
|
|
43
|
+
*/
|
|
44
|
+
baseline?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Gradient configuration.
|
|
47
|
+
* When provided, creates gradient or threshold-based coloring.
|
|
48
|
+
*/
|
|
49
|
+
gradient?: GradientDefinition;
|
|
50
|
+
/**
|
|
51
|
+
* Whether to animate the area.
|
|
52
|
+
* Overrides the animate value from the chart context.
|
|
53
|
+
*/
|
|
54
|
+
animate?: boolean;
|
|
55
|
+
};
|
|
56
|
+
export type AreaProps = AreaBaseProps & {
|
|
57
|
+
/**
|
|
58
|
+
* Transition configuration for path animations.
|
|
59
|
+
*/
|
|
60
|
+
transition?: Transition;
|
|
61
|
+
};
|
|
62
|
+
export type AreaComponentProps = Pick<
|
|
63
|
+
AreaProps,
|
|
64
|
+
'fill' | 'fillOpacity' | 'baseline' | 'gradient' | 'animate' | 'transition'
|
|
65
|
+
> & {
|
|
66
|
+
/**
|
|
67
|
+
* Path of the area
|
|
68
|
+
*/
|
|
69
|
+
d: SVGProps<SVGPathElement>['d'];
|
|
70
|
+
/**
|
|
71
|
+
* ID of the y-axis to use.
|
|
72
|
+
* If not provided, defaults to the default y-axis.
|
|
73
|
+
*/
|
|
74
|
+
yAxisId?: string;
|
|
75
|
+
};
|
|
76
|
+
export type AreaComponent = React.FC<AreaComponentProps>;
|
|
77
|
+
export declare const Area: React.NamedExoticComponent<AreaProps>;
|
|
78
|
+
//# sourceMappingURL=Area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../src/chart/area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,EAAE,KAAK,kBAAkB,EAAe,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMzF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;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;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,SAAS,EACT,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,CAC5E,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,uCA+EhB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type XAxisProps, type YAxisProps } from '../axis';
|
|
2
|
+
import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
|
|
3
|
+
import { type LineProps } from '../line/Line';
|
|
4
|
+
import { type AxisConfigProps, type Series } from '../utils';
|
|
5
|
+
import { type AreaProps } from './Area';
|
|
6
|
+
export type AreaSeries = Series &
|
|
7
|
+
Partial<
|
|
8
|
+
Pick<
|
|
9
|
+
AreaProps,
|
|
10
|
+
'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'fill' | 'connectNulls' | 'transition'
|
|
11
|
+
>
|
|
12
|
+
> &
|
|
13
|
+
Partial<Pick<LineProps, 'LineComponent' | 'strokeWidth' | 'stroke' | 'opacity'>> & {
|
|
14
|
+
/**
|
|
15
|
+
* The type of line to render for this series.
|
|
16
|
+
* Overrides the chart-level lineType if provided.
|
|
17
|
+
* @default 'solid'
|
|
18
|
+
*/
|
|
19
|
+
lineType?: 'solid' | 'dotted';
|
|
20
|
+
};
|
|
21
|
+
export type AreaChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
|
|
22
|
+
Pick<
|
|
23
|
+
AreaProps,
|
|
24
|
+
'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'connectNulls' | 'transition'
|
|
25
|
+
> &
|
|
26
|
+
Pick<LineProps, 'LineComponent' | 'strokeWidth'> & {
|
|
27
|
+
/**
|
|
28
|
+
* Configuration objects that define how to visualize the data.
|
|
29
|
+
* Each series supports Area and Line component props for individual customization.
|
|
30
|
+
*/
|
|
31
|
+
series?: Array<AreaSeries>;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to stack the areas on top of each other.
|
|
34
|
+
* When true, each series builds cumulative values on top of the previous series.
|
|
35
|
+
*
|
|
36
|
+
* **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
|
|
37
|
+
* Series with [baseline, value] tuples (e.g., `[[0, 10], [0, -5]]`) will be skipped during stacking
|
|
38
|
+
* and rendered as-is.
|
|
39
|
+
*/
|
|
40
|
+
stacked?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show the X axis.
|
|
43
|
+
*/
|
|
44
|
+
showXAxis?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to show the Y axis.
|
|
47
|
+
*/
|
|
48
|
+
showYAxis?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show lines on top of the areas.
|
|
51
|
+
* Useful for stacked contexts to show the outline of each area.
|
|
52
|
+
*/
|
|
53
|
+
showLines?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The type of line to render.
|
|
56
|
+
* @default 'solid'
|
|
57
|
+
*/
|
|
58
|
+
lineType?: 'solid' | 'dotted';
|
|
59
|
+
/**
|
|
60
|
+
* Configuration for x-axis.
|
|
61
|
+
* Accepts axis config and axis props.
|
|
62
|
+
* To show the axis, set `showXAxis` to true.
|
|
63
|
+
*/
|
|
64
|
+
xAxis?: Partial<AxisConfigProps> & XAxisProps;
|
|
65
|
+
/**
|
|
66
|
+
* Configuration for y-axis.
|
|
67
|
+
* Accepts axis config and axis props.
|
|
68
|
+
* To show the axis, set `showYAxis` to true.
|
|
69
|
+
*/
|
|
70
|
+
yAxis?: Partial<AxisConfigProps> & YAxisProps;
|
|
71
|
+
};
|
|
72
|
+
export type AreaChartProps = AreaChartBaseProps &
|
|
73
|
+
Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
|
|
74
|
+
export declare const AreaChart: import('react').MemoExoticComponent<
|
|
75
|
+
import('react').ForwardRefExoticComponent<
|
|
76
|
+
Omit<AreaChartProps, 'ref'> & import('react').RefAttributes<SVGSVGElement>
|
|
77
|
+
>
|
|
78
|
+
>;
|
|
79
|
+
//# sourceMappingURL=AreaChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/chart/area/AreaChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,KAAK,eAAe,EAIpB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAC7B,OAAO,CACL,IAAI,CACF,SAAS,EACT,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CAC5F,CACF,GACD,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC,GAAG;IACjF;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,GAC1F,IAAI,CACF,SAAS,EACT,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CACnF,GACD,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;CAC/C,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;AAE1D,eAAO,MAAM,SAAS,4JA8KrB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type PathProps } from '../Path';
|
|
2
|
+
import type { AreaComponentProps } from './Area';
|
|
3
|
+
export type DottedAreaProps = Pick<
|
|
4
|
+
PathProps,
|
|
5
|
+
| 'stroke'
|
|
6
|
+
| 'strokeWidth'
|
|
7
|
+
| 'strokeOpacity'
|
|
8
|
+
| 'strokeLinecap'
|
|
9
|
+
| 'strokeLinejoin'
|
|
10
|
+
| 'strokeDasharray'
|
|
11
|
+
| 'strokeDashoffset'
|
|
12
|
+
| 'clipOffset'
|
|
13
|
+
| 'children'
|
|
14
|
+
> &
|
|
15
|
+
AreaComponentProps & {
|
|
16
|
+
/**
|
|
17
|
+
* Size of the pattern unit (width and height).
|
|
18
|
+
* @default 4
|
|
19
|
+
*/
|
|
20
|
+
patternSize?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Size of the dots within the pattern.
|
|
23
|
+
* @default 1
|
|
24
|
+
*/
|
|
25
|
+
dotSize?: number;
|
|
26
|
+
/**
|
|
27
|
+
* Opacity at the peak values (top/bottom of gradient).
|
|
28
|
+
* @note only used when no gradient is provided
|
|
29
|
+
* @default 1
|
|
30
|
+
*/
|
|
31
|
+
peakOpacity?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Opacity at the baseline (0 or edge closest to 0).
|
|
34
|
+
* @note only used when no gradient is provided
|
|
35
|
+
* @default 0
|
|
36
|
+
*/
|
|
37
|
+
baselineOpacity?: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A customizable dotted area gradient component.
|
|
41
|
+
* When no gradient is provided, renders a default gradient based
|
|
42
|
+
* on the fill color and peak/baseline opacities.
|
|
43
|
+
*/
|
|
44
|
+
export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
|
|
45
|
+
//# sourceMappingURL=DottedArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DottedArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/DottedArea.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,YAAY,GACZ,UAAU,CACb,GACC,kBAAkB,GAAG;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,UAAU,uDAoEtB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type PathProps } from '../Path';
|
|
2
|
+
import type { AreaComponentProps } from './Area';
|
|
3
|
+
export type GradientAreaProps = Pick<
|
|
4
|
+
PathProps,
|
|
5
|
+
| 'stroke'
|
|
6
|
+
| 'strokeWidth'
|
|
7
|
+
| 'strokeOpacity'
|
|
8
|
+
| 'strokeLinecap'
|
|
9
|
+
| 'strokeLinejoin'
|
|
10
|
+
| 'strokeDasharray'
|
|
11
|
+
| 'strokeDashoffset'
|
|
12
|
+
| 'clipRect'
|
|
13
|
+
| 'clipOffset'
|
|
14
|
+
| 'children'
|
|
15
|
+
> &
|
|
16
|
+
AreaComponentProps & {
|
|
17
|
+
/**
|
|
18
|
+
* Opacity at peak values.
|
|
19
|
+
* @note only used when no gradient is provided
|
|
20
|
+
* @default 0.3
|
|
21
|
+
*/
|
|
22
|
+
peakOpacity?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Opacity at the baseline.
|
|
25
|
+
* @note only used when no gradient is provided
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
baselineOpacity?: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* A customizable gradient area component which uses Path with SVG linearGradient.
|
|
32
|
+
*
|
|
33
|
+
* When no gradient is provided, automatically creates an appropriate gradient:
|
|
34
|
+
* - For data crossing zero: Creates a diverging gradient with peak opacity at both extremes
|
|
35
|
+
* and baseline opacity at zero (or the specified baseline).
|
|
36
|
+
* - For all-positive or all-negative data: Creates a simple gradient from baseline to peak.
|
|
37
|
+
*/
|
|
38
|
+
export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
|
|
39
|
+
//# sourceMappingURL=GradientArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,SAAS,EACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,YAAY,GACZ,UAAU,CACb,GACC,kBAAkB,GAAG;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,yDAmDxB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type PathProps } from '../Path';
|
|
2
|
+
import type { AreaComponentProps } from './Area';
|
|
3
|
+
export type SolidAreaProps = Pick<
|
|
4
|
+
PathProps,
|
|
5
|
+
| 'stroke'
|
|
6
|
+
| 'strokeWidth'
|
|
7
|
+
| 'strokeOpacity'
|
|
8
|
+
| 'strokeLinecap'
|
|
9
|
+
| 'strokeLinejoin'
|
|
10
|
+
| 'strokeDasharray'
|
|
11
|
+
| 'strokeDashoffset'
|
|
12
|
+
| 'clipRect'
|
|
13
|
+
| 'clipOffset'
|
|
14
|
+
| 'children'
|
|
15
|
+
> &
|
|
16
|
+
AreaComponentProps;
|
|
17
|
+
/**
|
|
18
|
+
* A customizable solid area component which uses Path.
|
|
19
|
+
* When a gradient is provided, renders with gradient fill.
|
|
20
|
+
* Otherwise, renders with solid fill.
|
|
21
|
+
*/
|
|
22
|
+
export declare const SolidArea: import('react').NamedExoticComponent<SolidAreaProps>;
|
|
23
|
+
//# sourceMappingURL=SolidArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,UAAU,GACV,YAAY,GACZ,UAAU,CACb,GACC,kBAAkB,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,SAAS,sDAqCrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/area/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|