microsoft / powerbi-visuals-bulletchart
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,107 lines of code in units (73.5% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (575 lines of code)
    • 5 medium size units (148 lines of code)
    • 10 small units (162 lines of code)
    • 41 very small units (222 lines of code)
0% | 51% | 13% | 14% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 51% | 13% | 14% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 51% | 13% | 14% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
100 59 4
91 2 23
90 4 3
90 4 3
private drawAxesLabels()
in src/visual.ts
74 5 2
private drawAxes()
in src/visual.ts
70 4 3
60 1 2
public update()
in src/visual.ts
38 9 1
constructor()
in src/visual.ts
32 2 1
31 3 11
25 1 2
public static GETCATEGORICALVALUES()
in src/BulletChartColumns.ts
22 18 1
public static GETCATEGORICALCOLUMNS()
in src/BulletChartColumns.ts
20 15 1
20 2 6
20 4 1
19 17 1
18 15 1
public bindEvents()
in src/behavior.ts
13 3 2
13 1 2
13 2 0