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

Function Ga

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

Source from the content-addressed store, hash-verified

3000 });
3001 }
3002 function Ga(e, n) {
3003 const i = [],
3004 r = [],
3005 o = [],
3006 a = [],
3007 s = {};
3008 return (
3009 Qa(e, (l, c) => {
3010 if (Zo(l)) {
3011 const { field: u, aggregate: f, bin: d, timeUnit: m, ...p } = l;
3012 if (f || m || d) {
3013 const e = ba(l),
3014 g = e?.title;
3015 let h = ma(l, { forAs: !0 });
3016 const y = {
3017 ...(g ? [] : { title: va(l, n, { allowDisabling: !0 }) }),
3018 ...p,
3019 field: h,
3020 };
3021 if (f) {
3022 let e;
3023 if (
3024 (an(f)
3025 ? ((e = "argmax"),
3026 (h = ma({ op: "argmax", field: f.argmax }, { forAs: !0 })),
3027 (y.field = `${h}.${u}`))
3028 : on(f)
3029 ? ((e = "argmin"),
3030 (h = ma(
3031 { op: "argmin", field: f.argmin },
3032 { forAs: !0 },
3033 )),
3034 (y.field = `${h}.${u}`))
3035 : "boxplot" !== f &&
3036 "errorbar" !== f &&
3037 "errorband" !== f &&
3038 (e = f),
3039 e)
3040 ) {
3041 const t = { op: e, as: h };
3042 (u && (t.field = u), a.push(t));
3043 }
3044 } else if ((i.push(h), aa(l) && mn(d))) {
3045 if (
3046 (r.push({ bin: d, field: u, as: h }),
3047 i.push(ma(l, { binSuffix: "end" })),
3048 Na(l, c) && i.push(ma(l, { binSuffix: "range" })),
3049 _t(c))
3050 ) {
3051 const e = { field: `${h}_end` };
3052 s[`${c}2`] = e;
3053 }
3054 ((y.bin = "binned"), it(c) || (y.type = sr));
3055 } else if (m && !Ti(m)) {
3056 o.push({ timeUnit: m, field: u, as: h });
3057 const e = aa(l) && l.type !== cr && "time";
3058 e &&
3059 (c === Oe || c === Pe

Callers 2

lsFunction · 0.70
psFunction · 0.70

Calls 13

ZoFunction · 0.85
aaFunction · 0.85
QaFunction · 0.70
baFunction · 0.70
maFunction · 0.70
vaFunction · 0.70
anFunction · 0.70
onFunction · 0.70
mnFunction · 0.70
NaFunction · 0.70
_tFunction · 0.70
itFunction · 0.70

Tested by

no test coverage detected