UNPKG

react-native-stonk-charts

Version:

A beautiful, performant chart library for React Native. Fork of react-native-wagmi-charts with Reanimated v4 support.

8 lines (6 loc) 238 B
import type { TLineChartPoint } from '../types'; export function getDomain(rows: TLineChartPoint[]): [number, number] { 'worklet'; const values = rows.map(({ value }) => value); return [Math.min(...values), Math.max(...values)]; }