react-native-wagmi-charts
Version:
A sweet candlestick chart for React Native
17 lines (14 loc) • 324 B
text/typescript
import { interpolate, Extrapolation } from 'react-native-reanimated';
import type { TDomain } from '../types';
export function getY({
value,
domain,
maxHeight,
}: {
value: number;
domain: TDomain;
maxHeight: number;
}) {
'worklet';
return interpolate(value, domain, [maxHeight, 0], Extrapolation.CLAMP);
}