Skip to content
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

Unexpected arcs when corner radius is nonzero #199

Closed
tkonopka opened this issue May 27, 2022 · 1 comment
Closed

Unexpected arcs when corner radius is nonzero #199

tkonopka opened this issue May 27, 2022 · 1 comment
Labels
bug Something isn’t working

Comments

@tkonopka
Copy link

Hello and thank you for providing this library.

I traced some unexpected behavior in another library (reported here) to arcs in d3-shape. It only affects extremely short arcs when cornerRadius is nonzero.

In this example, the first two rows show expected behavior. In the third row, the angles are very similar, and the generated arcs are invisible (as expected). The angles are even more similar in the fourth row, but one of the arcs flips direction (unexpected).

This is not too much bother because it is straightforward to filter out such arcs before rendering, but mentioning it here as a curiosity.

https://codesandbox.io/s/dry-pine-7m88p9?file=/src/App.js

@mbostock
Copy link
Member

Reproduction https://observablehq.com/d/41da02e4ede0cabc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Development

No branches or pull requests

2 participants