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

Function facetColumnHeaderFooter

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

Source from the content-addressed store, hash-verified

3666 };
3667}
3668function facetColumnHeaderFooter(data, sizeSignals, index) {
3669 const colFn = (ySignal)=>{
3670 return {
3671 type: "group",
3672 from: {
3673 data
3674 },
3675 encode: {
3676 update: {
3677 x: {
3678 signal: `(${index}) * (${sizeSignals.layoutWidth} + ${(0, _constants.SignalNames).FacetPaddingLeft}) + ${(0, _constants.SignalNames).FacetPaddingLeft} + ${(0, _constants.SignalNames).PlotOffsetLeft}`
3679 },
3680 y: {
3681 signal: ySignal
3682 },
3683 width: {
3684 signal: sizeSignals.layoutWidth
3685 }
3686 }
3687 }
3688 };
3689 };
3690 //create group marks based on data sequences
3691 const header = colFn(`${(0, _constants.SignalNames).PlotOffsetTop} / 2`);
3692 const footer = colFn(`${(0, _constants.SignalNames).PlotOffsetTop} + ${(0, _constants.SignalNames).PlotHeightOut}`);
3693 return {
3694 header,
3695 footer
3696 };
3697}
3698function createSequence(dataName, countSignal) {
3699 return {
3700 name: dataName,

Callers 2

addFacetColRowTitlesFunction · 0.70
addFacetAxesGroupMarksFunction · 0.70

Calls 1

colFnFunction · 0.70

Tested by

no test coverage detected