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

Function count

js/tableOptions.js:159–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 if (!state) return null;
158 const {field} = state;
159 const count = role => field(role).querySelectorAll('.draggable').length;
160 let error = '';
161 if (state.mode === 'table' && count('rows') === 0) error = t('analytics', 'Select at least one visible column.');
162 if (state.mode === 'pivot' && ['rows', 'columns', 'measures'].some(role => count(role) !== 1)) {

Callers 15

tableOptions.jsFile · 0.70
normalizeVersionMethod · 0.50
applyFiltersMethod · 0.50
applyFilterOptionsMethod · 0.50
readMethod · 0.50
aggregateDataMethod · 0.50
readDataMethod · 0.50
jsonParserMethod · 0.50
normalizePathsMethod · 0.50
readDataMethod · 0.50

Calls 1

fieldFunction · 0.70

Tested by

no test coverage detected