microsoft / PowerBI-visuals-ForceGraph
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 36 units with 801 lines of code in units (69.3% of code).
    • 2 very long units (297 lines of code)
    • 1 long units (52 lines of code)
    • 9 medium size units (275 lines of code)
    • 5 small units (76 lines of code)
    • 19 very small units (101 lines of code)
37% | 6% | 34% | 9% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts37% | 6% | 34% | 9% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src37% | 6% | 34% | 9% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private setVisualData()
in src/visual.ts
156 21 3
141 33 4
private getForceTick()
in src/visual.ts
52 11 0
public update()
in src/visual.ts
44 8 1
private init()
in src/visual.ts
40 1 1
private fadeNode()
in src/visual.ts
40 14 1
private isIntersect()
in src/visual.ts
29 18 2
private isReachable()
in src/visual.ts
28 10 2
public static build()
in src/tooltipsFactory.ts
27 6 2
24 2 2
private getLinkColor()
in src/visual.ts
22 6 3
private fadePath()
in src/visual.ts
21 6 3
20 15 1
19 2 1
private scale1to10()
in src/visual.ts
13 1 1
public static getColumnByRoleName()
in src/tooltipsFactory.ts
12 7 2
private getTextRect()
in src/visual.ts
12 1 3
private reset()
in src/visual.ts
10 2 0
private updateNodes()
in src/visual.ts
10 2 0
10 2 1