O
O
Outoverlay2016-03-05 13:25:36
JavaScript
Outoverlay, 2016-03-05 13:25:36

There is a circle on svg, how to color it?

There is radius = 57, there is stroke-dasharray = 358 (found by selection).
I'm not strong in mathematics, and I'm interested in how you can find the same value from formulas.

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 200 200" preserveAspectRatio="none" class="progress">
<circle cx="100" cy="100" r="57" id="ac-c-bar" fill="none" stroke="#d1d1d1" stroke-width="2" stroke-dasharray="358, 358" transform="rotate(-90,100,100)"></circle>
<circle cx="100" cy="100" r="57" id="ac-c-progress" fill="none" stroke="#28aa6e" stroke-width="2" stroke-dasharray="358, 358" transform="rotate(-90,100,100)"></circle>
</svg>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Zuev, 2016-03-05
@Outoverlay

2 * Pi * radius
Sandbox

N
name surname, 2016-03-05
@symbol

fill="#ffff00"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question