microsoft / powerbi-visuals-linedotchart
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 49 units with 1,010 lines of code in units (68.4% of code).
    • 2 very long units (251 lines of code)
    • 3 long units (220 lines of code)
    • 9 medium size units (277 lines of code)
    • 9 small units (138 lines of code)
    • 26 very small units (124 lines of code)
24% | 21% | 27% | 13% | 12%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts24% | 21% | 27% | 13% | 12%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src24% | 21% | 27% | 13% | 12%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private drawDots()
in src/visual.ts
148 12 1
103 24 4
95 6 0
private calculateAxes()
in src/visual.ts
69 5 0
private draw()
in src/visual.ts
56 6 0
49 3 3
constructor()
in src/visual.ts
38 2 1
private drawClipPath()
in src/visual.ts
33 2 1
private drawLine()
in src/visual.ts
31 1 1
private resize()
in src/visual.ts
29 1 0
public update()
in src/visual.ts
26 7 1
25 4 0
public clear()
in src/visual.ts
24 3 0
22 16 1
20 15 1
20 6 1
16 3 2
public bindEvents()
in src/behavior.ts
15 1 2
public renderSelection()
in src/behavior.ts
15 3 1
public setIsStopped()
in src/visual.ts
14 1 1