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

Function Fa

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

Source from the content-addressed store, hash-verified

2490 })(e);
2491 }
2492 function Fa(e, n) {
2493 let { compositeMark: i = !1 } =
2494 arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
2495 const { aggregate: r, timeUnit: o, bin: a, field: s } = e,
2496 l = { ...e };
2497 if (
2498 (i ||
2499 !r ||
2500 sn(r) ||
2501 an(r) ||
2502 on(r) ||
2503 (Si(
2504 (function (e) {
2505 return `Invalid aggregation operator "${e}".`;
2506 })(r),
2507 ),
2508 delete l.aggregate),
2509 o && (l.timeUnit = Ii(o)),
2510 s && (l.field = `${s}`),
2511 mn(a) && (l.bin = Oa(a, n)),
2512 pn(a) &&
2513 !_t(n) &&
2514 Si(
2515 (function (e) {
2516 return `Channel ${e} should not be used with "binned" bin.`;
2517 })(n),
2518 ),
2519 aa(l))
2520 ) {
2521 const { type: e } = l,
2522 t = (function (e) {
2523 if (e)
2524 switch ((e = e.toLowerCase())) {
2525 case "q":
2526 case sr:
2527 return "quantitative";
2528 case "t":
2529 case cr:
2530 return "temporal";
2531 case "o":
2532 case lr:
2533 return "ordinal";
2534 case "n":
2535 case ur:
2536 return "nominal";
2537 case fr:
2538 return "geojson";
2539 }
2540 })(e);
2541 (e !== t && (l.type = t),
2542 "quantitative" !== e &&
2543 cn(r) &&
2544 (Si(
2545 (function (e, t) {
2546 return `Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`;
2547 })(e, r),
2548 ),
2549 (l.type = "quantitative")));

Callers 3

DaFunction · 0.70
initFacetFieldDefMethod · 0.70
constructorMethod · 0.70

Calls 15

snFunction · 0.85
pnFunction · 0.85
aaFunction · 0.85
paFunction · 0.85
uiFunction · 0.85
anFunction · 0.70
onFunction · 0.70
SiFunction · 0.70
IiFunction · 0.70
mnFunction · 0.70
OaFunction · 0.70
_tFunction · 0.70

Tested by

no test coverage detected