microsoft / PowerBI-visuals-TimeBrush
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 67 units with 840 lines of code in units (68.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (242 lines of code)
    • 6 simple units (144 lines of code)
    • 54 very simple units (454 lines of code)
0% | 0% | 28% | 17% | 54%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
ts0% | 0% | 30% | 17% | 51%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
timebrush/src0% | 0% | 29% | 8% | 61%
timebrush-powerbi/src0% | 0% | 33% | 30% | 36%
timebrush/src/base0% | 0% | 0% | 0% | 100%
timebrush-powerbi0% | 0% | 0% | 0% | 100%
timebrush0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private parseDatesFromPowerBi()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
39 17 2
private renderYAxis()
in packages/timebrush/src/TimeBrush.ts
55 16 1
function hasColorSettingsChanged()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
21 15 2
export default function converter()
in packages/timebrush-powerbi/src/dataConversion.ts
34 14 2
private renderXAxis()
in packages/timebrush/src/TimeBrush.ts
37 12 1
export function coerceDate()
in packages/timebrush-powerbi/src/dataConversion.ts
21 11 1
private renderLegend()
in packages/timebrush/src/TimeBrush.ts
35 11 0
public update()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
29 9 3
private loadSelectedRangeFromPowerBI()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
22 8 3
function selectedRangeChanged()
in packages/timebrush/src/TimeBrush.ts
15 8 0
private getRangeBoundItems()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
25 7 1
private renderValueBars()
in packages/timebrush/src/TimeBrush.ts
23 7 1
export function convertItem()
in packages/timebrush-powerbi/src/dataConversion.ts
30 6 7
constructor()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
16 5 2
private loadDataFromPowerBI()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
11 5 3
private renderElements()
in packages/timebrush/src/TimeBrush.ts
21 5 0
private renderValueBarGradients()
in packages/timebrush/src/TimeBrush.ts
46 5 0
public areEqual()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
9 4 2
private boundRangeByItemDates()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
7 3 2
private updatePBIFilter()
in packages/timebrush-powerbi/src/TimeBrushVisual.ts
17 3 1