@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.
- package/CHANGELOG.md +15 -0
- package/dts/chart/CartesianChart.d.ts +38 -2
- package/dts/chart/CartesianChart.d.ts.map +1 -1
- package/dts/chart/Path.d.ts +27 -7
- package/dts/chart/Path.d.ts.map +1 -1
- package/dts/chart/PeriodSelector.d.ts +0 -4
- package/dts/chart/PeriodSelector.d.ts.map +1 -1
- package/dts/chart/area/Area.d.ts +54 -24
- package/dts/chart/area/Area.d.ts.map +1 -1
- package/dts/chart/area/AreaChart.d.ts +33 -6
- package/dts/chart/area/AreaChart.d.ts.map +1 -1
- package/dts/chart/area/DottedArea.d.ts +21 -44
- package/dts/chart/area/DottedArea.d.ts.map +1 -1
- package/dts/chart/area/GradientArea.d.ts +21 -12
- package/dts/chart/area/GradientArea.d.ts.map +1 -1
- package/dts/chart/area/SolidArea.d.ts +16 -1
- package/dts/chart/area/SolidArea.d.ts.map +1 -1
- package/dts/chart/axis/Axis.d.ts +89 -43
- package/dts/chart/axis/Axis.d.ts.map +1 -1
- 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 +1 -1
- package/dts/chart/axis/XAxis.d.ts.map +1 -1
- package/dts/chart/axis/YAxis.d.ts +1 -1
- package/dts/chart/axis/YAxis.d.ts.map +1 -1
- package/dts/chart/axis/index.d.ts +1 -0
- package/dts/chart/axis/index.d.ts.map +1 -1
- package/dts/chart/bar/Bar.d.ts +16 -13
- package/dts/chart/bar/Bar.d.ts.map +1 -1
- package/dts/chart/bar/BarChart.d.ts +17 -8
- package/dts/chart/bar/BarChart.d.ts.map +1 -1
- package/dts/chart/bar/BarPlot.d.ts +2 -1
- package/dts/chart/bar/BarPlot.d.ts.map +1 -1
- package/dts/chart/bar/BarStack.d.ts +40 -48
- package/dts/chart/bar/BarStack.d.ts.map +1 -1
- package/dts/chart/bar/BarStackGroup.d.ts +1 -0
- package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
- package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
- package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
- 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 +2 -1
- package/dts/chart/index.d.ts.map +1 -1
- 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 +15 -3
- package/dts/chart/line/DottedLine.d.ts.map +1 -1
- package/dts/chart/line/Line.d.ts +70 -28
- package/dts/chart/line/Line.d.ts.map +1 -1
- package/dts/chart/line/LineChart.d.ts +26 -8
- package/dts/chart/line/LineChart.d.ts.map +1 -1
- package/dts/chart/line/ReferenceLine.d.ts +91 -44
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
- package/dts/chart/line/SolidLine.d.ts +14 -3
- package/dts/chart/line/SolidLine.d.ts.map +1 -1
- package/dts/chart/line/index.d.ts +1 -1
- package/dts/chart/line/index.d.ts.map +1 -1
- 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 +207 -66
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
- 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/index.d.ts +3 -0
- package/dts/chart/scrubber/index.d.ts.map +1 -1
- package/dts/chart/text/ChartText.d.ts +46 -43
- package/dts/chart/text/ChartText.d.ts.map +1 -1
- package/dts/chart/text/{SmartChartTextGroup.d.ts → ChartTextGroup.d.ts} +9 -3
- package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
- package/dts/chart/text/index.d.ts +1 -1
- package/dts/chart/text/index.d.ts.map +1 -1
- package/dts/chart/utils/chart.d.ts +27 -7
- package/dts/chart/utils/chart.d.ts.map +1 -1
- package/dts/chart/utils/context.d.ts +6 -0
- package/dts/chart/utils/context.d.ts.map +1 -1
- 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 +4 -0
- package/dts/chart/utils/index.d.ts.map +1 -1
- 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 +24 -1
- package/dts/chart/utils/path.d.ts.map +1 -1
- package/dts/chart/utils/point.d.ts +29 -0
- package/dts/chart/utils/point.d.ts.map +1 -1
- 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/esm/chart/CartesianChart.js +140 -85
- package/esm/chart/Path.js +51 -46
- package/esm/chart/PeriodSelector.js +4 -18
- package/esm/chart/area/Area.js +24 -34
- package/esm/chart/area/AreaChart.js +24 -15
- package/esm/chart/area/DottedArea.js +35 -89
- package/esm/chart/area/GradientArea.js +34 -80
- package/esm/chart/area/SolidArea.js +29 -11
- package/esm/chart/axis/Axis.js +4 -25
- package/esm/chart/axis/DefaultAxisTickLabel.js +15 -0
- package/esm/chart/axis/XAxis.js +53 -36
- package/esm/chart/axis/YAxis.js +55 -32
- package/esm/chart/axis/index.js +1 -0
- package/esm/chart/bar/Bar.js +3 -1
- package/esm/chart/bar/BarChart.js +15 -32
- package/esm/chart/bar/BarPlot.js +3 -2
- package/esm/chart/bar/BarStack.js +65 -23
- package/esm/chart/bar/BarStackGroup.js +7 -17
- package/esm/chart/bar/DefaultBar.js +4 -7
- package/esm/chart/bar/DefaultBarStack.js +5 -7
- package/esm/chart/gradient/Gradient.js +104 -0
- package/esm/chart/gradient/index.js +1 -0
- package/esm/chart/index.js +2 -1
- package/esm/chart/line/DefaultReferenceLineLabel.js +81 -0
- package/esm/chart/line/DottedLine.js +38 -17
- package/esm/chart/line/Line.js +96 -70
- package/esm/chart/line/LineChart.js +18 -6
- package/esm/chart/line/ReferenceLine.js +41 -43
- package/esm/chart/line/SolidLine.js +36 -15
- package/esm/chart/line/index.js +1 -1
- package/esm/chart/{line/GradientLine.js → point/DefaultPointLabel.js} +31 -45
- package/esm/chart/point/Point.css +2 -0
- package/esm/chart/{Point.js → point/Point.js} +66 -57
- package/esm/chart/point/index.js +2 -0
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +155 -0
- package/esm/chart/scrubber/{ScrubberBeaconLabel.js → DefaultScrubberBeaconLabel.js} +23 -10
- package/esm/chart/scrubber/DefaultScrubberLabel.js +30 -0
- package/esm/chart/scrubber/Scrubber.js +98 -392
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +166 -0
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +186 -0
- package/esm/chart/scrubber/index.js +3 -1
- package/esm/chart/text/ChartText.js +13 -19
- package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +4 -3
- package/esm/chart/text/index.js +1 -1
- package/esm/chart/utils/chart.js +29 -3
- package/esm/chart/utils/gradient.js +257 -0
- package/esm/chart/utils/index.js +4 -0
- package/esm/chart/utils/interpolate.js +644 -0
- package/esm/chart/utils/path.js +32 -9
- package/esm/chart/utils/point.js +69 -0
- package/esm/chart/utils/scrubber.js +132 -0
- package/esm/chart/utils/transition.js +111 -0
- package/package.json +5 -5
- package/dts/chart/Point.d.ts +0 -153
- package/dts/chart/Point.d.ts.map +0 -1
- package/dts/chart/line/GradientLine.d.ts +0 -42
- package/dts/chart/line/GradientLine.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -93
- package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts +0 -7
- package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts.map +0 -1
- package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
- package/esm/chart/Point.css +0 -2
- package/esm/chart/scrubber/ScrubberBeacon.js +0 -195
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,21 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 3.4.0-beta.7 (12/2/2025 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Improve opacity customization for ReferenceLine. [[#201](https://github.com/coinbase/cds/pull/201)]
|
|
16
|
+
|
|
17
|
+
## 3.4.0-beta.6 (10/16/2025 PST)
|
|
18
|
+
|
|
19
|
+
#### 🚀 Updates
|
|
20
|
+
|
|
21
|
+
- Support connecting null values in Area and Line
|
|
22
|
+
- Added label to XAxis and YAxis
|
|
23
|
+
- Added gradient support
|
|
24
|
+
- Improved charts accessibility support
|
|
25
|
+
|
|
11
26
|
## 3.4.0-beta.5 (11/4/2025 PST)
|
|
12
27
|
|
|
13
28
|
This is an artificial version bump with no new change.
|
|
@@ -19,7 +19,7 @@ export type CartesianChartBaseProps = BoxBaseProps &
|
|
|
19
19
|
*/
|
|
20
20
|
xAxis?: Partial<Omit<AxisConfigProps, 'id'>>;
|
|
21
21
|
/**
|
|
22
|
-
* Configuration for y-axis(es).
|
|
22
|
+
* Configuration for y-axis(es). Can be a single config or array of configs.
|
|
23
23
|
*/
|
|
24
24
|
yAxis?: Partial<Omit<AxisConfigProps, 'data'>> | Partial<Omit<AxisConfigProps, 'data'>>[];
|
|
25
25
|
/**
|
|
@@ -27,7 +27,43 @@ export type CartesianChartBaseProps = BoxBaseProps &
|
|
|
27
27
|
*/
|
|
28
28
|
inset?: number | Partial<ChartInset>;
|
|
29
29
|
};
|
|
30
|
-
export type CartesianChartProps = BoxProps<'
|
|
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
|
+
};
|
|
31
67
|
export declare const CartesianChart: React.MemoExoticComponent<
|
|
32
68
|
React.ForwardRefExoticComponent<
|
|
33
69
|
Omit<CartesianChartProps, 'ref'> & React.RefAttributes<SVGSVGElement>
|
|
@@ -1 +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,QAAQ,CAAC,KAAK,CAAC,
|
|
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"}
|
package/dts/chart/Path.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import 'd3-transition';
|
|
2
1
|
import type { SVGProps } from 'react';
|
|
3
2
|
import type { Rect, SharedProps } from '@coinbase/cds-common/types';
|
|
4
|
-
|
|
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 &
|
|
5
15
|
Omit<
|
|
6
16
|
SVGProps<SVGPathElement>,
|
|
7
17
|
| 'onAnimationStart'
|
|
@@ -18,17 +28,27 @@ export type PathProps = SharedProps &
|
|
|
18
28
|
| 'onDragStartCapture'
|
|
19
29
|
> & {
|
|
20
30
|
/**
|
|
21
|
-
*
|
|
31
|
+
* Offset added to the clip rect boundaries.
|
|
22
32
|
*/
|
|
23
|
-
|
|
33
|
+
clipOffset?: number;
|
|
24
34
|
/**
|
|
25
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
|
|
26
38
|
*/
|
|
27
|
-
clipRect?: Rect;
|
|
39
|
+
clipRect?: Rect | null;
|
|
28
40
|
/**
|
|
29
|
-
*
|
|
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 }}
|
|
30
50
|
*/
|
|
31
|
-
|
|
51
|
+
transition?: Transition;
|
|
32
52
|
};
|
|
33
53
|
export declare const Path: import('react').NamedExoticComponent<PathProps>;
|
|
34
54
|
//# sourceMappingURL=Path.d.ts.map
|
package/dts/chart/Path.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../src/chart/Path.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -23,10 +23,6 @@ export type LiveTabLabelBaseProps = TextBaseProps & {
|
|
|
23
23
|
* Whether to hide the dot.
|
|
24
24
|
*/
|
|
25
25
|
hideDot?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Whether to disable the pulse animation.
|
|
28
|
-
*/
|
|
29
|
-
disablePulse?: boolean;
|
|
30
26
|
};
|
|
31
27
|
export type LiveTabLabelProps<AsComponent extends React.ElementType> = Polymorphic.Props<
|
|
32
28
|
AsComponent,
|
|
@@ -1 +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;
|
|
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"}
|
package/dts/chart/area/Area.d.ts
CHANGED
|
@@ -1,48 +1,78 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SVGProps } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
6
29
|
/**
|
|
7
30
|
* The color of the area.
|
|
8
31
|
* @default color of the series or 'var(--color-fgPrimary)'
|
|
9
32
|
*/
|
|
10
33
|
fill?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Opacity of the area
|
|
36
|
+
* @note when combined with gradient, both will be applied
|
|
37
|
+
* @default 1
|
|
38
|
+
*/
|
|
11
39
|
fillOpacity?: number;
|
|
12
|
-
stroke?: string;
|
|
13
|
-
strokeWidth?: number;
|
|
14
|
-
yAxisId?: string;
|
|
15
|
-
animate?: boolean;
|
|
16
40
|
/**
|
|
17
41
|
* Baseline value for the gradient.
|
|
18
42
|
* When set, overrides the default baseline.
|
|
19
43
|
*/
|
|
20
44
|
baseline?: number;
|
|
21
|
-
};
|
|
22
|
-
export type AreaComponent = React.FC<AreaComponentProps>;
|
|
23
|
-
export type AreaProps = Pick<
|
|
24
|
-
AreaComponentProps,
|
|
25
|
-
'fill' | 'fillOpacity' | 'stroke' | 'strokeWidth' | 'baseline'
|
|
26
|
-
> & {
|
|
27
45
|
/**
|
|
28
|
-
*
|
|
46
|
+
* Gradient configuration.
|
|
47
|
+
* When provided, creates gradient or threshold-based coloring.
|
|
29
48
|
*/
|
|
30
|
-
|
|
49
|
+
gradient?: GradientDefinition;
|
|
31
50
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
51
|
+
* Whether to animate the area.
|
|
52
|
+
* Overrides the animate value from the chart context.
|
|
34
53
|
*/
|
|
35
|
-
|
|
54
|
+
animate?: boolean;
|
|
55
|
+
};
|
|
56
|
+
export type AreaProps = AreaBaseProps & {
|
|
36
57
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @default 'solid'
|
|
58
|
+
* Transition configuration for path animations.
|
|
39
59
|
*/
|
|
40
|
-
|
|
60
|
+
transition?: Transition;
|
|
61
|
+
};
|
|
62
|
+
export type AreaComponentProps = Pick<
|
|
63
|
+
AreaProps,
|
|
64
|
+
'fill' | 'fillOpacity' | 'baseline' | 'gradient' | 'animate' | 'transition'
|
|
65
|
+
> & {
|
|
41
66
|
/**
|
|
42
|
-
*
|
|
43
|
-
* Takes precedence over the type prop if provided.
|
|
67
|
+
* Path of the area
|
|
44
68
|
*/
|
|
45
|
-
|
|
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;
|
|
46
75
|
};
|
|
76
|
+
export type AreaComponent = React.FC<AreaComponentProps>;
|
|
47
77
|
export declare const Area: React.NamedExoticComponent<AreaProps>;
|
|
48
78
|
//# sourceMappingURL=Area.d.ts.map
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import { type XAxisProps, type YAxisProps } from '../axis';
|
|
2
|
-
import { type CartesianChartProps } from '../CartesianChart';
|
|
2
|
+
import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
|
|
3
3
|
import { type LineProps } from '../line/Line';
|
|
4
4
|
import { type AxisConfigProps, type Series } from '../utils';
|
|
5
5
|
import { type AreaProps } from './Area';
|
|
6
6
|
export type AreaSeries = Series &
|
|
7
|
-
Partial<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
> &
|
|
11
26
|
Pick<LineProps, 'LineComponent' | 'strokeWidth'> & {
|
|
12
27
|
/**
|
|
13
28
|
* Configuration objects that define how to visualize the data.
|
|
@@ -40,10 +55,22 @@ export type AreaChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'seri
|
|
|
40
55
|
* The type of line to render.
|
|
41
56
|
* @default 'solid'
|
|
42
57
|
*/
|
|
43
|
-
lineType?: 'solid' | 'dotted'
|
|
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
|
+
*/
|
|
44
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
|
+
*/
|
|
45
70
|
yAxis?: Partial<AxisConfigProps> & YAxisProps;
|
|
46
71
|
};
|
|
72
|
+
export type AreaChartProps = AreaChartBaseProps &
|
|
73
|
+
Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
|
|
47
74
|
export declare const AreaChart: import('react').MemoExoticComponent<
|
|
48
75
|
import('react').ForwardRefExoticComponent<
|
|
49
76
|
Omit<AreaChartProps, 'ref'> & import('react').RefAttributes<SVGSVGElement>
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { type PathProps } from '../Path';
|
|
2
2
|
import type { AreaComponentProps } from './Area';
|
|
3
|
-
export type DottedAreaProps =
|
|
4
|
-
|
|
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 & {
|
|
5
16
|
/**
|
|
6
17
|
* Size of the pattern unit (width and height).
|
|
7
18
|
* @default 4
|
|
@@ -14,55 +25,21 @@ export type DottedAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity' | 'cl
|
|
|
14
25
|
dotSize?: number;
|
|
15
26
|
/**
|
|
16
27
|
* Opacity at the peak values (top/bottom of gradient).
|
|
17
|
-
* @
|
|
28
|
+
* @note only used when no gradient is provided
|
|
29
|
+
* @default 1
|
|
18
30
|
*/
|
|
19
31
|
peakOpacity?: number;
|
|
20
32
|
/**
|
|
21
33
|
* Opacity at the baseline (0 or edge closest to 0).
|
|
34
|
+
* @note only used when no gradient is provided
|
|
22
35
|
* @default 0
|
|
23
36
|
*/
|
|
24
37
|
baselineOpacity?: number;
|
|
25
|
-
/**
|
|
26
|
-
* ID of the y-axis to use for gradient range.
|
|
27
|
-
* If not provided, defaults to the default y-axis.
|
|
28
|
-
*/
|
|
29
|
-
yAxisId?: string;
|
|
30
|
-
className?: string;
|
|
31
|
-
style?: React.CSSProperties;
|
|
32
|
-
/**
|
|
33
|
-
* Custom class names for the component.
|
|
34
|
-
*/
|
|
35
|
-
classNames?: {
|
|
36
|
-
/**
|
|
37
|
-
* Custom class name for the root element.
|
|
38
|
-
*/
|
|
39
|
-
root?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Custom class name for the pattern element.
|
|
42
|
-
*/
|
|
43
|
-
pattern?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Custom class name for the area path element.
|
|
46
|
-
*/
|
|
47
|
-
path?: string;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Custom styles for the component.
|
|
51
|
-
*/
|
|
52
|
-
styles?: {
|
|
53
|
-
/**
|
|
54
|
-
* Custom styles for the root element.
|
|
55
|
-
*/
|
|
56
|
-
root?: React.CSSProperties;
|
|
57
|
-
/**
|
|
58
|
-
* Custom styles for the pattern element.
|
|
59
|
-
*/
|
|
60
|
-
pattern?: React.CSSProperties;
|
|
61
|
-
/**
|
|
62
|
-
* Custom styles for the area path element.
|
|
63
|
-
*/
|
|
64
|
-
path?: React.CSSProperties;
|
|
65
|
-
};
|
|
66
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
|
+
*/
|
|
67
44
|
export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
|
|
68
45
|
//# sourceMappingURL=DottedArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DottedArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/DottedArea.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
import { type PathProps } from '../Path';
|
|
2
2
|
import type { AreaComponentProps } from './Area';
|
|
3
|
-
export type GradientAreaProps =
|
|
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
|
+
> &
|
|
4
16
|
AreaComponentProps & {
|
|
5
|
-
/**
|
|
6
|
-
* The color at peak values (top/bottom of gradient).
|
|
7
|
-
* @default fill or 'var(--color-fgPrimary)'
|
|
8
|
-
*/
|
|
9
|
-
peakColor?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The color at the baseline (0 or edge closest to 0).
|
|
12
|
-
* @default peakColor or fill
|
|
13
|
-
*/
|
|
14
|
-
baselineColor?: string;
|
|
15
17
|
/**
|
|
16
18
|
* Opacity at peak values.
|
|
19
|
+
* @note only used when no gradient is provided
|
|
17
20
|
* @default 0.3
|
|
18
21
|
*/
|
|
19
22
|
peakOpacity?: number;
|
|
20
23
|
/**
|
|
21
24
|
* Opacity at the baseline.
|
|
25
|
+
* @note only used when no gradient is provided
|
|
22
26
|
* @default 0
|
|
23
27
|
*/
|
|
24
28
|
baselineOpacity?: number;
|
|
25
29
|
};
|
|
26
30
|
/**
|
|
27
|
-
* A customizable gradient area component which uses Path.
|
|
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.
|
|
28
37
|
*/
|
|
29
38
|
export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
|
|
30
39
|
//# sourceMappingURL=GradientArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { type PathProps } from '../Path';
|
|
2
2
|
import type { AreaComponentProps } from './Area';
|
|
3
|
-
export type SolidAreaProps =
|
|
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;
|
|
4
17
|
/**
|
|
5
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.
|
|
6
21
|
*/
|
|
7
22
|
export declare const SolidArea: import('react').NamedExoticComponent<SolidAreaProps>;
|
|
8
23
|
//# sourceMappingURL=SolidArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"
|
|
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"}
|