MCPcopy
hub / github.com/microsoft/SandDance / finalizeLegend

Function finalizeLegend

packages/sanddance/src/legend.ts:89–100  ·  view source on GitHub ↗
(colorBinType: ColorBin, colorColumn: Column, legend: VegaDeckGl.types.Legend, language: Language)

Source from the content-addressed store, hash-verified

87}
88
89export function finalizeLegend(colorBinType: ColorBin, colorColumn: Column, legend: VegaDeckGl.types.Legend, language: Language) {
90 const rowTexts: string[] = [];
91 for (const i in legend.rows) {
92 const row = legend.rows[i] as LegendRowWithSearch;
93 row.search = legendRange(colorBinType, colorColumn, legend, +i);
94 if (row.value === Other) {
95 row.label = language.legendOther;
96 } else {
97 rowTexts.push(row.value);
98 }
99 }
100}

Callers 2

onAnimateDataChangeMethod · 0.90
preStageMethod · 0.90

Calls 1

legendRangeFunction · 0.70

Tested by

no test coverage detected