@coinbase/cds-mobile-visualization 3.4.0-beta.1 → 3.4.0-beta.11
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 +60 -0
- package/dts/chart/CartesianChart.d.ts +57 -33
- 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/Path.d.ts +77 -34
- package/dts/chart/Path.d.ts.map +1 -1
- package/dts/chart/PeriodSelector.d.ts +2 -2
- package/dts/chart/PeriodSelector.d.ts.map +1 -1
- package/dts/chart/area/Area.d.ts +42 -27
- 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 +16 -13
- package/dts/chart/bar/Bar.d.ts.map +1 -1
- package/dts/chart/bar/BarChart.d.ts +36 -20
- 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 +39 -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 +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 +3 -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 +13 -5
- package/dts/chart/line/DottedLine.d.ts.map +1 -1
- package/dts/chart/line/Line.d.ts +64 -25
- 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 +120 -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 +8 -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 +172 -43
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -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/chart.d.ts +34 -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 +53 -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 +39 -0
- package/dts/chart/utils/scrubber.d.ts.map +1 -0
- package/dts/chart/utils/transition.d.ts +140 -0
- package/dts/chart/utils/transition.d.ts.map +1 -0
- package/esm/chart/CartesianChart.js +164 -70
- package/esm/chart/ChartContextBridge.js +148 -0
- package/esm/chart/Path.js +198 -113
- package/esm/chart/PeriodSelector.js +2 -2
- package/esm/chart/__stories__/CartesianChart.stories.js +378 -131
- package/esm/chart/__stories__/Chart.stories.js +2 -4
- package/esm/chart/__stories__/PeriodSelector.stories.js +103 -75
- package/esm/chart/area/Area.js +25 -35
- package/esm/chart/area/AreaChart.js +17 -12
- package/esm/chart/area/DottedArea.js +61 -109
- package/esm/chart/area/GradientArea.js +35 -91
- package/esm/chart/area/SolidArea.js +22 -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 +3 -1
- package/esm/chart/bar/BarChart.js +15 -37
- package/esm/chart/bar/BarPlot.js +41 -35
- package/esm/chart/bar/BarStack.js +75 -38
- package/esm/chart/bar/BarStackGroup.js +6 -16
- package/esm/chart/bar/DefaultBar.js +26 -48
- package/esm/chart/bar/DefaultBarStack.js +23 -58
- package/esm/chart/bar/__stories__/BarChart.stories.js +502 -77
- package/esm/chart/gradient/Gradient.js +53 -0
- package/esm/chart/gradient/index.js +1 -0
- package/esm/chart/index.js +3 -1
- package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
- package/esm/chart/line/DottedLine.js +29 -14
- package/esm/chart/line/Line.js +106 -67
- package/esm/chart/line/LineChart.js +20 -14
- package/esm/chart/line/ReferenceLine.js +80 -63
- package/esm/chart/line/SolidLine.js +25 -10
- package/esm/chart/line/__stories__/LineChart.stories.js +2101 -1977
- package/esm/chart/line/__stories__/ReferenceLine.stories.js +83 -28
- package/esm/chart/line/index.js +1 -1
- package/esm/chart/point/DefaultPointLabel.js +39 -0
- package/esm/chart/point/Point.js +188 -0
- package/esm/chart/point/index.js +2 -0
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
- package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
- package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
- package/esm/chart/scrubber/Scrubber.js +126 -146
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
- package/esm/chart/scrubber/ScrubberProvider.js +46 -54
- 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 +45 -29
- package/esm/chart/utils/chart.js +44 -3
- package/esm/chart/utils/gradient.js +305 -0
- package/esm/chart/utils/index.js +3 -0
- package/esm/chart/utils/path.js +76 -8
- package/esm/chart/utils/point.js +171 -17
- package/esm/chart/utils/scale.js +242 -2
- package/esm/chart/utils/scrubber.js +139 -0
- package/esm/chart/utils/transition.js +185 -0
- package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
- package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
- package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +51 -26
- package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
- package/package.json +15 -9
- 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/line/GradientLine.js +0 -62
- package/esm/chart/scrubber/ScrubberBeacon.js +0 -199
|
@@ -1,34 +1,19 @@
|
|
|
1
|
-
const _excluded = ["label"]
|
|
1
|
+
const _excluded = ["label"],
|
|
2
|
+
_excluded2 = ["label", "font", "hideDot", "style"];
|
|
2
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
3
4
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
5
|
import { forwardRef, memo, useMemo, useState } from 'react';
|
|
5
|
-
import { View } from 'react-native';
|
|
6
|
+
import { ScrollView, View } from 'react-native';
|
|
6
7
|
import { assets } from '@coinbase/cds-common/internal/data/assets';
|
|
7
8
|
import { useTabsContext } from '@coinbase/cds-common/tabs/TabsContext';
|
|
8
9
|
import { IconButton } from '@coinbase/cds-mobile/buttons';
|
|
10
|
+
import { Example, ExampleScreen } from '@coinbase/cds-mobile/examples/ExampleScreen';
|
|
9
11
|
import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
|
|
10
|
-
import {
|
|
12
|
+
import { HStack } from '@coinbase/cds-mobile/layout';
|
|
11
13
|
import { SegmentedTab } from '@coinbase/cds-mobile/tabs/SegmentedTab';
|
|
12
|
-
import {
|
|
14
|
+
import { Text } from '@coinbase/cds-mobile/typography';
|
|
13
15
|
import { LiveTabLabel, PeriodSelector, PeriodSelectorActiveIndicator } from '../PeriodSelector';
|
|
14
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
export default {
|
|
16
|
-
component: PeriodSelector,
|
|
17
|
-
title: 'Components/Chart/PeriodSelector'
|
|
18
|
-
};
|
|
19
|
-
const Example = _ref => {
|
|
20
|
-
let {
|
|
21
|
-
children,
|
|
22
|
-
title,
|
|
23
|
-
description
|
|
24
|
-
} = _ref;
|
|
25
|
-
return /*#__PURE__*/_jsxs(VStack, {
|
|
26
|
-
gap: 2,
|
|
27
|
-
children: [/*#__PURE__*/_jsx(TextHeadline, {
|
|
28
|
-
children: title
|
|
29
|
-
}), description, children]
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
17
|
const PeriodSelectorExample = () => {
|
|
33
18
|
const tabs = [{
|
|
34
19
|
id: '1H',
|
|
@@ -79,7 +64,7 @@ const MinWidthPeriodSelectorExample = () => {
|
|
|
79
64
|
const [activeTab, setActiveTab] = useState(tabs[0]);
|
|
80
65
|
return /*#__PURE__*/_jsx(PeriodSelector, {
|
|
81
66
|
activeTab: activeTab,
|
|
82
|
-
gap:
|
|
67
|
+
gap: 0.5,
|
|
83
68
|
onChange: tab => setActiveTab(tab),
|
|
84
69
|
tabs: tabs,
|
|
85
70
|
width: "fit-content"
|
|
@@ -116,7 +101,6 @@ const LivePeriodSelectorExample = () => {
|
|
|
116
101
|
});
|
|
117
102
|
};
|
|
118
103
|
const TooManyPeriodsSelectorExample = () => {
|
|
119
|
-
const theme = useTheme();
|
|
120
104
|
const tabs = useMemo(() => [{
|
|
121
105
|
id: '1H',
|
|
122
106
|
label: /*#__PURE__*/_jsx(LiveTabLabel, {})
|
|
@@ -145,55 +129,48 @@ const TooManyPeriodsSelectorExample = () => {
|
|
|
145
129
|
const [activeTab, setActiveTab] = useState(tabs[0]);
|
|
146
130
|
const isLive = useMemo(() => (activeTab == null ? void 0 : activeTab.id) === '1H', [activeTab]);
|
|
147
131
|
const activeBackground = useMemo(() => !isLive ? 'bgPrimaryWash' : 'bgNegativeWash', [isLive]);
|
|
148
|
-
const gradientOverlayStyles = useMemo(() => [{
|
|
149
|
-
position: 'absolute',
|
|
150
|
-
right: 0,
|
|
151
|
-
bottom: 0,
|
|
152
|
-
top: 0,
|
|
153
|
-
width: theme.space[4],
|
|
154
|
-
backgroundColor: theme.color.bgPrimary,
|
|
155
|
-
opacity: 0.8
|
|
156
|
-
}], [theme.space, theme.color.bgPrimary]);
|
|
157
132
|
return /*#__PURE__*/_jsxs(HStack, {
|
|
158
133
|
alignItems: "center",
|
|
159
134
|
justifyContent: "space-between",
|
|
160
135
|
maxWidth: "100%",
|
|
161
|
-
overflow: "hidden",
|
|
162
136
|
width: "100%",
|
|
163
|
-
children: [/*#__PURE__*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
180
|
-
pointerEvents: "none",
|
|
181
|
-
style: gradientOverlayStyles
|
|
182
|
-
})]
|
|
137
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
138
|
+
horizontal: true,
|
|
139
|
+
contentContainerStyle: {
|
|
140
|
+
paddingEnd: 8,
|
|
141
|
+
flexGrow: 1
|
|
142
|
+
},
|
|
143
|
+
showsHorizontalScrollIndicator: false,
|
|
144
|
+
children: /*#__PURE__*/_jsx(PeriodSelector, {
|
|
145
|
+
activeBackground: activeBackground,
|
|
146
|
+
activeTab: activeTab,
|
|
147
|
+
gap: 1,
|
|
148
|
+
justifyContent: "flex-start",
|
|
149
|
+
onChange: setActiveTab,
|
|
150
|
+
tabs: tabs,
|
|
151
|
+
width: "fit-content"
|
|
152
|
+
})
|
|
183
153
|
}), /*#__PURE__*/_jsx(IconButton, {
|
|
184
154
|
compact: true,
|
|
185
155
|
accessibilityLabel: "Configure chart",
|
|
186
156
|
flexShrink: 0,
|
|
187
|
-
height: 36,
|
|
188
157
|
name: "filter",
|
|
189
158
|
variant: "secondary"
|
|
190
159
|
})]
|
|
191
160
|
});
|
|
192
161
|
};
|
|
193
162
|
const btcColor = assets.btc.color;
|
|
194
|
-
const BTCActiveIndicator = /*#__PURE__*/memo(props =>
|
|
195
|
-
|
|
196
|
-
|
|
163
|
+
const BTCActiveIndicator = /*#__PURE__*/memo(props => {
|
|
164
|
+
const theme = useTheme();
|
|
165
|
+
const {
|
|
166
|
+
activeTab
|
|
167
|
+
} = useTabsContext();
|
|
168
|
+
const isLive = useMemo(() => (activeTab == null ? void 0 : activeTab.id) === '1H', [activeTab]);
|
|
169
|
+
const backgroundColor = useMemo(() => isLive ? theme.color.bgNegativeWash : btcColor + "1A", [isLive, theme.color.bgNegativeWash]);
|
|
170
|
+
return /*#__PURE__*/_jsx(PeriodSelectorActiveIndicator, _extends({}, props, {
|
|
171
|
+
background: backgroundColor
|
|
172
|
+
}));
|
|
173
|
+
});
|
|
197
174
|
const BTCActiveExcludingLiveIndicator = /*#__PURE__*/memo(props => {
|
|
198
175
|
const theme = useTheme();
|
|
199
176
|
const {
|
|
@@ -205,30 +182,67 @@ const BTCActiveExcludingLiveIndicator = /*#__PURE__*/memo(props => {
|
|
|
205
182
|
background: backgroundColor
|
|
206
183
|
}));
|
|
207
184
|
});
|
|
208
|
-
const BTCTab = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
185
|
+
const BTCTab = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
209
186
|
let {
|
|
210
187
|
label
|
|
211
|
-
} =
|
|
212
|
-
props = _objectWithoutPropertiesLoose(
|
|
188
|
+
} = _ref,
|
|
189
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
213
190
|
const {
|
|
214
191
|
activeTab
|
|
215
192
|
} = useTabsContext();
|
|
216
193
|
const isActive = (activeTab == null ? void 0 : activeTab.id) === props.id;
|
|
217
|
-
const
|
|
194
|
+
const theme = useTheme();
|
|
195
|
+
|
|
196
|
+
// If label is already a React element (like LiveTabLabel), pass it through directly
|
|
197
|
+
// For string labels, wrap with custom BTC color when active
|
|
198
|
+
const wrappedLabel = typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
199
|
+
dangerouslySetColor: isActive ? btcColor : theme.color.fg,
|
|
200
|
+
font: "label1",
|
|
201
|
+
children: label
|
|
202
|
+
}) : label;
|
|
218
203
|
return /*#__PURE__*/_jsx(SegmentedTab, _extends({
|
|
219
204
|
ref: ref,
|
|
220
|
-
label:
|
|
221
|
-
dangerouslySetColor: textColor,
|
|
222
|
-
children: label
|
|
223
|
-
})
|
|
205
|
+
label: wrappedLabel
|
|
224
206
|
}, props));
|
|
225
207
|
}));
|
|
208
|
+
const BTCLiveLabel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
209
|
+
let {
|
|
210
|
+
label = 'LIVE',
|
|
211
|
+
font = 'label1',
|
|
212
|
+
hideDot,
|
|
213
|
+
style
|
|
214
|
+
} = _ref2,
|
|
215
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
216
|
+
const theme = useTheme();
|
|
217
|
+
const dotStyle = useMemo(() => ({
|
|
218
|
+
width: theme.space[1],
|
|
219
|
+
height: theme.space[1],
|
|
220
|
+
borderRadius: 1000,
|
|
221
|
+
marginRight: theme.space[0.75],
|
|
222
|
+
backgroundColor: btcColor
|
|
223
|
+
}), [theme.space]);
|
|
224
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
225
|
+
ref: ref,
|
|
226
|
+
style: [{
|
|
227
|
+
flexDirection: 'row',
|
|
228
|
+
alignItems: 'center'
|
|
229
|
+
}, style],
|
|
230
|
+
children: [!hideDot && /*#__PURE__*/_jsx(View, {
|
|
231
|
+
style: dotStyle
|
|
232
|
+
}), /*#__PURE__*/_jsx(Text, _extends({
|
|
233
|
+
font: font,
|
|
234
|
+
style: {
|
|
235
|
+
color: btcColor
|
|
236
|
+
}
|
|
237
|
+
}, props, {
|
|
238
|
+
children: label
|
|
239
|
+
}))]
|
|
240
|
+
});
|
|
241
|
+
}));
|
|
226
242
|
const ColoredPeriodSelectorExample = () => {
|
|
227
243
|
const tabs = [{
|
|
228
244
|
id: '1H',
|
|
229
|
-
label: /*#__PURE__*/_jsx(
|
|
230
|
-
dangerouslySetColor: btcColor
|
|
231
|
-
})
|
|
245
|
+
label: /*#__PURE__*/_jsx(BTCLiveLabel, {})
|
|
232
246
|
}, {
|
|
233
247
|
id: '1D',
|
|
234
248
|
label: '1D'
|
|
@@ -283,12 +297,26 @@ const ColoredExcludingLivePeriodSelectorExample = () => {
|
|
|
283
297
|
tabs: tabs
|
|
284
298
|
});
|
|
285
299
|
};
|
|
286
|
-
export
|
|
287
|
-
return /*#__PURE__*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
title: "Basic Example",
|
|
300
|
+
export default function All() {
|
|
301
|
+
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
302
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
303
|
+
title: "Basic",
|
|
291
304
|
children: /*#__PURE__*/_jsx(PeriodSelectorExample, {})
|
|
292
|
-
})
|
|
305
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
306
|
+
title: "Min Width",
|
|
307
|
+
children: /*#__PURE__*/_jsx(MinWidthPeriodSelectorExample, {})
|
|
308
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
309
|
+
title: "Live Period",
|
|
310
|
+
children: /*#__PURE__*/_jsx(LivePeriodSelectorExample, {})
|
|
311
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
312
|
+
title: "Too Many Periods",
|
|
313
|
+
children: /*#__PURE__*/_jsx(TooManyPeriodsSelectorExample, {})
|
|
314
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
315
|
+
title: "Colored (BTC)",
|
|
316
|
+
children: /*#__PURE__*/_jsx(ColoredPeriodSelectorExample, {})
|
|
317
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
318
|
+
title: "Colored Excluding Live",
|
|
319
|
+
children: /*#__PURE__*/_jsx(ColoredExcludingLivePeriodSelectorExample, {})
|
|
320
|
+
})]
|
|
293
321
|
});
|
|
294
|
-
}
|
|
322
|
+
}
|
package/esm/chart/area/Area.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { memo, useMemo } from 'react';
|
|
2
|
-
import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
|
|
3
2
|
import { useCartesianChartContext } from '../ChartProvider';
|
|
4
3
|
import { getAreaPath } from '../utils';
|
|
5
4
|
import { DottedArea } from './DottedArea';
|
|
@@ -7,37 +6,30 @@ import { GradientArea } from './GradientArea';
|
|
|
7
6
|
import { SolidArea } from './SolidArea';
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
export const Area = /*#__PURE__*/memo(_ref => {
|
|
10
|
-
var _ref2;
|
|
11
9
|
let {
|
|
12
10
|
seriesId,
|
|
13
|
-
curve = '
|
|
11
|
+
curve = 'bump',
|
|
14
12
|
type = 'solid',
|
|
15
|
-
AreaComponent:
|
|
16
|
-
fill:
|
|
13
|
+
AreaComponent: AreaComponentProp,
|
|
14
|
+
fill: fillProp,
|
|
17
15
|
fillOpacity = 1,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
baseline,
|
|
17
|
+
connectNulls,
|
|
18
|
+
gradient: gradientProp,
|
|
19
|
+
transition,
|
|
20
|
+
animate
|
|
21
21
|
} = _ref;
|
|
22
|
-
const theme = useTheme();
|
|
23
22
|
const {
|
|
24
23
|
getSeries,
|
|
25
24
|
getSeriesData,
|
|
26
25
|
getXScale,
|
|
27
26
|
getYScale,
|
|
28
|
-
getXAxis
|
|
29
|
-
drawingArea
|
|
27
|
+
getXAxis
|
|
30
28
|
} = useCartesianChartContext();
|
|
31
|
-
|
|
32
|
-
// Get sourceData from series (using stacked data if available)
|
|
33
29
|
const matchedSeries = useMemo(() => getSeries(seriesId), [seriesId, getSeries]);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const sourceData = useMemo(() =>
|
|
37
|
-
return getSeriesData(seriesId) || null;
|
|
38
|
-
}, [seriesId, getSeriesData]);
|
|
39
|
-
|
|
40
|
-
// Get scales and axes for this series
|
|
30
|
+
const gradient = useMemo(() => gradientProp != null ? gradientProp : matchedSeries == null ? void 0 : matchedSeries.gradient, [gradientProp, matchedSeries == null ? void 0 : matchedSeries.gradient]);
|
|
31
|
+
const fill = useMemo(() => fillProp != null ? fillProp : matchedSeries == null ? void 0 : matchedSeries.color, [fillProp, matchedSeries == null ? void 0 : matchedSeries.color]);
|
|
32
|
+
const sourceData = useMemo(() => getSeriesData(seriesId), [seriesId, getSeriesData]);
|
|
41
33
|
const xAxis = getXAxis();
|
|
42
34
|
const xScale = getXScale();
|
|
43
35
|
const yScale = getYScale(matchedSeries == null ? void 0 : matchedSeries.yAxisId);
|
|
@@ -51,35 +43,33 @@ export const Area = /*#__PURE__*/memo(_ref => {
|
|
|
51
43
|
xScale,
|
|
52
44
|
yScale,
|
|
53
45
|
curve,
|
|
54
|
-
xData
|
|
46
|
+
xData,
|
|
47
|
+
connectNulls
|
|
55
48
|
});
|
|
56
|
-
}, [sourceData, xScale, yScale, curve, xAxis == null ? void 0 : xAxis.data]);
|
|
49
|
+
}, [sourceData, xScale, yScale, curve, xAxis == null ? void 0 : xAxis.data, connectNulls]);
|
|
57
50
|
const AreaComponent = useMemo(() => {
|
|
58
|
-
if (
|
|
59
|
-
return
|
|
51
|
+
if (AreaComponentProp) {
|
|
52
|
+
return AreaComponentProp;
|
|
60
53
|
}
|
|
61
54
|
switch (type) {
|
|
62
|
-
case 'solid':
|
|
63
|
-
return SolidArea;
|
|
64
55
|
case 'dotted':
|
|
65
56
|
return DottedArea;
|
|
66
57
|
case 'gradient':
|
|
67
|
-
default:
|
|
68
58
|
return GradientArea;
|
|
59
|
+
case 'solid':
|
|
60
|
+
default:
|
|
61
|
+
return SolidArea;
|
|
69
62
|
}
|
|
70
|
-
}, [
|
|
71
|
-
if (!xScale || !yScale || !sourceData || !area)
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
const fill = (_ref2 = specifiedFill != null ? specifiedFill : matchedSeries == null ? void 0 : matchedSeries.color) != null ? _ref2 : theme.color.fgPrimary;
|
|
63
|
+
}, [AreaComponentProp, type]);
|
|
64
|
+
if (!xScale || !yScale || !sourceData || !area) return;
|
|
75
65
|
return /*#__PURE__*/_jsx(AreaComponent, {
|
|
66
|
+
animate: animate,
|
|
76
67
|
baseline: baseline,
|
|
77
|
-
clipRect: drawingArea,
|
|
78
68
|
d: area,
|
|
79
69
|
fill: fill,
|
|
80
70
|
fillOpacity: fillOpacity,
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
gradient: gradient,
|
|
72
|
+
transition: transition,
|
|
83
73
|
yAxisId: matchedSeries == null ? void 0 : matchedSeries.yAxisId
|
|
84
74
|
});
|
|
85
75
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const _excluded = ["series", "stacked", "AreaComponent", "curve", "fillOpacity", "type", "LineComponent", "strokeWidth", "showXAxis", "showYAxis", "showLines", "lineType", "xAxis", "yAxis", "inset", "children"],
|
|
1
|
+
const _excluded = ["series", "stacked", "AreaComponent", "curve", "fillOpacity", "type", "connectNulls", "transition", "LineComponent", "strokeWidth", "showXAxis", "showYAxis", "showLines", "lineType", "xAxis", "yAxis", "inset", "children"],
|
|
2
2
|
_excluded2 = ["scaleType", "data", "categoryPadding", "domain", "domainLimit", "range"],
|
|
3
3
|
_excluded3 = ["scaleType", "data", "categoryPadding", "domain", "domainLimit", "range", "id"],
|
|
4
4
|
_excluded4 = ["id", "data", "label", "color", "yAxisId", "opacity", "LineComponent", "stackId"],
|
|
5
|
-
_excluded5 = ["id", "data", "label", "color", "yAxisId", "fill", "fillOpacity", "stackId"];
|
|
5
|
+
_excluded5 = ["id", "data", "label", "color", "yAxisId", "fill", "fillOpacity", "stackId", "type", "lineType"];
|
|
6
6
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
7
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
8
8
|
import { forwardRef, memo, useMemo } from 'react';
|
|
@@ -20,6 +20,8 @@ export const AreaChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
20
20
|
curve,
|
|
21
21
|
fillOpacity,
|
|
22
22
|
type,
|
|
23
|
+
connectNulls,
|
|
24
|
+
transition,
|
|
23
25
|
LineComponent,
|
|
24
26
|
strokeWidth,
|
|
25
27
|
showXAxis,
|
|
@@ -28,11 +30,11 @@ export const AreaChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
28
30
|
lineType = 'solid',
|
|
29
31
|
xAxis,
|
|
30
32
|
yAxis,
|
|
31
|
-
inset
|
|
33
|
+
inset,
|
|
32
34
|
children
|
|
33
35
|
} = _ref,
|
|
34
36
|
chartProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
35
|
-
const calculatedInset = useMemo(() => getChartInset(
|
|
37
|
+
const calculatedInset = useMemo(() => getChartInset(inset, defaultChartInset), [inset]);
|
|
36
38
|
|
|
37
39
|
// Convert AreaSeries to Series for Chart context
|
|
38
40
|
const chartSeries = useMemo(() => {
|
|
@@ -41,6 +43,7 @@ export const AreaChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
41
43
|
data: s.data,
|
|
42
44
|
label: s.label,
|
|
43
45
|
color: s.color,
|
|
46
|
+
gradient: s.gradient,
|
|
44
47
|
yAxisId: s.yAxisId,
|
|
45
48
|
stackId: s.stackId
|
|
46
49
|
}));
|
|
@@ -120,27 +123,29 @@ export const AreaChart = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
120
123
|
areaPropsFromSeries = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
121
124
|
return /*#__PURE__*/_jsx(Area, _extends({
|
|
122
125
|
AreaComponent: AreaComponent,
|
|
126
|
+
connectNulls: connectNulls,
|
|
123
127
|
curve: curve,
|
|
124
128
|
fillOpacity: fillOpacity,
|
|
125
129
|
seriesId: id,
|
|
130
|
+
transition: transition,
|
|
126
131
|
type: type
|
|
127
132
|
}, areaPropsFromSeries), id);
|
|
128
133
|
}), showLines && (series == null ? void 0 : series.map(_ref5 => {
|
|
129
134
|
let {
|
|
130
135
|
id,
|
|
131
|
-
|
|
136
|
+
// Area type (don't pass to Line)
|
|
137
|
+
lineType: seriesLineType
|
|
132
138
|
} = _ref5,
|
|
133
|
-
|
|
139
|
+
otherPropsFromSeries = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
134
140
|
return /*#__PURE__*/_jsx(Line, _extends({
|
|
135
141
|
LineComponent: LineComponent,
|
|
142
|
+
connectNulls: connectNulls,
|
|
136
143
|
curve: curve,
|
|
137
|
-
seriesId: id
|
|
138
|
-
,
|
|
139
|
-
stroke: color // Default to series color
|
|
140
|
-
,
|
|
144
|
+
seriesId: id,
|
|
141
145
|
strokeWidth: strokeWidth,
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
transition: transition,
|
|
147
|
+
type: seriesLineType != null ? seriesLineType : lineType
|
|
148
|
+
}, otherPropsFromSeries), id);
|
|
144
149
|
})), children]
|
|
145
150
|
}));
|
|
146
151
|
}));
|
|
@@ -1,128 +1,80 @@
|
|
|
1
|
-
const _excluded = ["d", "fill", "
|
|
1
|
+
const _excluded = ["d", "fill", "patternSize", "dotSize", "peakOpacity", "baselineOpacity", "baseline", "yAxisId", "gradient", "animate", "transition"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
-
import { memo,
|
|
5
|
-
import { Circle, Defs, G, LinearGradient, Mask, Pattern, Stop } from 'react-native-svg';
|
|
4
|
+
import { memo, useMemo } from 'react';
|
|
6
5
|
import { useTheme } from '@coinbase/cds-mobile/hooks/useTheme';
|
|
6
|
+
import { Group, Skia } from '@shopify/react-native-skia';
|
|
7
7
|
import { useCartesianChartContext } from '../ChartProvider';
|
|
8
|
+
import { Gradient } from '../gradient';
|
|
8
9
|
import { Path } from '../Path';
|
|
9
|
-
import {
|
|
10
|
+
import { createGradient, getBaseline } from '../utils';
|
|
11
|
+
import { getDottedAreaPath } from '../utils/path';
|
|
12
|
+
import { usePathTransition } from '../utils/transition';
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
/**
|
|
15
|
+
* A customizable dotted area gradient component.
|
|
16
|
+
* When no gradient is provided, renders a default gradient based
|
|
17
|
+
* on the fill color and peak/baseline opacities.
|
|
18
|
+
*/
|
|
10
19
|
export const DottedArea = /*#__PURE__*/memo(_ref => {
|
|
11
20
|
let {
|
|
12
21
|
d,
|
|
13
|
-
fill,
|
|
14
|
-
fillOpacity = 1,
|
|
22
|
+
fill: fillProp,
|
|
15
23
|
patternSize = 4,
|
|
16
24
|
dotSize = 1,
|
|
17
25
|
peakOpacity = 1,
|
|
18
26
|
baselineOpacity = 0,
|
|
19
27
|
baseline,
|
|
20
28
|
yAxisId,
|
|
21
|
-
|
|
29
|
+
gradient: gradientProp,
|
|
30
|
+
animate: animateProp,
|
|
31
|
+
transition
|
|
22
32
|
} = _ref,
|
|
23
33
|
pathProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24
34
|
const theme = useTheme();
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return /*#__PURE__*/_jsxs(G, {
|
|
70
|
-
children: [/*#__PURE__*/_jsxs(Defs, {
|
|
71
|
-
children: [/*#__PURE__*/_jsx(Pattern, {
|
|
72
|
-
height: patternSize,
|
|
73
|
-
id: patternId,
|
|
74
|
-
patternUnits: "userSpaceOnUse",
|
|
75
|
-
width: patternSize,
|
|
76
|
-
x: "0",
|
|
77
|
-
y: "0",
|
|
78
|
-
children: /*#__PURE__*/_jsx(Circle, {
|
|
79
|
-
cx: dotCenterPosition,
|
|
80
|
-
cy: dotCenterPosition,
|
|
81
|
-
fill: effectiveFill,
|
|
82
|
-
r: dotSize
|
|
83
|
-
})
|
|
84
|
-
}), /*#__PURE__*/_jsx(LinearGradient, {
|
|
85
|
-
gradientUnits: useUserSpaceUnits ? 'userSpaceOnUse' : 'objectBoundingBox',
|
|
86
|
-
id: gradientId,
|
|
87
|
-
x1: useUserSpaceUnits ? '0' : '0%',
|
|
88
|
-
x2: useUserSpaceUnits ? '0' : '0%',
|
|
89
|
-
y1: gradientY1,
|
|
90
|
-
y2: gradientY2,
|
|
91
|
-
children: baselinePosition !== undefined || baselinePercentage !== undefined ? /* Diverging gradient: high opacity at extremes, low at baseline */
|
|
92
|
-
[/*#__PURE__*/_jsx(Stop, {
|
|
93
|
-
offset: "0%",
|
|
94
|
-
stopColor: "white",
|
|
95
|
-
stopOpacity: peakOpacity
|
|
96
|
-
}, "0"), /*#__PURE__*/_jsx(Stop, {
|
|
97
|
-
offset: baselinePercentage != null ? baselinePercentage : (baselinePosition - yRange[1]) / (yRange[0] - yRange[1]) * 100 + "%",
|
|
98
|
-
stopColor: "white",
|
|
99
|
-
stopOpacity: baselineOpacity
|
|
100
|
-
}, "1"), /*#__PURE__*/_jsx(Stop, {
|
|
101
|
-
offset: "100%",
|
|
102
|
-
stopColor: "white",
|
|
103
|
-
stopOpacity: peakOpacity
|
|
104
|
-
}, "2")] : /* Simple gradient from top to bottom */
|
|
105
|
-
[/*#__PURE__*/_jsx(Stop, {
|
|
106
|
-
offset: "0%",
|
|
107
|
-
stopColor: "white",
|
|
108
|
-
stopOpacity: peakOpacity
|
|
109
|
-
}, "0"), /*#__PURE__*/_jsx(Stop, {
|
|
110
|
-
offset: "100%",
|
|
111
|
-
stopColor: "white",
|
|
112
|
-
stopOpacity: baselineOpacity
|
|
113
|
-
}, "1")]
|
|
114
|
-
}), /*#__PURE__*/_jsx(Mask, {
|
|
115
|
-
id: maskId,
|
|
116
|
-
children: /*#__PURE__*/_jsx(Path, {
|
|
117
|
-
d: d,
|
|
118
|
-
fill: "url(#" + gradientId + ")"
|
|
119
|
-
})
|
|
120
|
-
})]
|
|
121
|
-
}), /*#__PURE__*/_jsx(Path, _extends({
|
|
122
|
-
clipRect: clipRect,
|
|
123
|
-
d: d,
|
|
124
|
-
fill: "url(#" + patternId + ")",
|
|
125
|
-
mask: "url(#" + maskId + ")"
|
|
126
|
-
}, pathProps))]
|
|
35
|
+
const {
|
|
36
|
+
drawingArea,
|
|
37
|
+
animate,
|
|
38
|
+
getYAxis
|
|
39
|
+
} = useCartesianChartContext();
|
|
40
|
+
const yAxisConfig = getYAxis(yAxisId);
|
|
41
|
+
const fill = useMemo(() => fillProp != null ? fillProp : theme.color.fgPrimary, [fillProp, theme.color.fgPrimary]);
|
|
42
|
+
const dottedPath = useMemo(() => {
|
|
43
|
+
if (!drawingArea) return '';
|
|
44
|
+
return getDottedAreaPath({
|
|
45
|
+
x: drawingArea.x,
|
|
46
|
+
y: drawingArea.y,
|
|
47
|
+
width: drawingArea.width,
|
|
48
|
+
height: drawingArea.height
|
|
49
|
+
}, patternSize, dotSize);
|
|
50
|
+
}, [drawingArea, patternSize, dotSize]);
|
|
51
|
+
const animatedClipPath = usePathTransition({
|
|
52
|
+
currentPath: d,
|
|
53
|
+
transition
|
|
54
|
+
});
|
|
55
|
+
const staticClipPath = useMemo(() => {
|
|
56
|
+
var _Skia$Path$MakeFromSV;
|
|
57
|
+
if (!d) return;
|
|
58
|
+
return (_Skia$Path$MakeFromSV = Skia.Path.MakeFromSVGString(d)) != null ? _Skia$Path$MakeFromSV : undefined;
|
|
59
|
+
}, [d]);
|
|
60
|
+
const gradient = useMemo(() => {
|
|
61
|
+
if (gradientProp) return gradientProp;
|
|
62
|
+
if (!yAxisConfig) return;
|
|
63
|
+
const baselineValue = getBaseline(yAxisConfig.domain, baseline);
|
|
64
|
+
return createGradient(yAxisConfig.domain, baselineValue, fill, peakOpacity, baselineOpacity);
|
|
65
|
+
}, [gradientProp, yAxisConfig, fill, baseline, peakOpacity, baselineOpacity]);
|
|
66
|
+
return /*#__PURE__*/_jsx(Group, {
|
|
67
|
+
clip: animate ? animatedClipPath : staticClipPath,
|
|
68
|
+
children: /*#__PURE__*/_jsx(Path, _extends({
|
|
69
|
+
animate: animateProp != null ? animateProp : animate,
|
|
70
|
+
d: dottedPath,
|
|
71
|
+
fill: fill,
|
|
72
|
+
transition: transition
|
|
73
|
+
}, pathProps, {
|
|
74
|
+
children: gradient && /*#__PURE__*/_jsx(Gradient, {
|
|
75
|
+
gradient: gradient,
|
|
76
|
+
yAxisId: yAxisId
|
|
77
|
+
})
|
|
78
|
+
}))
|
|
127
79
|
});
|
|
128
80
|
});
|