UNPKG

1.12 kBJavaScriptView Raw
1"use strict";
2var __rest = (this && this.__rest) || function (s, e) {
3 var t = {};
4 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5 t[p] = s[p];
6 if (s != null && typeof Object.getOwnPropertySymbols === "function")
7 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9 t[p[i]] = s[p[i]];
10 }
11 return t;
12};
13Object.defineProperty(exports, "__esModule", { value: true });
14exports.Group = void 0;
15const order_1 = require("./utils/order");
16const groupN_1 = require("./groupN");
17/**
18 * The Group transform group data by x and y channels, and aggregate.
19 */
20const Group = (options = {}) => {
21 const { channels = ['x', 'y'] } = options, rest = __rest(options, ["channels"]);
22 const groupBy = (I, mark) => (0, order_1.createGroups)(channels, I, mark);
23 return (0, groupN_1.GroupN)(Object.assign(Object.assign({}, rest), { groupBy }));
24};
25exports.Group = Group;
26exports.Group.props = {};
27//# sourceMappingURL=group.js.map
\No newline at end of file