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

Function zd

resources/vega-lite.min.js:9674–9712  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

9672 );
9673 }
9674 function zd(e) {
9675 const n = {};
9676 function i(e) {
9677 var i;
9678 Ca(e)
9679 ? (n[e.field] = "date")
9680 : "quantitative" === e.type &&
9681 ((i = e.aggregate), t.isString(i) && p(["min", "max"], i))
9682 ? (n[e.field] = "number")
9683 : q(e.field) > 1
9684 ? e.field in n || (n[e.field] = "flatten")
9685 : la(e) &&
9686 Lo(e.sort) &&
9687 q(e.sort.field) > 1 &&
9688 (e.sort.field in n || (n[e.sort.field] = "flatten"));
9689 }
9690 if (
9691 ((qm(e) || Um(e)) &&
9692 e.forEachFieldDef((t, n) => {
9693 if (aa(t)) i(t);
9694 else {
9695 const r = rt(n),
9696 o = e.fieldDef(r);
9697 i({ ...t, type: o.type });
9698 }
9699 }),
9700 qm(e))
9701 ) {
9702 const { mark: t, markDef: i, encoding: r } = e;
9703 if (Zr(t) && !e.encoding.order) {
9704 const e = r["horizontal" === i.orient ? "y" : "x"];
9705 Zo(e) &&
9706 "quantitative" === e.type &&
9707 !(e.field in n) &&
9708 (n[e.field] = "number");
9709 }
9710 }
9711 return n;
9712 }
9713 class Cd extends $c {
9714 clone() {
9715 return new Cd(null, l(this._parse));

Callers 1

hpFunction · 0.85

Calls 9

aaFunction · 0.85
ZoFunction · 0.85
forEachFieldDefMethod · 0.80
qmFunction · 0.70
UmFunction · 0.70
iFunction · 0.70
rtFunction · 0.70
ZrFunction · 0.70
fieldDefMethod · 0.45

Tested by

no test coverage detected