@coinbase/cds-mobile-visualization 3.4.0-beta.2 → 3.4.0-beta.20
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 +122 -0
- package/dts/chart/CartesianChart.d.ts +92 -34
- package/dts/chart/CartesianChart.d.ts.map +1 -1
- package/dts/chart/ChartContextBridge.d.ts +28 -0
- package/dts/chart/ChartContextBridge.d.ts.map +1 -0
- package/dts/chart/ChartProvider.d.ts +3 -0
- package/dts/chart/ChartProvider.d.ts.map +1 -1
- package/dts/chart/Path.d.ts +97 -32
- package/dts/chart/Path.d.ts.map +1 -1
- package/dts/chart/PeriodSelector.d.ts +6 -13
- package/dts/chart/PeriodSelector.d.ts.map +1 -1
- package/dts/chart/area/Area.d.ts +39 -28
- package/dts/chart/area/Area.d.ts.map +1 -1
- package/dts/chart/area/AreaChart.d.ts +51 -10
- package/dts/chart/area/AreaChart.d.ts.map +1 -1
- package/dts/chart/area/DottedArea.d.ts +21 -2
- package/dts/chart/area/DottedArea.d.ts.map +1 -1
- package/dts/chart/area/GradientArea.d.ts +19 -13
- package/dts/chart/area/GradientArea.d.ts.map +1 -1
- package/dts/chart/area/SolidArea.d.ts +17 -2
- package/dts/chart/area/SolidArea.d.ts.map +1 -1
- package/dts/chart/axis/Axis.d.ts +86 -118
- 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 +2 -2
- 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 +49 -12
- package/dts/chart/bar/Bar.d.ts.map +1 -1
- package/dts/chart/bar/BarChart.d.ts +40 -19
- package/dts/chart/bar/BarChart.d.ts.map +1 -1
- package/dts/chart/bar/BarPlot.d.ts +3 -1
- package/dts/chart/bar/BarPlot.d.ts.map +1 -1
- package/dts/chart/bar/BarStack.d.ts +41 -46
- package/dts/chart/bar/BarStack.d.ts.map +1 -1
- package/dts/chart/bar/BarStackGroup.d.ts +2 -0
- package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
- package/dts/chart/bar/DefaultBar.d.ts +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 +25 -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 +4 -1
- 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/DefaultReferenceLineLabel.d.ts +9 -0
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
- package/dts/chart/line/DottedLine.d.ts +13 -5
- package/dts/chart/line/DottedLine.d.ts.map +1 -1
- package/dts/chart/line/Line.d.ts +61 -27
- package/dts/chart/line/Line.d.ts.map +1 -1
- package/dts/chart/line/LineChart.d.ts +43 -9
- package/dts/chart/line/LineChart.d.ts.map +1 -1
- package/dts/chart/line/ReferenceLine.d.ts +68 -20
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
- package/dts/chart/line/SolidLine.d.ts +8 -5
- 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 +136 -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 +38 -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 +11 -0
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/Scrubber.d.ts +230 -42
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +54 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +46 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts +6 -3
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -1
- 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 +151 -77
- 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/axis.d.ts +25 -1
- package/dts/chart/utils/axis.d.ts.map +1 -1
- package/dts/chart/utils/bar.d.ts +34 -0
- package/dts/chart/utils/bar.d.ts.map +1 -1
- package/dts/chart/utils/chart.d.ts +52 -7
- package/dts/chart/utils/chart.d.ts.map +1 -1
- package/dts/chart/utils/context.d.ts +28 -7
- package/dts/chart/utils/context.d.ts.map +1 -1
- package/dts/chart/utils/gradient.d.ts +117 -0
- package/dts/chart/utils/gradient.d.ts.map +1 -0
- package/dts/chart/utils/index.d.ts +3 -0
- package/dts/chart/utils/index.d.ts.map +1 -1
- package/dts/chart/utils/path.d.ts +59 -0
- package/dts/chart/utils/path.d.ts.map +1 -1
- package/dts/chart/utils/point.d.ts +71 -7
- package/dts/chart/utils/point.d.ts.map +1 -1
- package/dts/chart/utils/scale.d.ts +102 -0
- package/dts/chart/utils/scale.d.ts.map +1 -1
- package/dts/chart/utils/scrubber.d.ts +40 -0
- package/dts/chart/utils/scrubber.d.ts.map +1 -0
- package/dts/chart/utils/transition.d.ts +178 -0
- package/dts/chart/utils/transition.d.ts.map +1 -0
- package/esm/chart/CartesianChart.js +199 -75
- package/esm/chart/ChartContextBridge.js +159 -0
- package/esm/chart/ChartProvider.js +2 -2
- package/esm/chart/Path.js +200 -114
- package/esm/chart/PeriodSelector.js +7 -3
- package/esm/chart/__stories__/CartesianChart.stories.js +307 -134
- package/esm/chart/__stories__/ChartTransitions.stories.js +629 -0
- package/esm/chart/__stories__/PeriodSelector.stories.js +201 -75
- package/esm/chart/area/Area.js +27 -35
- package/esm/chart/area/AreaChart.js +17 -12
- package/esm/chart/area/DottedArea.js +64 -108
- package/esm/chart/area/GradientArea.js +37 -91
- package/esm/chart/area/SolidArea.js +24 -8
- package/esm/chart/area/__stories__/AreaChart.stories.js +1 -1
- package/esm/chart/axis/Axis.js +5 -39
- package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
- package/esm/chart/axis/XAxis.js +148 -66
- package/esm/chart/axis/YAxis.js +149 -65
- package/esm/chart/axis/__stories__/Axis.stories.js +259 -1
- package/esm/chart/axis/index.js +1 -0
- package/esm/chart/bar/Bar.js +7 -1
- package/esm/chart/bar/BarChart.js +17 -37
- package/esm/chart/bar/BarPlot.js +43 -35
- package/esm/chart/bar/BarStack.js +84 -37
- package/esm/chart/bar/BarStackGroup.js +7 -17
- package/esm/chart/bar/DefaultBar.js +29 -51
- package/esm/chart/bar/DefaultBarStack.js +34 -58
- package/esm/chart/bar/__stories__/BarChart.stories.js +948 -88
- package/esm/chart/gradient/Gradient.js +53 -0
- package/esm/chart/gradient/index.js +1 -0
- package/esm/chart/index.js +4 -1
- 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/DefaultReferenceLineLabel.js +66 -0
- package/esm/chart/line/DottedLine.js +31 -14
- package/esm/chart/line/Line.js +96 -68
- package/esm/chart/line/LineChart.js +21 -14
- package/esm/chart/line/ReferenceLine.js +80 -63
- package/esm/chart/line/SolidLine.js +27 -10
- package/esm/chart/line/__stories__/LineChart.stories.js +1748 -2048
- package/esm/chart/line/__stories__/ReferenceLine.stories.js +177 -28
- package/esm/chart/line/index.js +1 -1
- package/esm/chart/point/DefaultPointLabel.js +39 -0
- package/esm/chart/point/Point.js +186 -0
- package/esm/chart/point/index.js +2 -0
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +180 -0
- package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
- package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
- package/esm/chart/scrubber/Scrubber.js +130 -144
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +165 -0
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +208 -0
- package/esm/chart/scrubber/ScrubberProvider.js +46 -54
- package/esm/chart/scrubber/__stories__/Scrubber.stories.js +760 -0
- package/esm/chart/scrubber/index.js +3 -1
- package/esm/chart/text/ChartText.js +242 -174
- package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +6 -5
- package/esm/chart/text/index.js +1 -1
- package/esm/chart/utils/axis.js +47 -31
- package/esm/chart/utils/bar.js +43 -0
- package/esm/chart/utils/chart.js +57 -3
- package/esm/chart/utils/gradient.js +305 -0
- package/esm/chart/utils/index.js +3 -0
- package/esm/chart/utils/path.js +84 -8
- package/esm/chart/utils/point.js +171 -17
- package/esm/chart/utils/scale.js +242 -2
- package/esm/chart/utils/scrubber.js +146 -0
- package/esm/chart/utils/transition.js +220 -0
- package/esm/sparkline/__figma__/Sparkline.figma.js +1 -1
- package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
- package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
- package/esm/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +1 -1
- package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +51 -26
- package/esm/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +1 -1
- package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
- package/package.json +15 -10
- package/dts/chart/Point.d.ts +0 -103
- package/dts/chart/Point.d.ts.map +0 -1
- package/dts/chart/line/GradientLine.d.ts +0 -45
- package/dts/chart/line/GradientLine.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -75
- package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
- package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
- package/esm/chart/Point.js +0 -111
- package/esm/chart/__stories__/Chart.stories.js +0 -79
- package/esm/chart/line/GradientLine.js +0 -62
- package/esm/chart/scrubber/ScrubberBeacon.js +0 -199
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../src/chart/area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,M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IACV;;;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,uCAiFhB,CAAC"}
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
import type { View } from 'react-native';
|
|
2
2
|
import { type XAxisProps, type YAxisProps } from '../axis';
|
|
3
|
-
import { type CartesianChartProps } from '../CartesianChart';
|
|
3
|
+
import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
|
|
4
4
|
import { type LineProps } from '../line/Line';
|
|
5
5
|
import { type AxisConfigProps, type Series } from '../utils';
|
|
6
6
|
import { type AreaProps } from './Area';
|
|
7
7
|
export type AreaSeries = Series &
|
|
8
|
-
Partial<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Partial<
|
|
9
|
+
Pick<
|
|
10
|
+
AreaProps,
|
|
11
|
+
'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'fill' | 'connectNulls' | 'transition'
|
|
12
|
+
>
|
|
13
|
+
> &
|
|
14
|
+
Partial<Pick<LineProps, 'LineComponent' | 'strokeWidth' | 'stroke' | 'opacity'>> & {
|
|
15
|
+
/**
|
|
16
|
+
* The type of line to render for this series.
|
|
17
|
+
* Overrides the chart-level lineType if provided.
|
|
18
|
+
* @default 'solid'
|
|
19
|
+
*/
|
|
20
|
+
lineType?: 'solid' | 'dotted';
|
|
21
|
+
};
|
|
22
|
+
export type AreaChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
|
|
23
|
+
Pick<
|
|
24
|
+
AreaProps,
|
|
25
|
+
'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'connectNulls' | 'transition'
|
|
26
|
+
> &
|
|
12
27
|
Pick<LineProps, 'LineComponent' | 'strokeWidth'> & {
|
|
13
28
|
/**
|
|
14
29
|
* Configuration objects that define how to visualize the data.
|
|
@@ -41,14 +56,29 @@ export type AreaChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'seri
|
|
|
41
56
|
* The type of line to render.
|
|
42
57
|
* @default 'solid'
|
|
43
58
|
*/
|
|
44
|
-
lineType?: 'solid' | 'dotted'
|
|
59
|
+
lineType?: 'solid' | 'dotted';
|
|
60
|
+
/**
|
|
61
|
+
* Configuration for x-axis.
|
|
62
|
+
* Accepts axis config and axis props.
|
|
63
|
+
* To show the axis, set `showXAxis` to true.
|
|
64
|
+
*/
|
|
45
65
|
xAxis?: Partial<AxisConfigProps> & XAxisProps;
|
|
66
|
+
/**
|
|
67
|
+
* Configuration for y-axis.
|
|
68
|
+
* Accepts axis config and axis props.
|
|
69
|
+
* To show the axis, set `showYAxis` to true.
|
|
70
|
+
*/
|
|
46
71
|
yAxis?: Partial<AxisConfigProps> & YAxisProps;
|
|
47
72
|
};
|
|
73
|
+
export type AreaChartProps = AreaChartBaseProps &
|
|
74
|
+
Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
|
|
48
75
|
export declare const AreaChart: import('react').MemoExoticComponent<
|
|
49
76
|
import('react').ForwardRefExoticComponent<
|
|
50
|
-
Omit<
|
|
51
|
-
Pick<
|
|
77
|
+
Omit<CartesianChartBaseProps, 'series' | 'xAxis' | 'yAxis'> &
|
|
78
|
+
Pick<
|
|
79
|
+
AreaProps,
|
|
80
|
+
'type' | 'transition' | 'curve' | 'connectNulls' | 'fillOpacity' | 'AreaComponent'
|
|
81
|
+
> &
|
|
52
82
|
Pick<LineProps, 'strokeWidth' | 'LineComponent'> & {
|
|
53
83
|
/**
|
|
54
84
|
* Configuration objects that define how to visualize the data.
|
|
@@ -81,10 +111,21 @@ export declare const AreaChart: import('react').MemoExoticComponent<
|
|
|
81
111
|
* The type of line to render.
|
|
82
112
|
* @default 'solid'
|
|
83
113
|
*/
|
|
84
|
-
lineType?: 'solid' | 'dotted'
|
|
114
|
+
lineType?: 'solid' | 'dotted';
|
|
115
|
+
/**
|
|
116
|
+
* Configuration for x-axis.
|
|
117
|
+
* Accepts axis config and axis props.
|
|
118
|
+
* To show the axis, set `showXAxis` to true.
|
|
119
|
+
*/
|
|
85
120
|
xAxis?: Partial<AxisConfigProps> & XAxisProps;
|
|
121
|
+
/**
|
|
122
|
+
* Configuration for y-axis.
|
|
123
|
+
* Accepts axis config and axis props.
|
|
124
|
+
* To show the axis, set `showYAxis` to true.
|
|
125
|
+
*/
|
|
86
126
|
yAxis?: Partial<AxisConfigProps> & YAxisProps;
|
|
87
|
-
} &
|
|
127
|
+
} & Omit<CartesianChartProps, 'series' | 'xAxis' | 'yAxis'> &
|
|
128
|
+
import('react').RefAttributes<View>
|
|
88
129
|
>
|
|
89
130
|
>;
|
|
90
131
|
//# sourceMappingURL=AreaChart.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/chart/area/AreaChart.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,
|
|
1
|
+
{"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/chart/area/AreaChart.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,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,MAA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,CAAC,CAAC;AAE1D,eAAO,MAAM,SAAS;IAjDlB;;;OAGG;aACM,KAAK,CAAC,UAAU,CAAC;IAC1B;;;;;;;OAOG;cACO,OAAO;IACjB;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;;OAGG;gBACS,OAAO;IACnB;;;OAGG;eACQ,OAAO,GAAG,QAAQ;IAC7B;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;IAC7C;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;mGAkLhD,CAAC"}
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type PathProps } from '../Path';
|
|
2
2
|
import type { AreaComponentProps } from './Area';
|
|
3
|
-
export type DottedAreaProps =
|
|
3
|
+
export type DottedAreaProps = Pick<
|
|
4
|
+
PathProps,
|
|
5
|
+
| 'initialPath'
|
|
6
|
+
| 'children'
|
|
7
|
+
| 'stroke'
|
|
8
|
+
| 'strokeOpacity'
|
|
9
|
+
| 'strokeWidth'
|
|
10
|
+
| 'strokeCap'
|
|
11
|
+
| 'strokeJoin'
|
|
12
|
+
| 'clipRect'
|
|
13
|
+
| 'clipPath'
|
|
14
|
+
| 'clipOffset'
|
|
15
|
+
> &
|
|
4
16
|
AreaComponentProps & {
|
|
5
17
|
/**
|
|
6
18
|
* Size of the pattern unit (width and height).
|
|
@@ -14,14 +26,21 @@ export type DottedAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> &
|
|
|
14
26
|
dotSize?: number;
|
|
15
27
|
/**
|
|
16
28
|
* Opacity at the peak values (top/bottom of gradient).
|
|
17
|
-
* @
|
|
29
|
+
* @note only used when no gradient is provided
|
|
30
|
+
* @default 1
|
|
18
31
|
*/
|
|
19
32
|
peakOpacity?: number;
|
|
20
33
|
/**
|
|
21
34
|
* Opacity at the baseline (0 or edge closest to 0).
|
|
35
|
+
* @note only used when no gradient is provided
|
|
22
36
|
* @default 0
|
|
23
37
|
*/
|
|
24
38
|
baselineOpacity?: number;
|
|
25
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* A customizable dotted area gradient component.
|
|
42
|
+
* When no gradient is provided, renders a default gradient based
|
|
43
|
+
* on the fill color and peak/baseline opacities.
|
|
44
|
+
*/
|
|
26
45
|
export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
|
|
27
46
|
//# 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":"AAMA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACP,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,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,uDA0EtB,CAAC"}
|
|
@@ -1,30 +1,36 @@
|
|
|
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
|
+
| 'initialPath'
|
|
6
|
+
| 'children'
|
|
7
|
+
| 'stroke'
|
|
8
|
+
| 'strokeOpacity'
|
|
9
|
+
| 'strokeWidth'
|
|
10
|
+
| 'strokeCap'
|
|
11
|
+
| 'strokeJoin'
|
|
12
|
+
| 'clipRect'
|
|
13
|
+
| 'clipPath'
|
|
14
|
+
| 'clipOffset'
|
|
15
|
+
> &
|
|
4
16
|
AreaComponentProps & {
|
|
5
17
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
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
|
-
/**
|
|
16
|
-
* Opacity at peak values.
|
|
18
|
+
* Opacity at peak of gradient.
|
|
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
|
|
31
|
+
* A customizable gradient area component.
|
|
32
|
+
* When no gradient is provided, renders a default gradient based
|
|
33
|
+
* on the fill color and peak/baseline opacities.
|
|
28
34
|
*/
|
|
29
35
|
export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
|
|
30
36
|
//# sourceMappingURL=GradientArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAKA,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,aAAa,GACb,UAAU,GACV,QAAQ,GACR,eAAe,GACf,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,CACf,GACC,kBAAkB,GAAG;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,YAAY,yDA+CxB,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
|
+
| 'initialPath'
|
|
6
|
+
| 'children'
|
|
7
|
+
| 'stroke'
|
|
8
|
+
| 'strokeOpacity'
|
|
9
|
+
| 'strokeWidth'
|
|
10
|
+
| 'strokeCap'
|
|
11
|
+
| 'strokeJoin'
|
|
12
|
+
| 'clipRect'
|
|
13
|
+
| 'clipPath'
|
|
14
|
+
| 'clipOffset'
|
|
15
|
+
> &
|
|
16
|
+
AreaComponentProps;
|
|
4
17
|
/**
|
|
5
|
-
* A customizable solid area component
|
|
18
|
+
* A customizable solid area component.
|
|
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":"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,sDA4BrB,CAAC"}
|
package/dts/chart/axis/Axis.d.ts
CHANGED
|
@@ -1,54 +1,56 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type LineComponent } from '../line';
|
|
3
|
-
import type { ChartTextChildren } from '../text/ChartText';
|
|
3
|
+
import type { ChartTextChildren, ChartTextProps } from '../text/ChartText';
|
|
4
|
+
import { type AxisBandPlacement } from '../utils';
|
|
4
5
|
/**
|
|
5
|
-
* Animation
|
|
6
|
+
* Animation transition for axis elements (grid lines, tick marks, tick labels).
|
|
7
|
+
* Matches web's axisUpdateAnimationTransition timing.
|
|
6
8
|
*/
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
opacity: number;
|
|
10
|
-
};
|
|
11
|
-
animate: {
|
|
12
|
-
opacity: number;
|
|
13
|
-
transition: {
|
|
14
|
-
duration: number;
|
|
15
|
-
delay: number;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
exit: {
|
|
19
|
-
opacity: number;
|
|
20
|
-
transition: {
|
|
21
|
-
duration: number;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Animation variants for axis elements - updates (used for both grid lines and tick labels)
|
|
27
|
-
*/
|
|
28
|
-
export declare const axisUpdateAnimationVariants: {
|
|
29
|
-
initial: {
|
|
30
|
-
opacity: number;
|
|
31
|
-
};
|
|
32
|
-
animate: {
|
|
33
|
-
opacity: number;
|
|
34
|
-
transition: {
|
|
35
|
-
duration: number;
|
|
36
|
-
delay: number;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
exit: {
|
|
40
|
-
opacity: number;
|
|
41
|
-
transition: {
|
|
42
|
-
duration: number;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
9
|
+
export declare const axisUpdateAnimationTransition: {
|
|
10
|
+
duration: number;
|
|
45
11
|
};
|
|
12
|
+
export type AxisTickLabelComponentProps = Pick<
|
|
13
|
+
ChartTextProps,
|
|
14
|
+
| 'x'
|
|
15
|
+
| 'y'
|
|
16
|
+
| 'children'
|
|
17
|
+
| 'dx'
|
|
18
|
+
| 'dy'
|
|
19
|
+
| 'font'
|
|
20
|
+
| 'fontFamilies'
|
|
21
|
+
| 'fontSize'
|
|
22
|
+
| 'fontWeight'
|
|
23
|
+
| 'fontStyle'
|
|
24
|
+
| 'color'
|
|
25
|
+
| 'horizontalAlignment'
|
|
26
|
+
| 'verticalAlignment'
|
|
27
|
+
| 'opacity'
|
|
28
|
+
>;
|
|
29
|
+
export type AxisTickLabelComponent = React.FC<AxisTickLabelComponentProps>;
|
|
46
30
|
export type AxisBaseProps = {
|
|
47
31
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
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'
|
|
50
36
|
*/
|
|
51
|
-
|
|
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;
|
|
45
|
+
/**
|
|
46
|
+
* Label text to display for the axis.
|
|
47
|
+
*/
|
|
48
|
+
label?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Gap between the tick labels and the axis label.
|
|
51
|
+
* @default 4
|
|
52
|
+
*/
|
|
53
|
+
labelGap?: number;
|
|
52
54
|
/**
|
|
53
55
|
* Minimum gap between tick labels.
|
|
54
56
|
* Labels will be hidden if they are closer than this gap.
|
|
@@ -98,24 +100,6 @@ export type AxisBaseProps = {
|
|
|
98
100
|
* ticks: (index) => index % 12 === 0
|
|
99
101
|
*/
|
|
100
102
|
ticks?: number[] | ((value: number) => boolean);
|
|
101
|
-
/**
|
|
102
|
-
* Formatter function for axis tick values.
|
|
103
|
-
* Tick values will be wrapped in ChartText component.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* // Simple string formatting
|
|
107
|
-
* tickLabelFormatter: (value) => `$${prices[value]}`
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* // ReactNode with conditional styling
|
|
111
|
-
* tickLabelFormatter: (index) => {
|
|
112
|
-
* if (index % 12 === 0) {
|
|
113
|
-
* return <tspan style={{ fontWeight: 'bold' }}>${prices[index]}</tspan>;
|
|
114
|
-
* }
|
|
115
|
-
* return `$${prices[index]}`;
|
|
116
|
-
* }
|
|
117
|
-
*/
|
|
118
|
-
tickLabelFormatter?: (value: any) => ChartTextChildren;
|
|
119
103
|
/**
|
|
120
104
|
* Space between the axis tick mark and labels.
|
|
121
105
|
* If tick marks are not shown, this is the gap between the axis and the chart.
|
|
@@ -143,62 +127,46 @@ export type AxisBaseProps = {
|
|
|
143
127
|
};
|
|
144
128
|
export type AxisProps = AxisBaseProps & {
|
|
145
129
|
/**
|
|
146
|
-
*
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
*
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
* Custom style for the tick labels.
|
|
188
|
-
*/
|
|
189
|
-
tickLabel?: React.CSSProperties;
|
|
190
|
-
/**
|
|
191
|
-
* Custom style for the grid lines.
|
|
192
|
-
*/
|
|
193
|
-
gridLine?: React.CSSProperties;
|
|
194
|
-
/**
|
|
195
|
-
* Custom style for the axis line.
|
|
196
|
-
*/
|
|
197
|
-
line?: React.CSSProperties;
|
|
198
|
-
/**
|
|
199
|
-
* Custom style for the tick marks.
|
|
200
|
-
*/
|
|
201
|
-
tickMark?: React.CSSProperties;
|
|
202
|
-
};
|
|
130
|
+
* Component to render the grid lines.
|
|
131
|
+
* @default DottedLine
|
|
132
|
+
*/
|
|
133
|
+
GridLineComponent?: LineComponent;
|
|
134
|
+
/**
|
|
135
|
+
* Component to render the axis line.
|
|
136
|
+
* @default SolidLine
|
|
137
|
+
*/
|
|
138
|
+
LineComponent?: LineComponent;
|
|
139
|
+
/**
|
|
140
|
+
* Component to render the tick marks.
|
|
141
|
+
* @default SolidLine
|
|
142
|
+
*/
|
|
143
|
+
TickMarkLineComponent?: LineComponent;
|
|
144
|
+
/**
|
|
145
|
+
* Formatter function for axis tick values.
|
|
146
|
+
* Tick values will be wrapped in ChartText component.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* // XAxis
|
|
150
|
+
* tickLabelFormatter: (index) => {
|
|
151
|
+
* return `$${prices[index]}`;
|
|
152
|
+
* }
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* // YAxis
|
|
156
|
+
* tickLabelFormatter: (value) => `$${prices[value]}`
|
|
157
|
+
*/
|
|
158
|
+
tickLabelFormatter?: (value: number) => ChartTextChildren;
|
|
159
|
+
/**
|
|
160
|
+
* Component to render tick labels.
|
|
161
|
+
* Allows for custom styling and formatting that works cross-platform.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* // Custom tick label component with offset positioning
|
|
165
|
+
* TickLabelComponent={(props) => (
|
|
166
|
+
* <DefaultAxisTickLabel {...props} dx={4} dy={-12} />
|
|
167
|
+
* )}
|
|
168
|
+
* @default DefaultAxisTickLabel
|
|
169
|
+
*/
|
|
170
|
+
TickLabelComponent?: AxisTickLabelComponent;
|
|
203
171
|
};
|
|
204
172
|
//# sourceMappingURL=Axis.d.ts.map
|
|
@@ -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,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,eA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EF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC;IACtC;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,iBAAiB,CAAC;IAC1D;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;CAC7C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AxisTickLabelComponentProps } from './Axis';
|
|
2
|
+
export type DefaultAxisTickLabelProps = AxisTickLabelComponentProps;
|
|
3
|
+
/**
|
|
4
|
+
* DefaultAxisTickLabel is the default label component for axis tick labels.
|
|
5
|
+
* Provides standard styling for both X and Y axis tick labels.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DefaultAxisTickLabel: import('react').NamedExoticComponent<AxisTickLabelComponentProps>;
|
|
8
|
+
//# sourceMappingURL=DefaultAxisTickLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultAxisTickLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/DefaultAxisTickLabel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,MAAM,yBAAyB,GAAG,2BAA2B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,mEAE/B,CAAC"}
|
|
@@ -7,7 +7,7 @@ export type XAxisBaseProps = AxisBaseProps & {
|
|
|
7
7
|
position?: 'top' | 'bottom';
|
|
8
8
|
/**
|
|
9
9
|
* Height of the axis. This value is inclusive of the padding.
|
|
10
|
-
* @default 32
|
|
10
|
+
* @default 32 when no label is provided, 52 when a label is provided
|
|
11
11
|
*/
|
|
12
12
|
height?: number;
|
|
13
13
|
};
|
|
@@ -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;;;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,kDA8RjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AxisBaseProps, type AxisProps } from './Axis';
|
|
2
2
|
export type YAxisBaseProps = AxisBaseProps & {
|
|
3
3
|
/**
|
|
4
4
|
* The ID of the axis to render.
|
|
@@ -12,7 +12,7 @@ export type YAxisBaseProps = AxisBaseProps & {
|
|
|
12
12
|
position?: 'left' | 'right';
|
|
13
13
|
/**
|
|
14
14
|
* Width of the axis. This value is inclusive of the padding.
|
|
15
|
-
* @default 44
|
|
15
|
+
* @default 44 when no label is provided, 64 when a label is provided
|
|
16
16
|
*/
|
|
17
17
|
width?: number;
|
|
18
18
|
};
|
|
@@ -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;;;OAGG;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,kDAuRjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/axis/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,wBAAwB,CAAC;AACvC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/dts/chart/bar/Bar.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { type BarTransition, type Transition } from '../utils';
|
|
3
|
+
export type BarBaseProps = {
|
|
3
4
|
/**
|
|
4
5
|
* X coordinate of the bar (left edge).
|
|
5
6
|
*/
|
|
@@ -17,7 +18,8 @@ export type BarComponentProps = {
|
|
|
17
18
|
*/
|
|
18
19
|
height: number;
|
|
19
20
|
/**
|
|
20
|
-
* Border radius
|
|
21
|
+
* Border radius for the bar.
|
|
22
|
+
* @default 4
|
|
21
23
|
*/
|
|
22
24
|
borderRadius?: number;
|
|
23
25
|
/**
|
|
@@ -41,9 +43,9 @@ export type BarComponentProps = {
|
|
|
41
43
|
*/
|
|
42
44
|
dataY?: number | [number, number] | null;
|
|
43
45
|
/**
|
|
44
|
-
* The
|
|
46
|
+
* The ID of the series this bar belongs to.
|
|
45
47
|
*/
|
|
46
|
-
|
|
48
|
+
seriesId?: string;
|
|
47
49
|
/**
|
|
48
50
|
* Fill color for the bar.
|
|
49
51
|
*/
|
|
@@ -60,19 +62,54 @@ export type BarComponentProps = {
|
|
|
60
62
|
* Stroke width for the bar outline.
|
|
61
63
|
*/
|
|
62
64
|
strokeWidth?: number;
|
|
63
|
-
};
|
|
64
|
-
export type BarComponent = React.FC<BarComponentProps>;
|
|
65
|
-
export type BarProps = Omit<BarComponentProps, 'd'> & {
|
|
66
|
-
/**
|
|
67
|
-
* Border radius for the bar.
|
|
68
|
-
* @default 4
|
|
69
|
-
*/
|
|
70
|
-
borderRadius?: BarComponentProps['borderRadius'];
|
|
71
65
|
/**
|
|
72
66
|
* Component to render the bar.
|
|
73
67
|
*/
|
|
74
68
|
BarComponent?: BarComponent;
|
|
75
69
|
};
|
|
70
|
+
export type BarProps = BarBaseProps & {
|
|
71
|
+
/**
|
|
72
|
+
* Transition configuration for enter and update animations.
|
|
73
|
+
* @note Disable an animation by passing in null.
|
|
74
|
+
*
|
|
75
|
+
* @default transitions = {{
|
|
76
|
+
* enter: { type: 'spring', stiffness: 900, damping: 120, staggerDelay: 250 },
|
|
77
|
+
* update: { type: 'spring', stiffness: 900, damping: 120 }
|
|
78
|
+
* }}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* // Custom staggered enter and spring update
|
|
82
|
+
* transitions={{ enter: { type: 'timing', duration: 500, staggerDelay: 300 }, update: { type: 'spring', damping: 20 } }}
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* // Disable enter animation
|
|
86
|
+
* transitions={{ enter: null }}
|
|
87
|
+
*/
|
|
88
|
+
transitions?: {
|
|
89
|
+
/**
|
|
90
|
+
* Transition for the initial enter/reveal animation.
|
|
91
|
+
* Set to `null` to disable.
|
|
92
|
+
*/
|
|
93
|
+
enter?: BarTransition | null;
|
|
94
|
+
/**
|
|
95
|
+
* Transition for subsequent data update animations.
|
|
96
|
+
* Set to `null` to disable.
|
|
97
|
+
*/
|
|
98
|
+
update?: BarTransition | null;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Transition for updates.
|
|
102
|
+
* @deprecated Use `transitions.update` instead.
|
|
103
|
+
*/
|
|
104
|
+
transition?: Transition;
|
|
105
|
+
};
|
|
106
|
+
export type BarComponentProps = Omit<BarProps, 'BarComponent'> & {
|
|
107
|
+
/**
|
|
108
|
+
* The path data for the bar shape.
|
|
109
|
+
*/
|
|
110
|
+
d: string;
|
|
111
|
+
};
|
|
112
|
+
export type BarComponent = React.FC<BarComponentProps>;
|
|
76
113
|
/**
|
|
77
114
|
* Simple bar component that renders a single bar at the specified position.
|
|
78
115
|
*
|