microsoft / PowerBI-Visuals-HorizontalBarChart
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 52 units with 1,042 lines of code in units (79.5% of code).
    • 2 very long units (434 lines of code)
    • 2 long units (166 lines of code)
    • 3 medium size units (71 lines of code)
    • 10 small units (158 lines of code)
    • 35 very small units (213 lines of code)
41% | 15% | 6% | 15% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts41% | 15% | 6% | 15% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src41% | 15% | 6% | 15% | 20%
src/localization0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public update()
in src/barChart.ts
315 38 1
119 9 1
public addTooltip()
in src/tooltipServiceWrapper.ts
92 15 2
function visualTransform()
in src/barChart.ts
74 11 2
29 6 5
21 5 2
export function getCategoricalObjectValue()
in src/objectEnumerationUtility.ts
21 5 5
constructor()
in src/barChart.ts
20 1 1
private getTooltipData()
in src/barChart.ts
19 4 1
function getTextPositionY()
in src/barChart.ts
18 6 2
function getTextPositionX()
in src/barChart.ts
17 8 2
private makeTooltipEventArgs()
in src/tooltipServiceWrapper.ts
17 1 3
15 4 1
private getCoordinates()
in src/tooltipServiceWrapper.ts
15 4 2
14 4 2
export function getValue()
in src/objectEnumerationUtility.ts
12 4 4
function getOverlapIndex()
in src/barChart.ts
11 5 1
barHeight: getValue()
in src/barChart.ts
10 1 4
private canDisplayTooltip()
in src/tooltipServiceWrapper.ts
10 3 1
barsColor: getValue()
in src/barChart.ts
9 1 4