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

Function ensureColumn

packages/sanddance-explorer/src/columns.ts:35–43  ·  view source on GitHub ↗
(role: SandDance.specs.InsightColumnRoles, quantitative?: boolean, treemap?: boolean)

Source from the content-addressed store, hash-verified

33 const firstQuantitative = nonInternal.filter(c => c.quantitative)[0];
34 const firstQuantitativeColumnName = firstQuantitative && firstQuantitative.name;
35 const ensureColumn = (role: SandDance.specs.InsightColumnRoles, quantitative?: boolean, treemap?: boolean) => {
36 if (!insightColumns[role]) {
37 if (treemap) {
38 insightColumns[role] = getTreemapColumn(actualColumns).name;
39 } else {
40 insightColumns[role] = quantitative ? firstQuantitativeColumnName : firstColumnName;
41 }
42 }
43 };
44 function checkRequiresSize() {
45 switch (totalStyle) {
46 case 'sum-strip':

Callers 2

checkRequiresSizeFunction · 0.70
ensureColumnsPopulatedFunction · 0.70

Calls 1

getTreemapColumnFunction · 0.70

Tested by

no test coverage detected