import { xyCheck } from "./xyCheck.js";
/**
 * Converts a DataXY object to an array of {x,y} point objects.
 * @param data - array of points {x,y}.
 */
export function xyToXYObject(data) {
    xyCheck(data);
    const { x, y } = data;
    const objectArray = [];
    for (let i = 0; i < x.length; i++) {
        objectArray.push({ x: x[i], y: y[i] });
    }
    return objectArray;
}
//# sourceMappingURL=xyToXYObject.js.map