react-native-stonk-charts
Version:
A beautiful, performant chart library for React Native. Fork of react-native-wagmi-charts with Reanimated v4 support.
17 lines (14 loc) • 320 B
text/typescript
import { interpolate, Extrapolate } 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], Extrapolate.CLAMP);
}