(spec, config)
| 147967 | }); |
| 147968 | } |
| 147969 | function 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 | } |
| 147984 | const 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"`; |
| 147985 | function legendTitle(spec, config, userEncode, dataRef) { |
| 147986 | const _ = lookup(spec, config); |
no test coverage detected