microsoft / PowerBI-visuals-TableSorter
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 118 units with 1,676 lines of code in units (54.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (139 lines of code)
    • 9 medium complex units (296 lines of code)
    • 19 simple units (403 lines of code)
    • 88 very simple units (838 lines of code)
0% | 8% | 17% | 24% | 50%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 8% | 18% | 24% | 49%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tablesorter/src/providers0% | 61% | 0% | 0% | 38%
tablesorter-powerbi/src0% | 6% | 40% | 23% | 29%
tablesorter/src0% | 0% | 0% | 42% | 57%
tablesorter/src/spec0% | 0% | 0% | 0% | 100%
tablesorter/src/templates0% | 0% | 0% | 0% | 100%
tablesorter-powerbi/src/settings0% | 0% | 0% | 0% | 100%
tablesorter-powerbi/base0% | 0% | 0% | 0% | 100%
tablesorter/src/base0% | 0% | 0% | 0% | 100%
tablesorter-powerbi0% | 0% | 0% | 0% | 100%
tablesorter-powerbi/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function dateTimeFormatCalculator()
in packages/tablesorter-powerbi/src/Utils.ts
48 35 0
private getFilteredData()
in packages/tablesorter/src/providers/JSONDataProvider.ts
91 31 1
private cellFormatter()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
34 18 1
export function processExistingConfig()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
29 12 2
export function syncLayoutColumns()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
40 12 3
export function calculateRankColors()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
23 12 2
public constructor()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
46 12 4
private loadSettingsFromPowerBI()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
32 12 2
function removeMissingColumns()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
41 11 2
public update()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
23 11 3
addToCalculation()
in packages/tablesorter-powerbi/src/Utils.ts
28 11 1
export default function()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
39 9 5
export function calcDomain()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
17 9 2
function updateRankingColumns()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
31 9 2
private runQuery()
in packages/tablesorter/src/TableSorter.ts
33 9 1
function processConfigWithRankResult()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
26 8 3
export function calculateRankingInfo()
in packages/tablesorter-powerbi/src/ConfigBuilder.ts
29 8 1
private setSelectionOnSelectionManager()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
16 8 2
private hasLayoutChanged()
in packages/tablesorter-powerbi/src/TableSorterVisual.ts
13 8 2
export function haveColumnsChanged()
in packages/tablesorter/src/configuration.ts
16 8 2