microsoft / powerbi-visuals-histogram
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 95 units with 1,740 lines of code in units (77.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (88 lines of code)
    • 4 medium complex units (239 lines of code)
    • 14 simple units (411 lines of code)
    • 76 very simple units (1,002 lines of code)
0% | 5% | 13% | 23% | 57%
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% | 5% | 13% | 23% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 5% | 13% | 23% | 57%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function createScale()
in src/axisHelper.ts
88 29 1
private getXPoints()
in src/visual.ts
58 15 0
36 14 3
export function createAxis()
in src/axisHelper.ts
76 13 1
public update()
in src/visual.ts
69 12 1
37 10 2
19 10 3
59 9 11
16 8 1
25 8 5
83 8 4
10 7 4
7 7 2
export function isOrdinal()
in src/axisHelper.ts
7 7 1
33 7 1
17 6 3
34 6 4
public isDataValid()
in src/visual.ts
14 6 1
private renderColumns()
in src/visual.ts
50 6 0
function getXLabelMaxWidth()
in src/axisHelper.ts
15 5 6