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

Method makeFromEncoding

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

Source from the content-addressed store, hash-verified

12395 return new Km(e, t);
12396 }
12397 static makeFromEncoding(e, t) {
12398 const n = t.encoding,
12399 i = n.x,
12400 r = n.y;
12401 if (Zo(i) && Zo(r)) {
12402 const o = i.impute ? i : r.impute ? r : void 0;
12403 if (void 0 === o) return;
12404 const a = i.impute ? r : r.impute ? i : void 0,
12405 { method: s, value: l, frame: c, keyvals: u } = o.impute,
12406 f = Ja(t.mark, n);
12407 return new Km(e, {
12408 impute: o.field,
12409 key: a.field,
12410 ...(s ? { method: s } : {}),
12411 ...(void 0 !== l ? { value: l } : {}),
12412 ...(c ? { frame: c } : {}),
12413 ...(void 0 !== u ? { keyvals: u } : {}),
12414 ...(f.length ? { groupby: f } : {}),
12415 });
12416 }
12417 return null;
12418 }
12419 hash() {
12420 return `Impute ${d(this.transform)}`;
12421 }

Callers

nothing calls this directly

Calls 2

ZoFunction · 0.85
JaFunction · 0.85

Tested by

no test coverage detected