microsoft / PowerBI-visuals-TimeBrush
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 67 units with 840 lines of code in units (68.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (55 lines of code)
    • 15 medium size units (430 lines of code)
    • 9 small units (131 lines of code)
    • 42 very small units (224 lines of code)
0% | 6% | 51% | 15% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 6% | 53% | 12% | 27%
js0% | 0% | 0% | 83% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
timebrush/src0% | 12% | 48% | 13% | 25%
timebrush-powerbi/src0% | 0% | 63% | 12% | 23%
timebrush-powerbi0% | 0% | 0% | 83% | 16%
timebrush0% | 0% | 0% | 83% | 16%
timebrush/src/base0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private renderYAxis()
in packages/timebrush/src/TimeBrush.ts
55 16 1
private renderValueBarGradients()
in packages/timebrush/src/TimeBrush.ts
46 5 0
private parseDatesFromPowerBi()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
39 17 2
private renderXAxis()
in packages/timebrush/src/TimeBrush.ts
37 12 1
private renderLegend()
in packages/timebrush/src/TimeBrush.ts
35 11 0
export default function converter()
in packages/timebrush-powerbi/src/dataConversion.ts
34 14 2
export function convertItem()
in packages/timebrush-powerbi/src/dataConversion.ts
30 6 7
public update()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
29 9 3
private getRangeBoundItems()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
25 7 1
private buildTimeScale()
in packages/timebrush/src/TimeBrush.ts
25 2 0
private renderValueBars()
in packages/timebrush/src/TimeBrush.ts
23 7 1
private loadSelectedRangeFromPowerBI()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
22 8 3
private undoPBIScale()
in packages/timebrush/src/TimeBrush.ts
22 3 3
function hasColorSettingsChanged()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
21 15 2
export function coerceDate()
in packages/timebrush-powerbi/src/dataConversion.ts
21 11 1
private renderElements()
in packages/timebrush/src/TimeBrush.ts
21 5 0
private renderBrush()
in packages/timebrush/src/TimeBrush.ts
19 1 1
private updatePBIFilter()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
17 3 1
constructor()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
16 5 2
module.exports = function()
in packages/timebrush-powerbi/wallaby.conf.js
15 1 1