d3 / d3-shape

Graphical primitives for visualization, such as lines and areas.
https://d3js.org/d3-shape
ISC License
2.48k stars 310 forks source link

Selected Rounding of Corners in Arc #160

Open dtrinh100 opened 4 years ago

dtrinh100 commented 4 years ago

Hi, I would love to see the ability to round only specific corners in an arc. Right now, I know we have the ability to round all corners using cornerRadius, but most of the time I find myself only wanting to round 2 corners, rather than all of them.

mbostock commented 4 years ago

Mind sharing a visual example of what you want?

dtrinh100 commented 4 years ago

Sure, so something like this:

rounded arcs(1)

The way that I am doing something like this in D3 right now is using the arc generator to generate 2 non overlapping arc, then adding a rounded corner to said arcs, but this creates an issue where the arcs that meet each other is also rounded, which is not exactly what I want.