MCPcopy Index your code
hub / github.com/microsoft/SandDance / legendSymbolLayout

Function legendSymbolLayout

docs/app/js/sanddance-app.js:147969–147983  ·  view source on GitHub ↗
(spec, config)

Source from the content-addressed store, hash-verified

147967 });
147968}
147969function legendSymbolLayout(spec, config) {
147970 const _ = lookup(spec, config); // layout parameters for legend entries
147971 return {
147972 align: _("gridAlign"),
147973 columns: _.entryColumns(),
147974 center: {
147975 row: true,
147976 column: false
147977 },
147978 padding: {
147979 row: _("rowPadding"),
147980 column: _("columnPadding")
147981 }
147982 };
147983}
147984const isL = 'item.orient === "left"', isR = 'item.orient === "right"', isLR = `(${isL} || ${isR})`, isVG = `datum.vgrad && ${isLR}`, baseline = anchorExpr('"top"', '"bottom"', '"middle"'), alignFlip = anchorExpr('"right"', '"left"', '"center"'), exprAlign = `datum.vgrad && ${isR} ? (${alignFlip}) : (${isLR} && !(datum.vgrad && ${isL})) ? "left" : ${alignExpr$1}`, exprAnchor = `item._anchor || (${isLR} ? "middle" : "start")`, exprAngle = `${isVG} ? (${isL} ? -90 : 90) : 0`, exprBaseline = `${isLR} ? (datum.vgrad ? (${isR} ? "bottom" : "top") : ${baseline}) : "top"`;
147985function legendTitle(spec, config, userEncode, dataRef) {
147986 const _ = lookup(spec, config);

Callers 1

parseLegendFunction · 0.70

Calls 2

lookupFunction · 0.70
_Function · 0.70

Tested by

no test coverage detected