MCPcopy Create free account
hub / github.com/microsoft/SandDance / facetRowHeaderFooter

Function facetRowHeaderFooter

docs/app/js/sanddance-app.js:3639–3667  ·  view source on GitHub ↗
(data, sizeSignals, index)

Source from the content-addressed store, hash-verified

3637 return map;
3638}
3639function facetRowHeaderFooter(data, sizeSignals, index) {
3640 const rowFn = (xSignal)=>{
3641 return {
3642 type: "group",
3643 from: {
3644 data
3645 },
3646 encode: {
3647 update: {
3648 x: {
3649 signal: xSignal
3650 },
3651 y: {
3652 signal: `${(0, _constants.SignalNames).PlotOffsetTop} + ${(0, _constants.SignalNames).FacetPaddingTop} + (${index}) * (${sizeSignals.layoutHeight} + ${(0, _constants.SignalNames).FacetPaddingTop} + ${(0, _constants.SignalNames).FacetPaddingBottom})`
3653 },
3654 height: {
3655 signal: sizeSignals.layoutHeight
3656 }
3657 }
3658 }
3659 };
3660 };
3661 const header = rowFn((0, _constants.SignalNames).PlotOffsetLeft);
3662 const footer = rowFn(`${(0, _constants.SignalNames).PlotOffsetLeft} + ${(0, _constants.SignalNames).PlotWidthOut} + ${(0, _constants.SignalNames).PlotOffsetRight} / 2`);
3663 return {
3664 header,
3665 footer
3666 };
3667}
3668function facetColumnHeaderFooter(data, sizeSignals, index) {
3669 const colFn = (ySignal)=>{
3670 return {

Callers 2

addFacetColRowTitlesFunction · 0.70
addFacetAxesGroupMarksFunction · 0.70

Calls 1

rowFnFunction · 0.70

Tested by

no test coverage detected