microsoft / PowerBI-visuals-HeatStreams
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 76 units with 971 lines of code in units (43.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (52 lines of code)
    • 1 simple units (34 lines of code)
    • 74 very simple units (885 lines of code)
0% | 0% | 5% | 3% | 91%
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% | 10% | 6% | 83%
tsx0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
pbi-heat-streams/src/data0% | 0% | 21% | 14% | 64%
packages/react-heat-streams/src/components0% | 0% | 0% | 0% | 100%
pbi-heat-streams/src0% | 0% | 0% | 0% | 100%
pbi-heat-streams/src/chart0% | 0% | 0% | 0% | 100%
packages/react-heat-streams/src0% | 0% | 0% | 0% | 100%
packages/react-heat-streams/src/components/CategoryChart0% | 0% | 0% | 0% | 100%
packages/react-heat-streams-stories/stories0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function aggregateValueSlices()
in pbi-heat-streams/src/data/aggregateValueSlices.ts
52 11 4
public unpackDomainScrub()
in pbi-heat-streams/src/data/DataViewConverter.ts
34 6 1
export function dateSliceEnd()
in packages/react-heat-streams/src/utils.ts
16 5 2
function remeasure()
in packages/react-heat-streams/src/components/CategoryChart/ValueText.tsx
14 4 0
function useOnClickHandler()
in packages/react-heat-streams/src/components/HeatStreamsChart.tsx
32 4 5
export function printValue()
in packages/react-heat-streams/src/components/printValue.ts
6 4 1
public async scrub()
in pbi-heat-streams/src/Interactions.ts
15 4 2
function sliceStart()
in pbi-heat-streams/src/data/aggregateValueSlices.ts
17 4 2
function useXScale()
in packages/react-heat-streams/src/components/HeatStreamsChart.tsx
26 3 5
public update()
in pbi-heat-streams/src/Visual.ts
14 3 1
public get valueMin()
in pbi-heat-streams/src/chart/ChartColorizer.ts
6 3 0
public get valueMax()
in pbi-heat-streams/src/chart/ChartColorizer.ts
6 3 0
function unpackCategoryIds()
in pbi-heat-streams/src/data/convertCategoricalDataView.ts
7 3 1
value: getRandomArbitrary()
in packages/react-heat-streams-stories/stories/InteractiveChart.tsx
31 2 2
function useFontSize()
in packages/react-heat-streams/src/components/CategoryChart/ValueText.tsx
3 2 1
showValues ?()
in packages/react-heat-streams/src/components/CategoryChart/index.tsx
3 2 0
function CategoryText()
in packages/react-heat-streams/src/components/CategoryNameList.tsx
23 2 7
function HeatStreamsChart()
in packages/react-heat-streams/src/components/HeatStreamsChart.tsx
123 2 24
function useCategoryY()
in packages/react-heat-streams/src/components/HeatStreamsChart.tsx
6 2 2
function useMaxCategories()
in packages/react-heat-streams/src/components/HeatStreamsChart.tsx
11 2 4