UNPKG
react-native-wagmi-charts
Version:
latest (2.7.3)
2.7.3
2.7.2
2.7.1
2.7.0
2.6.0
2.5.3
2.5.2
2.5.1
2.4.1
2.4.0
2.3.2
2.3.0
2.2.0
2.1.0
2.0.1
2.0.0
1.8.0
1.7.0
1.6.0
1.5.1
1.5.0
1.4.1
1.4.0
1.3.1
1.3.0
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
1.0.0-alpha.2
1.0.0-alpha.1
1.0.0-alpha.0
A sweet candlestick chart for React Native
react-native-wagmi-charts
/
lib
/
module
/
charts
/
candle
/
utils
/
getDomain.js
12 lines
(11 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
export
function
getDomain
(
rows
) {
'worklet'
;
const
values = rows.
map
(
(
{ high, low }
) =>
[high, low]).
flat
();
const
min =
Math
.
min
(...values);
const
max =
Math
.
max
(...values);
return
[min - (max - min) *
0.025
, max + (max - min) *
0.025
]; }
//# sourceMappingURL=getDomain.js.map