@coinbase/cds-mobile-visualization 3.4.0-beta.9 → 3.4.0
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 +132 -0
- package/dts/chart/CartesianChart.d.ts +92 -7
- package/dts/chart/CartesianChart.d.ts.map +1 -1
- package/dts/chart/ChartContextBridge.d.ts.map +1 -1
- package/dts/chart/ChartProvider.d.ts +3 -0
- package/dts/chart/ChartProvider.d.ts.map +1 -1
- package/dts/chart/Path.d.ts +36 -13
- package/dts/chart/Path.d.ts.map +1 -1
- package/dts/chart/PeriodSelector.d.ts +20 -5
- package/dts/chart/PeriodSelector.d.ts.map +1 -1
- package/dts/chart/area/Area.d.ts +14 -11
- package/dts/chart/area/Area.d.ts.map +1 -1
- package/dts/chart/area/AreaChart.d.ts +33 -9
- package/dts/chart/area/AreaChart.d.ts.map +1 -1
- package/dts/chart/area/DottedArea.d.ts.map +1 -1
- package/dts/chart/area/GradientArea.d.ts.map +1 -1
- package/dts/chart/area/SolidArea.d.ts.map +1 -1
- package/dts/chart/axis/Axis.d.ts +22 -42
- package/dts/chart/axis/Axis.d.ts.map +1 -1
- package/dts/chart/axis/XAxis.d.ts +6 -0
- package/dts/chart/axis/XAxis.d.ts.map +1 -1
- package/dts/chart/axis/YAxis.d.ts +1 -0
- package/dts/chart/axis/YAxis.d.ts.map +1 -1
- package/dts/chart/bar/Bar.d.ts +51 -51
- package/dts/chart/bar/Bar.d.ts.map +1 -1
- package/dts/chart/bar/BarChart.d.ts +56 -11
- 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 +45 -20
- package/dts/chart/bar/BarStack.d.ts.map +1 -1
- package/dts/chart/bar/BarStackGroup.d.ts +2 -1
- 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 +5 -0
- package/dts/chart/gradient/Gradient.d.ts.map +1 -1
- package/dts/chart/index.d.ts +1 -0
- package/dts/chart/index.d.ts.map +1 -1
- package/dts/chart/legend/DefaultLegendEntry.d.ts +5 -0
- package/dts/chart/legend/DefaultLegendEntry.d.ts.map +1 -0
- package/dts/chart/legend/DefaultLegendShape.d.ts +5 -0
- package/dts/chart/legend/DefaultLegendShape.d.ts.map +1 -0
- package/dts/chart/legend/Legend.d.ts +168 -0
- package/dts/chart/legend/Legend.d.ts.map +1 -0
- package/dts/chart/legend/index.d.ts +4 -0
- package/dts/chart/legend/index.d.ts.map +1 -0
- package/dts/chart/line/DottedLine.d.ts.map +1 -1
- package/dts/chart/line/Line.d.ts +23 -19
- package/dts/chart/line/Line.d.ts.map +1 -1
- package/dts/chart/line/LineChart.d.ts +26 -9
- package/dts/chart/line/LineChart.d.ts.map +1 -1
- package/dts/chart/line/ReferenceLine.d.ts +1 -0
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
- package/dts/chart/line/SolidLine.d.ts.map +1 -1
- package/dts/chart/point/Point.d.ts +26 -2
- package/dts/chart/point/Point.d.ts.map +1 -1
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +32 -2
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -1
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +2 -1
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -1
- package/dts/chart/scrubber/Scrubber.d.ts +86 -17
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts +12 -0
- package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +10 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +16 -1
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -1
- package/dts/chart/utils/axis.d.ts +45 -10
- package/dts/chart/utils/axis.d.ts.map +1 -1
- package/dts/chart/utils/bar.d.ts +190 -0
- package/dts/chart/utils/bar.d.ts.map +1 -1
- package/dts/chart/utils/chart.d.ts +32 -0
- package/dts/chart/utils/chart.d.ts.map +1 -1
- package/dts/chart/utils/context.d.ts +21 -6
- package/dts/chart/utils/context.d.ts.map +1 -1
- package/dts/chart/utils/gradient.d.ts +3 -1
- package/dts/chart/utils/gradient.d.ts.map +1 -1
- package/dts/chart/utils/path.d.ts +26 -0
- package/dts/chart/utils/path.d.ts.map +1 -1
- package/dts/chart/utils/point.d.ts +24 -12
- package/dts/chart/utils/point.d.ts.map +1 -1
- package/dts/chart/utils/scale.d.ts +11 -0
- package/dts/chart/utils/scale.d.ts.map +1 -1
- package/dts/chart/utils/scrubber.d.ts +2 -1
- package/dts/chart/utils/scrubber.d.ts.map +1 -1
- package/dts/chart/utils/transition.d.ts +63 -22
- package/dts/chart/utils/transition.d.ts.map +1 -1
- package/dts/sparkline/Sparkline.d.ts +2 -1
- package/dts/sparkline/Sparkline.d.ts.map +1 -1
- package/dts/sparkline/SparklineArea.d.ts +2 -1
- package/dts/sparkline/SparklineArea.d.ts.map +1 -1
- package/dts/sparkline/SparklineGradient.d.ts +2 -1
- package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +2 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
- package/esm/chart/CartesianChart.js +176 -82
- package/esm/chart/ChartContextBridge.js +14 -3
- package/esm/chart/ChartProvider.js +2 -2
- package/esm/chart/Path.js +34 -29
- package/esm/chart/PeriodSelector.js +5 -1
- package/esm/chart/__stories__/CartesianChart.stories.js +16 -80
- package/esm/chart/__stories__/ChartAccessibility.stories.js +721 -0
- package/esm/chart/__stories__/ChartTransitions.stories.js +625 -0
- package/esm/chart/__stories__/PeriodSelector.stories.js +99 -1
- package/esm/chart/area/Area.js +21 -9
- package/esm/chart/area/AreaChart.js +18 -13
- package/esm/chart/area/DottedArea.js +28 -18
- package/esm/chart/area/GradientArea.js +14 -7
- package/esm/chart/area/SolidArea.js +6 -2
- package/esm/chart/area/__stories__/AreaChart.stories.js +47 -5
- package/esm/chart/axis/Axis.js +5 -41
- package/esm/chart/axis/XAxis.js +116 -47
- package/esm/chart/axis/YAxis.js +105 -26
- package/esm/chart/axis/__stories__/Axis.stories.js +324 -48
- package/esm/chart/bar/Bar.js +17 -15
- package/esm/chart/bar/BarChart.js +38 -33
- package/esm/chart/bar/BarPlot.js +40 -45
- package/esm/chart/bar/BarStack.js +92 -475
- package/esm/chart/bar/BarStackGroup.js +37 -27
- package/esm/chart/bar/DefaultBar.js +27 -18
- package/esm/chart/bar/DefaultBarStack.js +25 -9
- package/esm/chart/bar/__stories__/BarChart.stories.js +728 -54
- package/esm/chart/gradient/Gradient.js +2 -1
- package/esm/chart/index.js +1 -0
- package/esm/chart/legend/DefaultLegendEntry.js +42 -0
- package/esm/chart/legend/DefaultLegendShape.js +64 -0
- package/esm/chart/legend/Legend.js +59 -0
- package/esm/chart/legend/__stories__/Legend.stories.js +574 -0
- package/esm/chart/legend/index.js +3 -0
- package/esm/chart/line/DottedLine.js +6 -2
- package/esm/chart/line/Line.js +42 -38
- package/esm/chart/line/LineChart.js +36 -12
- package/esm/chart/line/SolidLine.js +6 -2
- package/esm/chart/line/__stories__/LineChart.stories.js +236 -590
- package/esm/chart/line/__stories__/ReferenceLine.stories.js +95 -1
- package/esm/chart/point/Point.js +35 -36
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +41 -38
- package/esm/chart/scrubber/DefaultScrubberLabel.js +26 -10
- package/esm/chart/scrubber/Scrubber.js +67 -35
- package/esm/chart/scrubber/ScrubberAccessibilityView.js +177 -0
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +30 -22
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +35 -8
- package/esm/chart/scrubber/ScrubberProvider.js +29 -24
- package/esm/chart/scrubber/__stories__/Scrubber.stories.js +946 -0
- package/esm/chart/utils/axis.js +88 -44
- package/esm/chart/utils/bar.js +820 -0
- package/esm/chart/utils/chart.js +34 -7
- package/esm/chart/utils/context.js +7 -0
- package/esm/chart/utils/gradient.js +8 -4
- package/esm/chart/utils/path.js +91 -61
- package/esm/chart/utils/point.js +92 -39
- package/esm/chart/utils/scale.js +13 -2
- package/esm/chart/utils/scrubber.js +12 -5
- package/esm/chart/utils/transition.js +108 -60
- package/esm/sparkline/Sparkline.js +2 -1
- package/esm/sparkline/SparklineArea.js +2 -1
- package/esm/sparkline/SparklineGradient.js +2 -1
- package/esm/sparkline/__figma__/Sparkline.figma.js +1 -1
- package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +2 -1
- package/esm/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +1 -1
- package/esm/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +1 -1
- package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +2 -0
- package/package.json +5 -6
- package/esm/chart/__stories__/Chart.stories.js +0 -77
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAIA,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,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAIA,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,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,CAAC;AAErB;;;;GAIG;AACH,eAAO,MAAM,SAAS,sDA6BrB,CAAC"}
|
package/dts/chart/axis/Axis.d.ts
CHANGED
|
@@ -1,49 +1,13 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type LineComponent } from '../line';
|
|
3
3
|
import type { ChartTextChildren, ChartTextProps } from '../text/ChartText';
|
|
4
|
+
import { type AxisBandPlacement } from '../utils';
|
|
4
5
|
/**
|
|
5
|
-
* Animation
|
|
6
|
-
*
|
|
7
|
-
* Web uses similar variants with delay to match path enter animation timing.
|
|
6
|
+
* Animation transition for axis elements (grid lines, tick marks, tick labels).
|
|
7
|
+
* Matches web's axisUpdateAnimationTransition timing.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
10
|
-
|
|
11
|
-
opacity: number;
|
|
12
|
-
};
|
|
13
|
-
animate: {
|
|
14
|
-
opacity: number;
|
|
15
|
-
transition: {
|
|
16
|
-
duration: number;
|
|
17
|
-
delay: number;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
exit: {
|
|
21
|
-
opacity: number;
|
|
22
|
-
transition: {
|
|
23
|
-
duration: number;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Animation variants for axis elements - updates (used for both grid lines and tick labels)
|
|
29
|
-
*/
|
|
30
|
-
export declare const axisUpdateAnimationVariants: {
|
|
31
|
-
initial: {
|
|
32
|
-
opacity: number;
|
|
33
|
-
};
|
|
34
|
-
animate: {
|
|
35
|
-
opacity: number;
|
|
36
|
-
transition: {
|
|
37
|
-
duration: number;
|
|
38
|
-
delay: number;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
exit: {
|
|
42
|
-
opacity: number;
|
|
43
|
-
transition: {
|
|
44
|
-
duration: number;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
9
|
+
export declare const axisUpdateAnimationTransition: {
|
|
10
|
+
duration: number;
|
|
47
11
|
};
|
|
48
12
|
export type AxisTickLabelComponentProps = Pick<
|
|
49
13
|
ChartTextProps,
|
|
@@ -64,6 +28,20 @@ export type AxisTickLabelComponentProps = Pick<
|
|
|
64
28
|
>;
|
|
65
29
|
export type AxisTickLabelComponent = React.FC<AxisTickLabelComponentProps>;
|
|
66
30
|
export type AxisBaseProps = {
|
|
31
|
+
/**
|
|
32
|
+
* Placement of grid lines relative to each band.
|
|
33
|
+
* Options: 'start', 'middle', 'end', 'edges'
|
|
34
|
+
* @note This property only applies to band scales.
|
|
35
|
+
* @default 'edges'
|
|
36
|
+
*/
|
|
37
|
+
bandGridLinePlacement?: AxisBandPlacement;
|
|
38
|
+
/**
|
|
39
|
+
* Placement of tick marks relative to each band.
|
|
40
|
+
* Options: 'start', 'middle', 'end', 'edges'
|
|
41
|
+
* @note This property only applies to band scales.
|
|
42
|
+
* @default 'middle'
|
|
43
|
+
*/
|
|
44
|
+
bandTickMarkPlacement?: AxisBandPlacement;
|
|
67
45
|
/**
|
|
68
46
|
* Label text to display for the axis.
|
|
69
47
|
*/
|
|
@@ -84,7 +62,9 @@ export type AxisBaseProps = {
|
|
|
84
62
|
* This value is passed into d3 and may not be respected.
|
|
85
63
|
* @note This property is overridden when `ticks` is provided.
|
|
86
64
|
* @note this property overrides the `tickInterval` property.
|
|
87
|
-
* @default 5
|
|
65
|
+
* @default 5 for value axes by layout:
|
|
66
|
+
* - X axis when chart layout is horizontal
|
|
67
|
+
* - Y axis when chart layout is vertical
|
|
88
68
|
*/
|
|
89
69
|
requestedTickCount?: number;
|
|
90
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Axis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAmC,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEnF;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;CAEzC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,cAAc,EACZ,GAAG,GACH,GAAG,GACH,UAAU,GACV,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,cAAc,GACd,UAAU,GACV,YAAY,GACZ,WAAW,GACX,OAAO,GACP,qBAAqB,GACrB,mBAAmB,GACnB,SAAS,CACZ,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC;AAE3E,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,CAAC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type AxisProps } from './Axis';
|
|
2
2
|
export type XAxisBaseProps = AxisBaseProps & {
|
|
3
|
+
/**
|
|
4
|
+
* The ID of the axis to render.
|
|
5
|
+
* Defaults to defaultAxisId if not specified.
|
|
6
|
+
* @note Only used for axis selection when layout is 'horizontal'. Vertical layout uses a single x-axis.
|
|
7
|
+
*/
|
|
8
|
+
axisId?: string;
|
|
3
9
|
/**
|
|
4
10
|
* The position of the axis relative to the chart's drawing area.
|
|
5
11
|
* @default 'bottom'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/XAxis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"XAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/XAxis.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDA6RjB,CAAC"}
|
|
@@ -3,6 +3,7 @@ export type YAxisBaseProps = AxisBaseProps & {
|
|
|
3
3
|
/**
|
|
4
4
|
* The ID of the axis to render.
|
|
5
5
|
* Defaults to defaultAxisId if not specified.
|
|
6
|
+
* @note Only used for axis selection when layout is 'vertical'. Horizontal layout supports a single y-axis.
|
|
6
7
|
*/
|
|
7
8
|
axisId?: string;
|
|
8
9
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/YAxis.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"YAxis.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/YAxis.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAM5D,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG;IAC3C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpD,eAAO,MAAM,KAAK,kDA2RjB,CAAC"}
|
package/dts/chart/bar/Bar.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* X coordinate of the bar (left edge).
|
|
6
|
-
*/
|
|
7
|
-
x: number;
|
|
8
|
-
/**
|
|
9
|
-
* Y coordinate of the bar (top edge).
|
|
10
|
-
*/
|
|
11
|
-
y: number;
|
|
12
|
-
/**
|
|
13
|
-
* Width of the bar.
|
|
14
|
-
*/
|
|
15
|
-
width: number;
|
|
16
|
-
/**
|
|
17
|
-
* Height of the bar.
|
|
18
|
-
*/
|
|
19
|
-
height: number;
|
|
2
|
+
import type { Rect } from '@coinbase/cds-common';
|
|
3
|
+
import { type BarTransition, type Transition } from '../utils';
|
|
4
|
+
export type BarBaseProps = Rect & {
|
|
20
5
|
/**
|
|
21
6
|
* Border radius for the bar.
|
|
22
7
|
* @default 4
|
|
23
8
|
*/
|
|
24
9
|
borderRadius?: number;
|
|
25
|
-
/**
|
|
26
|
-
* Whether to round the top of the bar.
|
|
27
|
-
*/
|
|
10
|
+
/** Whether to round the top of the bar. */
|
|
28
11
|
roundTop?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to round the bottom of the bar.
|
|
31
|
-
*/
|
|
12
|
+
/** Whether to round the bottom of the bar. */
|
|
32
13
|
roundBottom?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* The x-axis data value for this bar.
|
|
39
|
-
*/
|
|
40
|
-
dataX?: number | string;
|
|
41
|
-
/**
|
|
42
|
-
* The y-axis data value for this bar.
|
|
43
|
-
*/
|
|
14
|
+
/** Origin of the bar. */
|
|
15
|
+
origin?: number;
|
|
16
|
+
/** The x-axis data value for this bar. */
|
|
17
|
+
dataX?: number | [number, number] | null;
|
|
18
|
+
/** The y-axis data value for this bar. */
|
|
44
19
|
dataY?: number | [number, number] | null;
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
/** The ID of the series this bar belongs to. */
|
|
21
|
+
seriesId?: string;
|
|
22
|
+
/** Fill color for the bar. */
|
|
48
23
|
fill?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Fill opacity for the bar.
|
|
51
|
-
*/
|
|
24
|
+
/** Fill opacity for the bar. */
|
|
52
25
|
fillOpacity?: number;
|
|
53
|
-
/**
|
|
54
|
-
* Stroke color for the bar outline.
|
|
55
|
-
*/
|
|
26
|
+
/** Stroke color for the bar outline. */
|
|
56
27
|
stroke?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Stroke width for the bar outline.
|
|
59
|
-
*/
|
|
28
|
+
/** Stroke width for the bar outline. */
|
|
60
29
|
strokeWidth?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Component to render the bar.
|
|
63
|
-
*/
|
|
30
|
+
/** Component to render the bar. */
|
|
64
31
|
BarComponent?: BarComponent;
|
|
32
|
+
/** Minimum bar size in pixels. When set, bars shorter than this value are expanded. */
|
|
33
|
+
minSize?: number;
|
|
65
34
|
};
|
|
66
35
|
export type BarProps = BarBaseProps & {
|
|
67
36
|
/**
|
|
68
|
-
* Transition configuration for
|
|
37
|
+
* Transition configuration for enter and update animations.
|
|
38
|
+
* @note Disable an animation by passing in null.
|
|
39
|
+
*
|
|
40
|
+
* @default transitions = {{
|
|
41
|
+
* enter: { type: 'spring', stiffness: 900, damping: 120, staggerDelay: 250 },
|
|
42
|
+
* update: { type: 'spring', stiffness: 900, damping: 120 }
|
|
43
|
+
* }}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // Custom staggered enter and spring update
|
|
47
|
+
* transitions={{ enter: { type: 'timing', duration: 500, staggerDelay: 300 }, update: { type: 'spring', damping: 20 } }}
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Disable enter animation
|
|
51
|
+
* transitions={{ enter: null }}
|
|
52
|
+
*/
|
|
53
|
+
transitions?: {
|
|
54
|
+
/**
|
|
55
|
+
* Transition for the initial enter/reveal animation.
|
|
56
|
+
* Set to `null` to disable.
|
|
57
|
+
*/
|
|
58
|
+
enter?: BarTransition | null;
|
|
59
|
+
/**
|
|
60
|
+
* Transition for subsequent data update animations.
|
|
61
|
+
* Set to `null` to disable.
|
|
62
|
+
*/
|
|
63
|
+
update?: BarTransition | null;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Transition for updates.
|
|
67
|
+
* @deprecated Use `transitions.update` instead. This will be removed in a future major release.
|
|
68
|
+
* @deprecationExpectedRemoval v4
|
|
69
69
|
*/
|
|
70
70
|
transition?: Transition;
|
|
71
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,E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AiB,GAAG,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,GAAG;IAC/D;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,GAAG,sCA2Df,CAAC"}
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import type { View } from 'react-native';
|
|
2
2
|
import { type XAxisProps, type YAxisProps } from '../axis';
|
|
3
3
|
import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
|
|
4
|
-
import { type
|
|
4
|
+
import { type CartesianAxisConfigProps } from '../utils';
|
|
5
5
|
import { type BarPlotProps } from './BarPlot';
|
|
6
|
-
|
|
6
|
+
import type { BarSeries } from './BarStack';
|
|
7
|
+
export type BarChartBaseProps = Omit<
|
|
8
|
+
CartesianChartBaseProps,
|
|
9
|
+
| 'xAxis'
|
|
10
|
+
| 'yAxis'
|
|
11
|
+
| 'series'
|
|
12
|
+
| 'borderRadius'
|
|
13
|
+
| 'borderTopLeftRadius'
|
|
14
|
+
| 'borderTopRightRadius'
|
|
15
|
+
| 'borderBottomLeftRadius'
|
|
16
|
+
| 'borderBottomRightRadius'
|
|
17
|
+
> &
|
|
7
18
|
Pick<
|
|
8
19
|
BarPlotProps,
|
|
9
20
|
| 'barPadding'
|
|
@@ -17,12 +28,14 @@ export type BarChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis'
|
|
|
17
28
|
| 'stackGap'
|
|
18
29
|
| 'barMinSize'
|
|
19
30
|
| 'stackMinSize'
|
|
31
|
+
| 'transitions'
|
|
20
32
|
| 'transition'
|
|
21
33
|
> & {
|
|
22
34
|
/**
|
|
23
35
|
* Configuration objects that define how to visualize the data.
|
|
36
|
+
* Each series can optionally define its own BarComponent.
|
|
24
37
|
*/
|
|
25
|
-
series?: Array<
|
|
38
|
+
series?: Array<BarSeries>;
|
|
26
39
|
/**
|
|
27
40
|
* Whether to stack the areas on top of each other.
|
|
28
41
|
* When true, each series builds cumulative values on top of the previous series.
|
|
@@ -45,24 +58,45 @@ export type BarChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis'
|
|
|
45
58
|
* Accepts axis config and axis props.
|
|
46
59
|
* To show the axis, set `showXAxis` to true.
|
|
47
60
|
*/
|
|
48
|
-
xAxis?: Partial<
|
|
61
|
+
xAxis?: Partial<CartesianAxisConfigProps> & XAxisProps;
|
|
49
62
|
/**
|
|
50
63
|
* Configuration for y-axis.
|
|
51
64
|
* Accepts axis config and axis props.
|
|
52
65
|
* To show the axis, set `showYAxis` to true.
|
|
53
66
|
*/
|
|
54
|
-
yAxis?: Partial<
|
|
67
|
+
yAxis?: Partial<CartesianAxisConfigProps> & YAxisProps;
|
|
55
68
|
};
|
|
56
69
|
export type BarChartProps = BarChartBaseProps &
|
|
57
|
-
Omit<
|
|
70
|
+
Omit<
|
|
71
|
+
CartesianChartProps,
|
|
72
|
+
| 'xAxis'
|
|
73
|
+
| 'yAxis'
|
|
74
|
+
| 'series'
|
|
75
|
+
| 'borderRadius'
|
|
76
|
+
| 'borderTopLeftRadius'
|
|
77
|
+
| 'borderTopRightRadius'
|
|
78
|
+
| 'borderBottomLeftRadius'
|
|
79
|
+
| 'borderBottomRightRadius'
|
|
80
|
+
>;
|
|
58
81
|
export declare const BarChart: import('react').MemoExoticComponent<
|
|
59
82
|
import('react').ForwardRefExoticComponent<
|
|
60
|
-
Omit<
|
|
83
|
+
Omit<
|
|
84
|
+
CartesianChartBaseProps,
|
|
85
|
+
| 'borderRadius'
|
|
86
|
+
| 'series'
|
|
87
|
+
| 'borderTopLeftRadius'
|
|
88
|
+
| 'borderTopRightRadius'
|
|
89
|
+
| 'borderBottomLeftRadius'
|
|
90
|
+
| 'borderBottomRightRadius'
|
|
91
|
+
| 'xAxis'
|
|
92
|
+
| 'yAxis'
|
|
93
|
+
> &
|
|
61
94
|
Pick<
|
|
62
95
|
BarPlotProps,
|
|
63
96
|
| 'borderRadius'
|
|
64
97
|
| 'strokeWidth'
|
|
65
98
|
| 'stroke'
|
|
99
|
+
| 'transitions'
|
|
66
100
|
| 'transition'
|
|
67
101
|
| 'fillOpacity'
|
|
68
102
|
| 'BarComponent'
|
|
@@ -75,8 +109,9 @@ export declare const BarChart: import('react').MemoExoticComponent<
|
|
|
75
109
|
> & {
|
|
76
110
|
/**
|
|
77
111
|
* Configuration objects that define how to visualize the data.
|
|
112
|
+
* Each series can optionally define its own BarComponent.
|
|
78
113
|
*/
|
|
79
|
-
series?: Array<
|
|
114
|
+
series?: Array<BarSeries>;
|
|
80
115
|
/**
|
|
81
116
|
* Whether to stack the areas on top of each other.
|
|
82
117
|
* When true, each series builds cumulative values on top of the previous series.
|
|
@@ -99,14 +134,24 @@ export declare const BarChart: import('react').MemoExoticComponent<
|
|
|
99
134
|
* Accepts axis config and axis props.
|
|
100
135
|
* To show the axis, set `showXAxis` to true.
|
|
101
136
|
*/
|
|
102
|
-
xAxis?: Partial<
|
|
137
|
+
xAxis?: Partial<CartesianAxisConfigProps> & XAxisProps;
|
|
103
138
|
/**
|
|
104
139
|
* Configuration for y-axis.
|
|
105
140
|
* Accepts axis config and axis props.
|
|
106
141
|
* To show the axis, set `showYAxis` to true.
|
|
107
142
|
*/
|
|
108
|
-
yAxis?: Partial<
|
|
109
|
-
} & Omit<
|
|
143
|
+
yAxis?: Partial<CartesianAxisConfigProps> & YAxisProps;
|
|
144
|
+
} & Omit<
|
|
145
|
+
CartesianChartProps,
|
|
146
|
+
| 'borderRadius'
|
|
147
|
+
| 'series'
|
|
148
|
+
| 'borderTopLeftRadius'
|
|
149
|
+
| 'borderTopRightRadius'
|
|
150
|
+
| 'borderBottomLeftRadius'
|
|
151
|
+
| 'borderBottomRightRadius'
|
|
152
|
+
| 'xAxis'
|
|
153
|
+
| 'yAxis'
|
|
154
|
+
> &
|
|
110
155
|
import('react').RefAttributes<View>
|
|
111
156
|
>
|
|
112
157
|
>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarChart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,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,
|
|
1
|
+
{"version":3,"file":"BarChart.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarChart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,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,EAAE,KAAK,wBAAwB,EAAkB,MAAM,UAAU,CAAC;AAEzE,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,uBAAuB,EACrB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,CAC5B,GACC,IAAI,CACF,YAAY,EACV,YAAY,GACZ,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,mBAAmB,GACnB,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,GACd,aAAa,GACb,YAAY,CACf,GAAG;IACF;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,UAAU,CAAC;IACvD;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,UAAU,CAAC;CACxD,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CACF,mBAAmB,EACjB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,CAC5B,CAAC;AAEJ,eAAO,MAAM,QAAQ;IAjDjB;;;OAGG;aACM,KAAK,CAAC,SAAS,CAAC;IACzB;;;;;;;OAOG;cACO,OAAO;IACjB;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;;;OAIG;YACK,OAAO,CAAC,wBAAwB,CAAC,GAAG,UAAU;IACtD;;;;OAIG;YACK,OAAO,CAAC,wBAAwB,CAAC,GAAG,UAAU;4NAqKzD,CAAC"}
|
|
@@ -19,7 +19,8 @@ export type BarPlotBaseProps = Pick<
|
|
|
19
19
|
*/
|
|
20
20
|
seriesIds?: string[];
|
|
21
21
|
};
|
|
22
|
-
export type BarPlotProps = BarPlotBaseProps &
|
|
22
|
+
export type BarPlotProps = BarPlotBaseProps &
|
|
23
|
+
Pick<BarStackGroupProps, 'transitions' | 'transition'>;
|
|
23
24
|
/**
|
|
24
25
|
* BarPlot component that handles multiple series with proper stacking coordination.
|
|
25
26
|
* Groups series by stack ID + y-axis ID combination and renders BarStackGroup for each group.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarPlot.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarPlot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BarPlot.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarPlot.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,kBAAkB,EAChB,YAAY,GACZ,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,GACd,mBAAmB,CACtB,GAAG;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GACzC,IAAI,CAAC,kBAAkB,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC;AAQzD;;;;;GAKG;AACH,eAAO,MAAM,OAAO,oDA2FnB,CAAC"}
|
|
@@ -1,38 +1,58 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Rect } from '@coinbase/cds-common';
|
|
3
|
-
import type { ChartScaleFunction, Series
|
|
4
|
-
import { type BarProps } from './Bar';
|
|
3
|
+
import type { ChartScaleFunction, Series } from '../utils';
|
|
4
|
+
import { type BarBaseProps, type BarComponent, type BarProps } from './Bar';
|
|
5
|
+
/**
|
|
6
|
+
* Extended series type that includes bar-specific properties.
|
|
7
|
+
*/
|
|
8
|
+
export type BarSeries = Series & {
|
|
9
|
+
/**
|
|
10
|
+
* Custom component to render bars for this series.
|
|
11
|
+
*/
|
|
12
|
+
BarComponent?: BarComponent;
|
|
13
|
+
};
|
|
5
14
|
export type BarStackBaseProps = Pick<
|
|
6
|
-
|
|
15
|
+
BarBaseProps,
|
|
7
16
|
'BarComponent' | 'fillOpacity' | 'stroke' | 'strokeWidth' | 'borderRadius'
|
|
8
17
|
> & {
|
|
9
18
|
/**
|
|
10
19
|
* Array of series configurations that belong to this stack.
|
|
11
20
|
*/
|
|
12
|
-
series:
|
|
21
|
+
series: BarSeries[];
|
|
13
22
|
/**
|
|
14
23
|
* The category index for this stack.
|
|
15
24
|
*/
|
|
16
25
|
categoryIndex: number;
|
|
17
26
|
/**
|
|
18
|
-
*
|
|
27
|
+
* Position of this stack along the index (categorical) axis.
|
|
19
28
|
*/
|
|
20
|
-
|
|
29
|
+
indexPos: number;
|
|
21
30
|
/**
|
|
22
|
-
*
|
|
31
|
+
* Thickness of this stack.
|
|
23
32
|
*/
|
|
24
|
-
|
|
33
|
+
thickness: number;
|
|
25
34
|
/**
|
|
26
|
-
*
|
|
35
|
+
* Scale for the independent (categorical) axis.
|
|
27
36
|
*/
|
|
28
|
-
|
|
37
|
+
indexScale: ChartScaleFunction;
|
|
38
|
+
/**
|
|
39
|
+
* Scale for the dependent (magnitude) axis.
|
|
40
|
+
*/
|
|
41
|
+
valueScale: ChartScaleFunction;
|
|
29
42
|
/**
|
|
30
43
|
* Chart rect for bounds.
|
|
31
44
|
*/
|
|
32
45
|
rect: Rect;
|
|
46
|
+
/**
|
|
47
|
+
* X axis ID to use.
|
|
48
|
+
* If not provided, defaults to defaultAxisId.
|
|
49
|
+
* @note Only used for axis selection when layout is 'horizontal'. Vertical layout uses a single x-axis.
|
|
50
|
+
*/
|
|
51
|
+
xAxisId?: string;
|
|
33
52
|
/**
|
|
34
53
|
* Y axis ID to use.
|
|
35
|
-
* If not provided,
|
|
54
|
+
* If not provided, defaults to defaultAxisId.
|
|
55
|
+
* @note Only used for axis selection when layout is 'vertical'. Horizontal layout supports a single y-axis.
|
|
36
56
|
*/
|
|
37
57
|
yAxisId?: string;
|
|
38
58
|
/**
|
|
@@ -58,20 +78,23 @@ export type BarStackBaseProps = Pick<
|
|
|
58
78
|
*/
|
|
59
79
|
stackMinSize?: number;
|
|
60
80
|
};
|
|
61
|
-
export type BarStackProps = BarStackBaseProps &
|
|
62
|
-
/**
|
|
63
|
-
* Transition configurations for different animation phases.
|
|
64
|
-
*/
|
|
65
|
-
transition?: Transition;
|
|
66
|
-
};
|
|
81
|
+
export type BarStackProps = BarStackBaseProps & Pick<BarProps, 'transitions' | 'transition'>;
|
|
67
82
|
export type BarStackComponentProps = Pick<
|
|
68
83
|
BarStackProps,
|
|
69
|
-
'
|
|
84
|
+
'categoryIndex' | 'borderRadius' | 'transitions' | 'transition'
|
|
70
85
|
> & {
|
|
86
|
+
/**
|
|
87
|
+
* The x position of the stack.
|
|
88
|
+
*/
|
|
89
|
+
x: number;
|
|
71
90
|
/**
|
|
72
91
|
* The y position of the stack.
|
|
73
92
|
*/
|
|
74
93
|
y: number;
|
|
94
|
+
/**
|
|
95
|
+
* The width of the stack.
|
|
96
|
+
*/
|
|
97
|
+
width: number;
|
|
75
98
|
/**
|
|
76
99
|
* The height of the stack.
|
|
77
100
|
*/
|
|
@@ -89,9 +112,11 @@ export type BarStackComponentProps = Pick<
|
|
|
89
112
|
*/
|
|
90
113
|
roundBottom?: boolean;
|
|
91
114
|
/**
|
|
92
|
-
*
|
|
115
|
+
* Stack animation origin.
|
|
116
|
+
* - number: baseline on the value axis
|
|
117
|
+
* - tuple: [start, end] clip range for stacked min-size enter animation
|
|
93
118
|
*/
|
|
94
|
-
|
|
119
|
+
origin?: number | [number, number];
|
|
95
120
|
};
|
|
96
121
|
export type BarStackComponent = React.FC<BarStackComponentProps>;
|
|
97
122
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarStack.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"BarStack.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAA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C,CAAC;AAE7F,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,aAAa,EACb,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,YAAY,CAChE,GAAG;IACF;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAAC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,QAAQ,2CAsMpB,CAAC"}
|
|
@@ -11,9 +11,10 @@ export type BarStackGroupProps = Pick<
|
|
|
11
11
|
| 'barMinSize'
|
|
12
12
|
| 'stackMinSize'
|
|
13
13
|
| 'BarStackComponent'
|
|
14
|
+
| 'transitions'
|
|
14
15
|
| 'transition'
|
|
15
16
|
> &
|
|
16
|
-
Pick<BarStackProps, 'series' | 'yAxisId'> & {
|
|
17
|
+
Pick<BarStackProps, 'series' | 'xAxisId' | 'yAxisId'> & {
|
|
17
18
|
/**
|
|
18
19
|
* Index of this stack within the category (0-based).
|
|
19
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarStackGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarStackGroup.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,GACd,mBAAmB,GACnB,YAAY,CACf,GACC,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"BarStackGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/BarStackGroup.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,cAAc,GACd,aAAa,GACb,QAAQ,GACR,aAAa,GACb,cAAc,GACd,eAAe,GACf,UAAU,GACV,YAAY,GACZ,cAAc,GACd,mBAAmB,GACnB,aAAa,GACb,YAAY,CACf,GACC,IAAI,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC,GAAG;IACtD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,aAAa,0DA4FzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultBar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/DefaultBar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultBar.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/DefaultBar.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,UAAU,yDAqGtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultBarStack.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/DefaultBarStack.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultBarStack.d.ts","sourceRoot":"","sources":["../../../src/chart/bar/DefaultBarStack.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,eAAe,8DA2E3B,CAAC"}
|
|
@@ -4,6 +4,11 @@ export type GradientBaseProps = {
|
|
|
4
4
|
* Gradient definition with stops, axis, and other configuration.
|
|
5
5
|
*/
|
|
6
6
|
gradient: GradientDefinition;
|
|
7
|
+
/**
|
|
8
|
+
* X-axis ID to use for gradient processing.
|
|
9
|
+
* When provided, the gradient will align with the specified x-axis range.
|
|
10
|
+
*/
|
|
11
|
+
xAxisId?: string;
|
|
7
12
|
/**
|
|
8
13
|
* Y-axis ID to use for gradient processing.
|
|
9
14
|
* When provided, the gradient will align with the specified y-axis range.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../src/chart/gradient/Gradient.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,yDA8BnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../src/chart/gradient/Gradient.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,yDA8BnB,CAAC"}
|
package/dts/chart/index.d.ts
CHANGED
package/dts/chart/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chart/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chart/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type HStackProps } from '@coinbase/cds-mobile/layout';
|
|
2
|
+
import type { LegendEntryProps } from './Legend';
|
|
3
|
+
export type DefaultLegendEntryProps = LegendEntryProps & Omit<HStackProps, 'children' | 'color'>;
|
|
4
|
+
export declare const DefaultLegendEntry: import('react').NamedExoticComponent<DefaultLegendEntryProps>;
|
|
5
|
+
//# sourceMappingURL=DefaultLegendEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLegendEntry.d.ts","sourceRoot":"","sources":["../../../src/chart/legend/DefaultLegendEntry.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAIvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAEjG,eAAO,MAAM,kBAAkB,+DA8B9B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type BoxProps } from '@coinbase/cds-mobile/layout';
|
|
2
|
+
import type { LegendShapeProps } from './Legend';
|
|
3
|
+
export type DefaultLegendShapeProps = LegendShapeProps & Omit<BoxProps, 'children' | 'color'>;
|
|
4
|
+
export declare const DefaultLegendShape: import('react').NamedExoticComponent<DefaultLegendShapeProps>;
|
|
5
|
+
//# sourceMappingURL=DefaultLegendShape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLegendShape.d.ts","sourceRoot":"","sources":["../../../src/chart/legend/DefaultLegendShape.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAIjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAwCjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAE9F,eAAO,MAAM,kBAAkB,+DAc9B,CAAC"}
|