-
-
Notifications
You must be signed in to change notification settings - Fork 86
Concentric Layout #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concentric Layout #348
Conversation
✅ Deploy Preview for reagraph ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new concentric layout system for graph visualization, providing two different implementations of concentric node positioning. The changes add support for both 2D and basic concentric layouts with customizable parameters like radius, spacing, and centrality-based positioning. Additionally, a new Badge component is introduced for displaying overlay information on nodes.
- Implements concentric2d layout with degree centrality-based positioning and configurable parameters
- Adds basic concentric layout with level-based node distribution
- Introduces Badge component for node annotations with customizable styling
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| stories/demos/TwoLayouts.story.tsx | Adds Concentric story demo using range-generated nodes |
| stories/demos/Layouts.story.tsx | Adds Concentric2d story with layout configuration options |
| stories/demos/Badge.story.tsx | New story file demonstrating Badge component usage |
| src/symbols/nodes/index.ts | Exports new Badge component |
| src/symbols/nodes/Badge.tsx | New Badge component implementation |
| src/layout/types.ts | Adds concentric layout types to LayoutTypes union |
| src/layout/layoutProvider.ts | Integrates concentric layouts into layout provider |
| src/layout/index.ts | Exports concentric2d module |
| src/layout/concentric2d.ts | Implements 2D concentric layout with degree centrality |
| src/layout/concentric2d.test.ts | Unit tests for concentric2d layout |
| src/layout/concentric.ts | Implements basic concentric layout |
Comments suppressed due to low confidence (1)
src/symbols/nodes/Badge.tsx:43
- [nitpick] The default value of 2 for badgeSize is misleading as the parameter documentation describes it as a 'Size multiplier' but a value of 2 seems unusually large for a multiplier.
badgeSize = 2,
Uh oh!
There was an error while loading. Please reload this page.