Skip to main content
Overlays add additional visual information on top of your code graph. They change node colors, sizes, or add badges based on external data.

What Are Overlays?

An overlay is a visual layer that augments the base graph with additional data:
OverlayData SourceVisual Effect
Git ActivityGit historyColor by change frequency
Test CoverageCoverage reportsColor by coverage %
ComplexityStatic analysisSize by complexity
Code OwnershipGit blameColor by author/team

Available Overlays

Built-in Overlays

# List available overlays
curl http://localhost:5050/api/overlays
{
  "plugins": [
    {
      "id": "git-activity",
      "name": "Git Activity",
      "description": "Visualize code churn from git history",
      "overlays": [
        {
          "id": "churn",
          "name": "Change Frequency",
          "type": "color",
          "legend": { "low": "#22c55e", "high": "#ef4444" }
        }
      ]
    },
    {
      "id": "test-coverage",
      "name": "Test Coverage",
      "description": "Show test coverage percentages",
      "overlays": [
        {
          "id": "coverage",
          "name": "Line Coverage",
          "type": "color",
          "legend": { "0%": "#ef4444", "50%": "#f59e0b", "100%": "#22c55e" }
        }
      ]
    }
  ]
}

Applying an Overlay

Via UI

  1. Click the “Overlays” button in the toolbar
  2. Select an overlay from the list
  3. Click “Apply”

Via API

# Apply git activity overlay
curl -X POST http://localhost:5050/api/overlays/git-activity/apply

# Check application status
curl http://localhost:5050/api/overlays/git-activity/status

Via CLI

codegraph overlay apply git-activity
codegraph overlay apply test-coverage --report coverage.xml

Git Activity Overlay

Shows which parts of your codebase change most frequently.

Setup

# Apply git activity (analyzes last 6 months by default)
codegraph overlay apply git-activity

# Custom time range
codegraph overlay apply git-activity --since "2024-01-01" --until "2024-06-01"

What It Shows

MetricVisualMeaning
Change frequencyColor (green → red)How often this file changes
Lines changedNode sizeTotal lines added/removed
AuthorsBadgeNumber of contributors
High churn + many authors often indicates problematic code that’s hard to maintain.

Test Coverage Overlay

Visualize which code is tested.

Setup

First, generate a coverage report:
# Using coverlet
dotnet test --collect:"XPlat Code Coverage"
Then apply the overlay:
codegraph overlay apply test-coverage --report ./TestResults/*/coverage.cobertura.xml

What It Shows

CoverageColor
0-30%Red
30-70%Yellow
70-90%Light green
90-100%Green

Complexity Overlay

Highlight complex code that might need refactoring.

Setup

codegraph overlay apply complexity

Metrics

MetricDescription
Cyclomatic complexityNumber of decision points
Cognitive complexityHow hard to understand
Lines of codeRaw size

Code Ownership Overlay

See who owns which parts of the codebase.

Setup

codegraph overlay apply ownership

# With team mapping
codegraph overlay apply ownership --teams teams.json
teams.json:
{
  "teams": {
    "Platform": ["[email protected]", "[email protected]"],
    "Product": ["[email protected]", "[email protected]"]
  }
}

What It Shows

  • Each team gets a unique color
  • Shared ownership shows blended colors
  • Orphaned code (no recent commits) shows gray

Removing Overlays

Via UI

  1. Click “Overlays” button
  2. Click “Remove” next to active overlay

Via API

curl -X DELETE http://localhost:5050/api/overlays/git-activity/apply

Via CLI

codegraph overlay remove git-activity

Combining Overlays

You can have multiple overlays active:
# Apply multiple overlays
codegraph overlay apply git-activity
codegraph overlay apply test-coverage --report coverage.xml

# In UI, overlays can be toggled independently

Creating Custom Overlays

See the Custom Overlays guide to create your own.

What’s Next?