question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’ve been using visx for some time now but I’ve never actually been able to render an Arc. I’m not sure whether it’s a bug or if I’m doing something wrong.

The Arc can be quite difficult to understand. It has tons of radius and angle attributes. Even when passing in random arguments like this:

<svg width={250} height={250}>
  <Arc
      startAngle={10}
      endAngle={180}
      innerRadius={30}
      cornerRadius={30}
      outerRadius={50}
      padAngle={10}
      padRadius={10}
      fill={"#FF0000"}
   ></Arc>
</svg>

I can’t get anything to show up. (Not even anything in Inspect Element which is why I have the feeling that it might just be a bug)

It’d be nice to have a simple example, which I could copy paste and then modify to understand what each attribute does.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ChamsBouzaienecommented, Feb 2, 2021

@thecodeah I know this is an old issue, but I thought maybe this will help someone who struggles with the arc component I have built a color wheel using the Arc component here

1reaction
gknappcommented, Feb 11, 2021

Thanks for the colour wheel example, been struggling to get anything but whole rings rendering from the Arc component, even with start and end angles specified.

I took to reading the source as well, to see why nothing rendered at first, then I satisfied the conditional by supplying a data prop.

Update: After tinkering with ChamsBouzaiene’s code, my mistake was to assume start and end angles were in degrees, when it appears they should be in radians? Arcs no longer drawing complete circles 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arc of a Circle – Explanation & Examples
An arc of a circle is any portion of the circumference of a circle. Hence, the circumference of a circle is the full...
Read more >
Arc - LearnAlberta.ca
In general, an arc is a portion of a curve. In mathematics, unless otherwise stated, an arc usually refers to a portion of...
Read more >
What is Arc in Math? Definition, Angle, Length, Circle, ...
So, the arc is the distance between any two points traced along its circumference. Let us understand this with the help of an...
Read more >
Arc - Math is Fun
Arc. Part of the circumference of a circle. Or part of any curve. ... Example: Sam loves this double door, and wants to...
Read more >
Arcs Examples - Shmoop
Example 3. What is the length of an arc with measure 78° and radius 5 m?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found