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

Method initSpec

docs/app/js/sanddance-app.js:2767–2848  ·  view source on GitHub ↗
(dataName)

Source from the content-addressed store, hash-verified

2765 };
2766 }
2767 initSpec(dataName) {
2768 const { globalSignals } = this;
2769 const { minCellWidth , minCellHeight , plotOffsetLeft , plotOffsetBottom , plotOffsetTop , plotOffsetRight , plotHeightOut , plotWidthOut } = globalSignals;
2770 const { specContext } = this;
2771 const { insight } = specContext;
2772 const groupMark = {
2773 type: "group",
2774 //style: 'cell',
2775 encode: {
2776 update: {
2777 x: {
2778 signal: (0, _constants.SignalNames).PlotOffsetLeft
2779 },
2780 y: {
2781 signal: (0, _constants.SignalNames).PlotOffsetTop
2782 },
2783 height: {
2784 signal: (0, _constants.SignalNames).PlotHeightOut
2785 },
2786 width: {
2787 signal: (0, _constants.SignalNames).PlotWidthOut
2788 }
2789 }
2790 }
2791 };
2792 const inputDataname = "input";
2793 const vegaSpec = {
2794 $schema: "https://vega.github.io/schema/vega/v5.json",
2795 //style: 'cell',
2796 data: [
2797 {
2798 name: inputDataname
2799 },
2800 {
2801 name: dataName,
2802 source: inputDataname,
2803 transform: []
2804 }
2805 ],
2806 marks: [
2807 groupMark
2808 ],
2809 signals: (0, _signals.textSignals)(specContext, (0, _constants.SignalNames).ViewportHeight).concat([
2810 minCellWidth,
2811 minCellHeight,
2812 {
2813 name: (0, _constants.SignalNames).ViewportHeight,
2814 update: `max(${(0, _constants.SignalNames).MinCellHeight}, ${insight.size.height})`
2815 },
2816 {
2817 name: (0, _constants.SignalNames).ViewportWidth,
2818 update: `max(${(0, _constants.SignalNames).MinCellWidth}, ${insight.size.width})`
2819 },
2820 plotOffsetLeft,
2821 plotOffsetTop,
2822 plotOffsetBottom,
2823 plotOffsetRight,
2824 {

Callers 1

buildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected