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

Function ul

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

Source from the content-addressed store, hash-verified

4495 }
4496 }
4497 function ul(e, n) {
4498 const i = no(e) ? e : { type: e },
4499 r = i.type;
4500 if (!al.has(r)) return null;
4501 const o = cl(n, "x", i) || cl(n, "theta", i);
4502 if (!o) return null;
4503 const a = n[o],
4504 s = Zo(a) ? ma(a, {}) : void 0,
4505 l = (function (e) {
4506 switch (e) {
4507 case "x":
4508 return "y";
4509 case "y":
4510 return "x";
4511 case "theta":
4512 return "radius";
4513 case "radius":
4514 return "theta";
4515 }
4516 })(o),
4517 c = [],
4518 u = new Set();
4519 if (n[l]) {
4520 const e = n[l],
4521 t = Zo(e) ? ma(e, {}) : void 0;
4522 t && t !== s && (c.push(l), u.add(t));
4523 }
4524 const f = "x" === l ? "xOffset" : "yOffset",
4525 d = n[f],
4526 m = Zo(d) ? ma(d, {}) : void 0;
4527 m && m !== s && (c.push(f), u.add(m));
4528 const p = Ot.reduce((e, i) => {
4529 if ("tooltip" !== i && Ia(n, i)) {
4530 const r = n[i];
4531 for (const n of t.array(r)) {
4532 const t = wa(n);
4533 if (t.aggregate) continue;
4534 const r = ma(t, {});
4535 (r && u.has(r)) || e.push({ channel: i, fieldDef: t });
4536 }
4537 }
4538 return e;
4539 }, []);
4540 let g;
4541 return (
4542 void 0 !== a.stack
4543 ? (g = t.isBoolean(a.stack) ? (a.stack ? "zero" : null) : a.stack)
4544 : sl.has(r) && (g = "zero"),
4545 g && ((h = g), t.hasOwnProperty(ol, h))
4546 ? Ha(n) && 0 === p.length
4547 ? null
4548 : (a?.scale?.type &&
4549 a?.scale?.type !== dr.LINEAR &&
4550 a?.stack &&
4551 Si(
4552 (function (e) {
4553 return `Stack is applied to a non-linear scale (${e}).`;
4554 })(a.scale.type),

Callers 2

runMethod · 0.85
constructorMethod · 0.85

Calls 13

ZoFunction · 0.85
noFunction · 0.70
clFunction · 0.70
maFunction · 0.70
IaFunction · 0.70
waFunction · 0.70
HaFunction · 0.70
SiFunction · 0.70
oaFunction · 0.70
atFunction · 0.70
ZrFunction · 0.70
hasMethod · 0.45

Tested by

no test coverage detected