microsoft / PowerBI-visuals-PowerKPI
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 270 units with 4,456 lines of code in units (66.2% of code).
    • 1 very complex units (232 lines of code)
    • 5 complex units (498 lines of code)
    • 7 medium complex units (367 lines of code)
    • 29 simple units (995 lines of code)
    • 228 very simple units (2,364 lines of code)
5% | 11% | 8% | 22% | 53%
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
ts5% | 11% | 8% | 22% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/converter47% | 0% | 0% | 23% | 28%
src/visualComponent0% | 13% | 10% | 23% | 52%
src0% | 47% | 0% | 22% | 30%
src/settings0% | 0% | 6% | 8% | 84%
src/dataRepresentation0% | 0% | 0% | 56% | 43%
src/services0% | 0% | 0% | 0% | 100%
src/behavior0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public process()
in src/converter/dataConverter.ts
232 59 1
82 37 1
private showTooltip()
in src/visualComponent/tooltipComponent.ts
126 36 1
export function createScale()
in src/visualComponent/axes/helpers/axisHelper.ts
115 35 1
public render()
in src/visualComponent/kpi/varianceComponentWithIndicator.ts
119 32 1
public render()
in src/visualComponent/kpi/valueKPIComponent.ts
56 26 1
public render()
in src/visualComponent/kpi/varianceComponentWithCustomLabel.ts
67 24 1
export function createAxis()
in src/visualComponent/axes/helpers/axisHelper.ts
105 23 1
export function getRecommendedTickValuesForAQuantitativeRange()
in src/visualComponent/axes/helpers/axisHelper.ts
56 22 4
private getIndexByPosition()
in src/visualComponent/svgComponent.ts
28 18 1
public parseObjects()
in src/settings/seriesSettings.ts
30 14 1
private pointerMoveEvent()
in src/visualComponent/svgComponent.ts
46 12 1
protected getInterpolator()
in src/visualComponent/combo/lineComponent.ts
35 11 1
private getGradientPoints()
in src/converter/dataConverter.ts
69 10 9
private applyXArguments()
in src/converter/dataConverter.ts
30 10 2
private renderDynamicComponentByPosition()
in src/visualComponent/svgComponent.ts
58 10 4
public groupPointByColor()
in src/dataRepresentation/dataRepresentationPointFilter.ts
27 9 3
export function createFormatter()
in src/visualComponent/axes/helpers/axisHelper.ts
60 9 11
private getLayout()
in src/visualComponent/commonComponent.ts
21 9 1
private applyStyleBasedOnLayout()
in src/visualComponent/kpi/kpiComponent.ts
37 9 3