victory-native
Version:
A charting library for React Native with a focus on performance and customization.
17 lines (16 loc) • 489 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVerticalBarRect = void 0;
const getVerticalBarRect = (point, baselineY, barThickness) => {
const { x, y } = point;
if (typeof y !== "number" || !Number.isFinite(x) || !Number.isFinite(y)) {
return null;
}
return {
x: x - barThickness / 2,
y,
width: barThickness,
height: baselineY - y,
};
};
exports.getVerticalBarRect = getVerticalBarRect;