victory-native
Version:
A charting library for React Native with a focus on performance and customization.
18 lines (17 loc) • 670 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVerticalBarGroupRect = void 0;
const getBarGroupOffset_1 = require("./getBarGroupOffset");
const getVerticalBarGroupRect = ({ point, baselineY, barWidth, groupWidth, gapWidth, barIndex, }) => {
const { x, y } = point;
if (typeof y !== "number" || !Number.isFinite(x) || !Number.isFinite(y)) {
return null;
}
return {
x: x + (0, getBarGroupOffset_1.getBarGroupOffset)({ groupWidth, barWidth, gapWidth, barIndex }),
y,
width: barWidth,
height: baselineY - y,
};
};
exports.getVerticalBarGroupRect = getVerticalBarGroupRect;