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

Function yu

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

Source from the content-addressed store, hash-verified

6671 return c ? { offsetType: "visual", offset: c } : {};
6672 }
6673 function yu(e, t, n) {
6674 let { defaultPos: i, vgChannel: r } = n;
6675 const { encoding: o, markDef: a, config: s, stack: l } = t,
6676 c = o[e],
6677 u = o[at(e)],
6678 f = t.scaleName(e),
6679 d = t.getScaleComponent(e),
6680 { offset: m, offsetType: p } = hu({
6681 channel: e,
6682 markDef: a,
6683 encoding: o,
6684 model: t,
6685 bandPosition: 0.5,
6686 }),
6687 g = vu({ model: t, defaultPos: i, channel: e, scaleName: f, scale: d }),
6688 h =
6689 !c && _t(e) && (o.latitude || o.longitude)
6690 ? { field: t.getName(e) }
6691 : (function (e) {
6692 const {
6693 channel: t,
6694 channelDef: n,
6695 scaleName: i,
6696 stack: r,
6697 offset: o,
6698 markDef: a,
6699 } = e;
6700 if (oa(n) && r && t === r.fieldChannel) {
6701 if (Zo(n)) {
6702 let e = n.bandPosition;
6703 if (
6704 (void 0 !== e ||
6705 "text" !== a.type ||
6706 ("radius" !== t && "theta" !== t) ||
6707 (e = 0.5),
6708 void 0 !== e)
6709 )
6710 return $o({
6711 scaleName: i,
6712 fieldOrDatumDef: n,
6713 startSuffix: "start",
6714 bandPosition: e,
6715 offset: o,
6716 });
6717 }
6718 return xo(n, i, { suffix: "end" }, { offset: o });
6719 }
6720 return bo(e);
6721 })({
6722 channel: e,
6723 channelDef: c,
6724 channel2Def: u,
6725 markDef: a,
6726 config: s,
6727 scaleName: f,
6728 scale: d,
6729 stack: l,
6730 offset: m,

Callers 4

kuFunction · 0.85
SuFunction · 0.85
zpFunction · 0.85
vega-lite.min.jsFile · 0.85

Calls 12

vuFunction · 0.85
ZoFunction · 0.85
scaleNameMethod · 0.80
getScaleComponentMethod · 0.80
getNameMethod · 0.80
atFunction · 0.70
huFunction · 0.70
_tFunction · 0.70
oaFunction · 0.70
$oFunction · 0.70
xoFunction · 0.70
boFunction · 0.70

Tested by

no test coverage detected