microsoft / powerbi-visuals-chord
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 63 units with 1,251 lines of code in units (73.2% of code).
    • 1 very long units (230 lines of code)
    • 4 long units (297 lines of code)
    • 12 medium size units (372 lines of code)
    • 11 small units (165 lines of code)
    • 35 very small units (187 lines of code)
18% | 23% | 29% | 13% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts18% | 23% | 29% | 13% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src18% | 23% | 29% | 13% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public static CONVERTER()
in src/chordChart.ts
230 41 4
private render()
in src/chordChart.ts
97 5 0
export function createTooltipData()
in src/tooltipBuilder.ts
74 14 4
private drawTicks()
in src/chordChart.ts
73 5 0
export function createTooltipInfo()
in src/tooltipBuilder.ts
53 14 6
private renderLabels()
in src/chordChart.ts
43 6 4
40 11 0
38 5 3
constructor()
in src/chordChart.ts
36 2 1
private renderLines()
in src/chordChart.ts
32 2 3
31 6 1
public update()
in src/chordChart.ts
28 5 1
function hasCollisions()
in src/chordChart.ts
27 3 4
protected bindContextMenuToClearCatcher()
in src/interactiveBehavior.ts
26 3 2
26 3 2
private drawCategoryLabels()
in src/chordChart.ts
24 2 0
21 5 1
20 15 1
18 1 2
private static enumerateAxis()
in src/chordChart.ts
17 1 2