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

Function ps

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

Source from the content-addressed store, hash-verified

3702 }
3703 }
3704 function ps(e, t, n) {
3705 const { mark: i, encoding: r, params: o, projection: a, ...s } = e,
3706 l = no(i) ? i : { type: i };
3707 o && Si(Kn(t));
3708 const { orient: c, inputType: u } = ms(e, t),
3709 {
3710 continuousAxisChannelDef: f,
3711 continuousAxisChannelDef2: d,
3712 continuousAxisChannelDefError: m,
3713 continuousAxisChannelDefError2: p,
3714 continuousAxis: g,
3715 } = ns(e, c, t),
3716 {
3717 errorBarSpecificAggregate: h,
3718 postAggregateCalculates: y,
3719 tooltipSummary: v,
3720 tooltipTitleWithFieldName: b,
3721 } = (function (e, t, n, i, r, o, a, s) {
3722 let l = [],
3723 c = [];
3724 const u = t.field;
3725 let f,
3726 d = !1;
3727 if ("raw" === o) {
3728 const t = e.center
3729 ? e.center
3730 : e.extent
3731 ? "iqr" === e.extent
3732 ? "median"
3733 : "mean"
3734 : s.errorbar.center,
3735 n = e.extent ? e.extent : "mean" === t ? "stderr" : "iqr";
3736 if (
3737 (("median" === t) != ("iqr" === n) &&
3738 Si(
3739 (function (e, t, n) {
3740 return `${e} is not usually used with ${t} for ${n}.`;
3741 })(t, n, a),
3742 ),
3743 "stderr" === n || "stdev" === n)
3744 )
3745 ((l = [
3746 { op: n, field: u, as: `extent_${u}` },
3747 { op: t, field: u, as: `center_${u}` },
3748 ]),
3749 (c = [
3750 {
3751 calculate: `${j(`center_${u}`)} + ${j(`extent_${u}`)}`,
3752 as: `upper_${u}`,
3753 },
3754 {
3755 calculate: `${j(`center_${u}`)} - ${j(`extent_${u}`)}`,
3756 as: `lower_${u}`,
3757 },
3758 ]),
3759 (f = [
3760 { fieldPrefix: "center_", titlePrefix: N(t) },
3761 { fieldPrefix: "upper_", titlePrefix: gs(t, n, "+") },

Callers 2

dsFunction · 0.70
vsFunction · 0.70

Calls 12

KnFunction · 0.85
noFunction · 0.70
SiFunction · 0.70
msFunction · 0.70
nsFunction · 0.70
jFunction · 0.70
NFunction · 0.70
gsFunction · 0.70
vaFunction · 0.70
RFunction · 0.70
GaFunction · 0.70
KaFunction · 0.70

Tested by

no test coverage detected