react-native-wagmi-charts
Version:
A sweet candlestick chart for React Native
13 lines (12 loc) • 379 B
JavaScript
export function getXPositionForCurve(path, index) {
'worklet';
if (index === 0) {
return path.move.x;
}
const point = path.curves[index - 1];
if (point === undefined) {
throw new Error(`Index out of bounds: ${index}. ` + `Expected an integer in the range [0, ${path.curves.length}]`);
}
return point.to.x;
}
//# sourceMappingURL=getXPositionForCurve.js.map