Skip to content

feat: overhaul graph visualization (Neo4j/ArangoDB-inspired)#406

Open
shaunpatterson wants to merge 4 commits into
dgraph-io:mainfrom
shaunpatterson:sp/improve-graph-visualization
Open

feat: overhaul graph visualization (Neo4j/ArangoDB-inspired)#406
shaunpatterson wants to merge 4 commits into
dgraph-io:mainfrom
shaunpatterson:sp/improve-graph-visualization

Conversation

@shaunpatterson
Copy link
Copy Markdown

Summary

  • ArangoDB-style cluster neighborhoods via custom forceCluster that groups nodes by predicate with tight same-group attraction and convex hull overlays
  • Neighborhood highlighting — hover a node to dim all non-connected nodes/edges to 6-12% opacity
  • Degree-based node sizing (8-40px radius), solid flat fills, pre-cached colors/radius for performance
  • Minimap (bottom-left) with click-to-navigate and viewport rectangle
  • Node search with zoom-to-focus and pulse animation
  • Performance optimizations — viewport culling, edge cap (2000), LOD dot rendering, throttled hulls/minimap, no shadows/gradients
  • Neo4j-inspired color palette with 20 rich colors, fit-to-screen button, dot-grid background

Test plan

  • Run BSA entity query with 1000+ nodes — verify clusters form and browser stays responsive
  • Hover nodes — verify neighborhood dimming works
  • Use search bar to find "Bank Secrecy Act" — verify zoom + pulse
  • Click minimap to navigate
  • Click fit-to-screen button
  • Double-click nodes to expand/collapse
  • Verify entity selector legend still works with hover highlighting

🤖 Generated with Claude Code

@shaunpatterson shaunpatterson requested a review from a team as a code owner March 17, 2026 04:05
@shaunpatterson shaunpatterson force-pushed the sp/improve-graph-visualization branch from 24e2dd3 to daf4e32 Compare March 17, 2026 04:07
@shaunpatterson
Copy link
Copy Markdown
Author

Old view:
image

New
image

image

shaunpatterson and others added 4 commits May 13, 2026 11:59
Major improvements to the graph rendering engine:

- ArangoDB-style cluster neighborhoods via custom forceCluster that
  groups nodes by predicate with tight same-group attraction
- Convex hull overlays behind each cluster for visual grouping
- Neighborhood highlighting: hover a node to dim non-connected nodes/edges
- Degree-based node sizing (8-40px radius, sqrt scale)
- Neo4j-inspired color palette with 20 rich, saturated colors
- Minimap (bottom-left) with click-to-navigate
- Node search bar with zoom-to-focus and pulse animation
- Fit-to-screen button
- Viewport culling for offscreen nodes/edges
- Level-of-detail: dot rendering at low zoom
- Edge cap (2000) and hull/minimap throttling for huge graphs
- Solid flat node fills for performance (no gradients/shadows)
- Pre-cached node radius, colors, and border colors
- Filled arrowheads with proper curved-edge placement
- Dot-grid background, rounded label pills, entity selector polish

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Node labels incorrectly showed graph_name instead of name because the
regex /Name/i matched the first property containing "name". Now prefers
an exact "name" match. Also tuned force simulation to settle quickly
instead of jittering indefinitely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove unused lightenColor function and auto-format files with biome/prettier.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The collapsed panel was showing a truncated stats string (only "edges"
visible) that duplicated the graph-stats indicator. Only render the
panel when a node or edge is actually selected.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matthewmcneely matthewmcneely force-pushed the sp/improve-graph-visualization branch from e1795e4 to 8d72580 Compare May 13, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant