microsoft / PowerBI-visuals-MultiKPI
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 202 units with 2,956 lines of code in units (66.9% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (479 lines of code)
    • 32 medium size units (1,020 lines of code)
    • 52 small units (756 lines of code)
    • 111 very small units (701 lines of code)
0% | 16% | 34% | 25% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 16% | 34% | 25% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/visualComponent0% | 18% | 36% | 23% | 20%
src/converter0% | 21% | 34% | 26% | 17%
src0% | 0% | 63% | 24% | 12%
src/settings0% | 0% | 7% | 35% | 56%
src/services0% | 0% | 88% | 0% | 11%
src/utils0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private processData()
in src/converter/data/dataConverter.ts
85 24 4
public render()
in src/visualComponent/mainChart/hoverLabelComponent.ts
78 13 1
private renderComponent()
in src/visualComponent/sparkline/lineComponent.ts
78 11 1
private renderStaleData()
in src/visualComponent/subtitleWarningComponent.ts
66 11 3
constructor()
in src/visualComponent/mainChart/chartComponent.ts
59 4 1
public convert()
in src/converter/data/dataSmooth.ts
57 16 1
public render()
in src/visualComponent/mainChart/chartLabelComponent.ts
56 8 1
private onCurrentDataPointIndexChange()
in src/visualComponent/sparkline/lineComponent.ts
50 10 1
protected renderGroup()
in src/visualComponent/mainChart/chartLabelBaseComponent.ts
49 6 2
private postProcessData()
in src/converter/data/dataConverter.ts
45 6 2
private initDataRepresentationSeries()
in src/converter/data/dataConverter.ts
44 1 4
private calcAlphaBeta()
in src/converter/data/dataSmooth.ts
44 5 6
constructor()
in src/visualComponent/rootComponent.ts
42 1 1
public render()
in src/visualComponent/mainChart/chartComponent.ts
41 3 1
constructor()
in src/multiKpi.ts
39 3 1
private renderComponent()
in src/visualComponent/rootComponent.ts
39 1 1
constructor()
in src/visualComponent/sparkline/svgComponent.ts
37 3 1
public render()
in src/visualComponent/sparkline/svgComponent.ts
34 6 1
private renderComponent()
in src/visualComponent/mainChart/axisComponent.ts
32 2 1
public render()
in src/visualComponent/sparkline/dotsComponent.ts
32 2 1