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

Function Fu

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

Source from the content-addressed store, hash-verified

6916 }
6917 }
6918 function Fu(e, n) {
6919 const { config: i, encoding: r, markDef: o } = e,
6920 a = o.type,
6921 s = at(n),
6922 l = st(n),
6923 c = r[n],
6924 u = r[s],
6925 f = e.getScaleComponent(n),
6926 d = f ? f.get("type") : void 0,
6927 m = o.orient,
6928 p = r[l] ?? r.size ?? En("size", o, i, { vgChannel: l }),
6929 g = lt(n),
6930 h =
6931 ("bar" === a && ("x" === n ? "vertical" === m : "horizontal" === m)) ||
6932 ("tick" === a && ("y" === n ? "vertical" === m : "horizontal" === m));
6933 return !Zo(c) ||
6934 !(mn(c.bin) || pn(c.bin) || (c.timeUnit && !u)) ||
6935 (p && !lo(p)) ||
6936 r[g] ||
6937 kr(d)
6938 ? ((oa(c) && kr(d)) || h) && !u
6939 ? (function (e, n, i) {
6940 const { markDef: r, encoding: o, config: a, stack: s } = i,
6941 l = r.orient,
6942 c = i.scaleName(n),
6943 u = i.getScaleComponent(n),
6944 f = st(n),
6945 d = at(n),
6946 m = lt(n),
6947 p = i.scaleName(m),
6948 g = i.getScaleComponent(ct(n)),
6949 h =
6950 "tick" === r.type ||
6951 ("horizontal" === l && "y" === n) ||
6952 ("vertical" === l && "x" === n);
6953 let y;
6954 (o.size || r.size) &&
6955 (h
6956 ? (y = mu("size", i, { vgChannel: f, defaultRef: Pn(r.size) }))
6957 : Si(
6958 (function (e) {
6959 return `Cannot apply size to non-oriented mark "${e}".`;
6960 })(r.type),
6961 ));
6962 const v = !!y,
6963 b = Go({
6964 channel: n,
6965 fieldDef: e,
6966 markDef: r,
6967 config: a,
6968 scaleType: (u || g)?.get("type"),
6969 useVlSizeChannel: h,
6970 });
6971 y = y || { [f]: Ou(f, p || c, g || u, a, b, !!e, r.type) };
6972 const x =
6973 "band" === (u || g)?.get("type") && lo(b) && !v
6974 ? "top"
6975 : "middle",

Callers 1

vega-lite.min.jsFile · 0.70

Calls 15

EnFunction · 0.85
ltFunction · 0.85
ZoFunction · 0.85
pnFunction · 0.85
krFunction · 0.85
PnFunction · 0.85
vuFunction · 0.85
MnFunction · 0.85
zuFunction · 0.85
gnFunction · 0.85
getScaleComponentMethod · 0.80
scaleNameMethod · 0.80

Tested by

no test coverage detected