How Overlays Work
Overlays add attributes to existing nodes. The visualization then uses these attributes to modify the display.1
Base Graph
Your code structure with nodes and edges
2
Apply Overlay
Plugin writes attributes to nodes
3
Visualize
Frontend maps attributes to colors/sizes/badges
Attribute Prefixes
Each overlay uses a unique prefix to avoid conflicts:| Prefix | Plugin | Example Attributes |
|---|---|---|
git: | Git Activity | git:churn, git:authors |
coverage: | Test Coverage | coverage:percent, coverage:lines |
complexity: | Complexity | complexity:cyclomatic |
ownership: | Code Ownership | ownership:team |
layout: | Layout (built-in) | layout:x, layout:y, layout:z |
Overlay Types
| Type | Effect | Best For |
|---|---|---|
Color | Node fill color | Continuous metrics (coverage %) |
Size | Node radius | Magnitude (lines of code) |
Badge | Icon/label | Categories (team, status) |
EdgeColor | Edge color | Call frequency |
EdgeWidth | Edge thickness | Relationship strength |
Overlay Definition
API Flow
1
List Overlays
GET /api/overlays - Returns all plugins2
Apply
POST /api/overlays/git-activity/apply - Writes attributes3
Fetch Graph
GET /api/graph - Nodes include overlay attributes4
Remove
DELETE /api/overlays/git-activity/apply - Removes attributesSingle Source of Truth
Overlay configuration lives in code, not in config files:Do
- Plugin defines overlays in C# code
- API exposes overlay definitions
- Frontend fetches dynamically
Don't
- JSON config files
- Render config in database
- Hardcoded colors in frontend
Built-in Overlays
Git Activity
| Attribute | Description |
|---|---|
git:churn | Number of changes |
git:authors | Unique contributors |
git:lastModified | Last change date |
Test Coverage
| Attribute | Description |
|---|---|
coverage:percent | Line coverage % |
coverage:lines | Covered lines |
coverage:branches | Branch coverage % |
Complexity
| Attribute | Description |
|---|---|
complexity:cyclomatic | Cyclomatic complexity |
complexity:cognitive | Cognitive complexity |