integration layer; merge work on indicators from forks with existing ingestion pipeline
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Presentation labels for representations confirmed in the published catalog.
|
||||
// Exact IDs remain the option values and HTTP identities; never infer a type
|
||||
// from a prefix. Unknown options keep a neutral label in publication order.
|
||||
const FIGURE_LABELS: Readonly<Record<string, string>> = {
|
||||
fig_c1_grupos: 'Grupos',
|
||||
fig_c1_puntos: 'Puntos',
|
||||
fig_c2_apiladas: 'Barras apiladas',
|
||||
fig_c2_barras: 'Barras',
|
||||
fig_c2_donas: 'Donas',
|
||||
fig_c3r_caja: 'Caja de cuartiles',
|
||||
};
|
||||
|
||||
export function figureDisplayName(figureId: string, publishedFigures: readonly string[]): string {
|
||||
if (Object.hasOwn(FIGURE_LABELS, figureId)) return FIGURE_LABELS[figureId];
|
||||
const index = publishedFigures.indexOf(figureId);
|
||||
return index >= 0 ? `Representación ${index + 1}` : 'Representación adicional';
|
||||
}
|
||||
Reference in New Issue
Block a user