Skip to content

Unexpected arcs when corner radius is nonzero #199

@tkonopka

Description

@tkonopka

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions