add d3.forceExtent
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- d3, javascript
- Domain
- data-visualization
Research direction
The issue proposes a force that constrains nodes to an extent, including their radii, and includes a JavaScript implementation. Read the linked pull request #163 to see the work already in progress and how it fits the project; the issue does not name any files or tests. Done would mean adding and verifying the proposed force in the project.
Written by the indexing model from the issue text.
Description
I find this useful:
d3.forceExtent = function(extent) {
var nodes;
if (extent == null) extent=[[0,800], [0,500]];
function force() {
var i,
n = nodes.length,
node,
r = 0;
for (i = 0; i < n; ++i) {
node = nodes[i];
r = (node.radius || 0);
node.x = Math.max(Math.min(node.x, extent[0][1]-r), extent[0][0]+r);
node.y = Math.max(Math.min(node.y, extent[1][1]-r), extent[1][0]+r);
}
}
force.initialize = function(_) { nodes = _; };
force.extent = function(_) {
return arguments.length ? (extent = _, force) : extent;
};
return force;
};
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 395
- Avg merge
- 5h 46m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from d3/d3-force
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
-
`README` links to deprecated notebookPossibly taken @hirehamir claimed this 1200 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
assistant-ui/assistant-ui#10496 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
ai bug design good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
neomjs/neo-agent-institution#927 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gramps-project/gramps-web#1671 ·
Maintainers usually reply within 1 day
-
bug good first issue priority: P2 status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RhinoLink-Tech/data-fabric#502 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
cline/mcp-marketplace#3708 ·