Arc example
See original GitHub issueI’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:
- Created 3 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
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 👍