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

Function isNumericColumn

js/visualization.js:1514–1520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1512 }
1513
1514 const isNumericColumn = values => values.some(value => value !== null && value !== undefined && String(value).trim() !== '')
1515 && values.every(value => {
1516 if (value === null || value === undefined || String(value).trim() === '') return true;
1517 if (typeof value === 'number') return Number.isFinite(value);
1518 const text = OCA.Analytics.Visualization.unescapeHtml(String(value)).replace(/<[^>]*>/g, '').trim();
1519 return /^[+-]?(?:\d[\d\s.,]*|\.\d+)\s*%?$/.test(text);
1520 });
1521
1522 [...Array(columnCount).keys()].forEach(colIdx => {
1523 const column = api.column(colIdx);

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected