MCPcopy Create free account
hub / github.com/alignoth/alignoth / assembleRowColumnHeaderData

Method assembleRowColumnHeaderData

resources/vega-lite.min.js:9545–9573  ·  view source on GitHub ↗
(e, t, n)

Source from the content-addressed store, hash-verified

9543 return e;
9544 }
9545 assembleRowColumnHeaderData(e, t, n) {
9546 const i = { row: "y", column: "x", facet: void 0 }[e],
9547 r = [],
9548 o = [],
9549 a = [];
9550 i &&
9551 n &&
9552 n[i] &&
9553 (t
9554 ? (r.push(`distinct_${n[i]}`), o.push("max"))
9555 : (r.push(n[i]), o.push("distinct")),
9556 a.push(`distinct_${n[i]}`));
9557 const { sortField: s, sortIndexField: l } = this[e];
9558 if (s) {
9559 const { op: e = Eo, field: t } = s;
9560 (r.push(t), o.push(e), a.push(ma(s, { forAs: !0 })));
9561 } else l && (r.push(l), o.push("max"), a.push(l));
9562 return {
9563 name: this[e].name,
9564 source: t ?? this.data,
9565 transform: [
9566 {
9567 type: "aggregate",
9568 groupby: this[e].fields,
9569 ...(r.length ? { fields: r, ops: o, as: a } : {}),
9570 },
9571 ],
9572 };
9573 }
9574 assembleFacetHeaderData(e) {
9575 const { columns: t } = this.model.layout,
9576 { layoutHeaders: n } = this.model.component,

Callers 2

assembleMethod · 0.95

Calls 1

maFunction · 0.70

Tested by

no test coverage detected