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

Function ym

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

Source from the content-addressed store, hash-verified

10895 return { fields: n, ...(o ? { sort: o } : {}) };
10896 }
10897 function ym(e) {
10898 if (Sn(e) && t.isString(e.field)) return e.field;
10899 if (
10900 (function (e) {
10901 return !t.isArray(e) && J(e, "fields") && !J(e, "data");
10902 })(e)
10903 ) {
10904 let n;
10905 for (const i of e.fields)
10906 if (Sn(i) && t.isString(i.field))
10907 if (n) {
10908 if (n !== i.field)
10909 return (
10910 Si(
10911 "Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.",
10912 ),
10913 n
10914 );
10915 } else n = i.field;
10916 return (
10917 Si(
10918 "Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.",
10919 ),
10920 n
10921 );
10922 }
10923 if (
10924 (function (e) {
10925 return !t.isArray(e) && J(e, "fields") && J(e, "data");
10926 })(e)
10927 ) {
10928 Si(
10929 "Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.",
10930 );
10931 const n = e.fields[0];
10932 return t.isString(n) ? n : void 0;
10933 }
10934 }
10935 function vm(e, t) {
10936 const n = e.component.scales[t]
10937 .get("domains")

Calls 3

SnFunction · 0.85
JFunction · 0.70
SiFunction · 0.70

Tested by

no test coverage detected