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

Method assembleFacet

resources/vega-lite.min.js:13045–13081  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13043 return { fields: e, ops: t, as: n };
13044 }
13045 assembleFacet() {
13046 const { name: e, data: n } = this.component.data.facetRoot,
13047 { row: i, column: r } = this.facet,
13048 { fields: o, ops: a, as: s } = this.getCardinalityAggregateForChild(),
13049 l = [];
13050 for (const e of Be) {
13051 const n = this.facet[e];
13052 if (n) {
13053 l.push(ma(n));
13054 const { bin: c, sort: u } = n;
13055 if ((mn(c) && l.push(ma(n, { binSuffix: "end" })), Lo(u))) {
13056 const { field: e, op: t = Eo } = u,
13057 l = mp(n, u);
13058 i && r
13059 ? (o.push(l), a.push("max"), s.push(l))
13060 : (o.push(e), a.push(t), s.push(l));
13061 } else if (t.isArray(u)) {
13062 const t = Ff(n, e);
13063 (o.push(t), a.push("max"), s.push(t));
13064 }
13065 }
13066 }
13067 const c = !!i && !!r;
13068 return {
13069 name: e,
13070 data: n,
13071 groupby: l,
13072 ...(c || o.length > 0
13073 ? {
13074 aggregate: {
13075 ...(c ? { cross: c } : {}),
13076 ...(o.length ? { fields: o, ops: a, as: s } : {}),
13077 },
13078 }
13079 : {}),
13080 };
13081 }
13082 facetSortFields(e) {
13083 const { facet: n } = this,
13084 i = n[e];

Callers 1

assembleMarksMethod · 0.95

Calls 6

LoFunction · 0.85
maFunction · 0.70
mnFunction · 0.70
mpFunction · 0.70
FfFunction · 0.70

Tested by

no test coverage detected