N
N
Niko Frost2015-09-25 00:16:57
css
Niko Frost, 2015-09-25 00:16:57

How to make a pie chart with pure CSS?

I want to do this:
5eedd7cd91b64d47999d5dc6903fb118.png
But the problem is that I can't make a blue stripe around a gray one.
The gray one is an empty chart (0%)
The blue one is already with data for example (27%, 84% or 47%....)
Update: I'm sorry, I didn't formulate my question correctly. I made a gray diagram, but the problem is that now I want to put a blue one on it with a class. This is where the problem is. Doesn't come out at all.
Let's say there is:
<div class="circle">37%</div>
And now you still need to carry a class on it, so that it would turn out like in the picture.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Azim Kurt, 2015-09-25
@Frosty88

If you do what you want, i.e. set an arbitrary percentage in such a construction
Alternatively, you can do it using svg

D
Deodatuss, 2015-09-25
@Deodatuss

or 100 preprocessor-generated classes using css or svg triangles or a sprite for 100 images))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question