microsoft / powerbi-visuals-mekkochart
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 143 units with 4,246 lines of code in units (72.2% of code).
    • 2 very complex units (616 lines of code)
    • 4 complex units (641 lines of code)
    • 13 medium complex units (853 lines of code)
    • 20 simple units (667 lines of code)
    • 104 very simple units (1,469 lines of code)
14% | 15% | 20% | 15% | 34%
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
ts14% | 15% | 20% | 15% | 34%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/columnChart31% | 0% | 23% | 15% | 29%
src9% | 23% | 22% | 12% | 31%
src/converterStrategy0% | 62% | 0% | 0% | 37%
src/axis0% | 0% | 57% | 42% | 0%
src/visualStrategy0% | 0% | 0% | 34% | 65%
src/behavior0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private static createDataPoints()
in src/columnChart/baseColumnChart.ts
406 89 17
private render()
in src/visual.ts
210 51 1
private renderChart()
in src/visual.ts
260 43 10
public getLegend()
in src/converterStrategy/baseConverterStrategy.ts
126 36 5
private renderLegend()
in src/visual.ts
168 34 0
87 30 1
68 24 1
75 23 3
69 18 9
public calculateAxesProperties()
in src/columnChart/baseColumnChart.ts
85 17 1
64 16 1
private enumerateDataPoints()
in src/columnChart/baseColumnChart.ts
71 14 1
74 14 4
86 14 2
59 12 7
public update()
in src/visual.ts
39 12 1
21 12 2
public static converter()
in src/columnChart/baseColumnChart.ts
122 11 9
private static getStackedLabelColor()
in src/columnChart/baseColumnChart.ts
20 11 5
private static createAlternateStructure()
in src/columnChart/baseColumnChart.ts
43 10 2