microsoft / PowerBI-visuals-sampleBarChart
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 32 units with 481 lines of code in units (62.2% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (155 lines of code)
    • 3 medium size units (70 lines of code)
    • 12 small units (169 lines of code)
    • 15 very small units (87 lines of code)
0% | 32% | 14% | 35% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 32% | 14% | 35% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 32% | 14% | 35% | 17%
src/localization0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public update()
in src/barChart.ts
83 5 1
72 9 1
25 5 2
constructor()
in src/barChart.ts
24 1 1
21 2 3
20 4 3
19 2 3
export function getCategoricalObjectValue()
in src/objectEnumerationUtility.ts
16 5 5
private handleLandingPage()
in src/barChart.ts
15 6 1
15 1 0
show: getValue()
in src/barChart.ts
13 2 4
displayName: getValue()
in src/barChart.ts
12 2 4
private static wordBreak()
in src/barChart.ts
12 1 3
private handleClick()
in src/barChart.ts
12 2 1
private handleContextMenu()
in src/barChart.ts
12 2 0
export function getValue()
in src/objectEnumerationUtility.ts
12 4 4
fill: getValue()
in src/barChart.ts
11 2 4
showDataLabel: getValue()
in src/barChart.ts
10 2 4
10 1 0
private getTooltipData()
in src/barChart.ts
9 2 1