Change constant layout to become circular layout
- Dominant language
- JavaScript
- Stars
- 3.9k
- Forks
- 418
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to change the constant layout option to a circular layout which doesn't care about the number of crosses and just arranges the nodes in the form of a circle. The algo I'm using is:
var r = Math.min(this.width, this.height) / 2;
/\* Where to start the circle. */
var dx = this.width / 2;
var dy = this.height / 2;
/\* Calculate the step so that the vertices are equally apart. _/
var step = 2_Math.PI / graph.vertexCount;
var t = 0; // Start at "angle" 0.
for (var i = 0; i
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating VivaGraphJS's constant layout implementation and the graph vertex collection used by the layout. Compare its positioning flow with the supplied circle algorithm; done means vertices are evenly arranged around a circle regardless of the number of crosses and the graph still renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100