MCPcopy Create free account
hub / github.com/Rello/analytics / currentId

Function currentId

js/chartOptions.js:466–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464 const descriptors = this.columnDescriptors(reportData);
465 const available = new Set(descriptors.map(column => column.id));
466 const currentId = column => available.has(column) ? column
467 : (Number.isInteger(column) ? descriptors[column]?.id : null);
468 const category = currentId(normalized.category) ?? fallback.category;
469 const series = normalized.series.map(currentId).filter(column => column !== null && column !== undefined && column !== category);
470 const measures = normalized.measures.map(currentId).filter(column => column !== null && column !== undefined && column !== category);

Callers 1

chartOptions.jsFile · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected