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

Function wo

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

Source from the content-addressed store, hash-verified

1884 return (r && (f.offset = r), f);
1885 }
1886 function wo(e) {
1887 let {
1888 channel: n,
1889 channelDef: i,
1890 channel2Def: r,
1891 markDef: o,
1892 config: a,
1893 scaleName: s,
1894 scale: l,
1895 stack: c,
1896 offset: u,
1897 defaultRef: f,
1898 bandPosition: d,
1899 } = e;
1900 if (i) {
1901 if (oa(i)) {
1902 const e = l?.get("type");
1903 if (aa(i)) {
1904 d ??= Ho({ fieldDef: i, fieldDef2: r, markDef: o, config: a });
1905 const { bin: t, timeUnit: l, type: f } = i;
1906 if (mn(t) || (d && l && f === cr))
1907 return c?.impute
1908 ? xo(i, s, { binSuffix: "mid" }, { offset: u })
1909 : d && !kr(e)
1910 ? $o({
1911 scaleName: s,
1912 fieldOrDatumDef: i,
1913 bandPosition: d,
1914 offset: u,
1915 })
1916 : xo(i, s, Na(i, n) ? { binSuffix: "range" } : {}, {
1917 offset: u,
1918 });
1919 if (pn(t)) {
1920 if (Zo(r))
1921 return $o({
1922 scaleName: s,
1923 fieldOrDatumDef: i,
1924 fieldOrDatumDef2: r,
1925 bandPosition: d,
1926 offset: u,
1927 });
1928 Si(xi(n === te ? ie : re));
1929 }
1930 }
1931 return xo(i, s, kr(e) ? { binSuffix: "range" } : {}, {
1932 offset: u,
1933 band: "band" === e ? (d ?? i.bandPosition ?? 0.5) : void 0,
1934 });
1935 }
1936 if (sa(i)) {
1937 const e = u ? { offset: u } : {};
1938 return { ...ko(n, i.value), ...e };
1939 }
1940 }
1941 return (
1942 t.isFunction(f) && (f = f()),
1943 f ? { ...f, ...(u ? { offset: u } : {}) } : f

Callers 3

boFunction · 0.70
muFunction · 0.70
huFunction · 0.70

Calls 15

aaFunction · 0.85
krFunction · 0.85
pnFunction · 0.85
ZoFunction · 0.85
oaFunction · 0.70
HoFunction · 0.70
mnFunction · 0.70
xoFunction · 0.70
$oFunction · 0.70
NaFunction · 0.70
SiFunction · 0.70
xiFunction · 0.70

Tested by

no test coverage detected