add optional angle radius parameter in curbeBezier `curveStep` curves
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- d3, javascript
- Domain
- data-visualization
Research direction
Start by reading the existing curveStep, curveStepBefore, and curveStepAfter implementations and their tests; the issue does not name file paths. Work out how an optional radius can keep the curve angle consistent across different segment lengths, including the short-distance case described in the edit. Done means the step curves support configurable smooth angles while preserving existing behavior when the radius is zero; add coverage for the illustrated curve variants and edge case.
Written by the indexing model from the issue text.
Description
Following #177, as suggested in https://github.com/d3/d3-shape/pull/177#issuecomment-809936541, it could be useful to have a curve similar to curveStep but with smooth angles:
An important note is that the curve angle should be identical whatever its length. This way we don't see curves duplication on nodes with many child of various link length:
Those curves could be named curbeBezierX and curbeBezierY as suggested in this example.
In fact, I think those curves could be included in curveStep, by adding an extra optional parameter allowing to define the angle radius, which is 0 by default.
This will also allow some customization. This is for instance large angle (ie curveStep(15)) and small angle (ie curveStep(5)) stepCurves, respectively:
Some other visuals to get the idea:
curveStep(10)
curveStepBefore(10)
curveStepAfter(10)
Edit: as pointed out by @Fil, the curve horizontal and vertical distance might be lower than twice the angle radius. In that case the radius remains the same, but angles stops before 90° in order to share the same tangential line. Example with several curves formed with curveStep(20), tangential line in red:
- Dominant language
- JavaScript
- Stars
- 2.5k
- Forks
- 307
- Avg merge
- 4h 16m
- 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-shape
-
Improve tree-shakingOpen
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
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 ·
-
beginner-friendly category:finding-titles community enhancement first-timers-only good first issue help wanted low hanging fruit micro-contribution type: task up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Berserk-hub150/skillhawk#264 · 1 comment ·
Maintainers usually reply within 4 days