Created
November 14, 2015 06:22
-
-
Save jkeck/eddbac03eb746fe4e98b to your computer and use it in GitHub Desktop.
Simple SVG Pie Chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg { | |
width: 100px; | |
border-radius: 50%; | |
background:yellowgreen; | |
transform: rotate(-90deg); | |
} | |
circle { | |
fill: none; | |
stroke-width: 32; | |
r: 16; | |
cx: 16; | |
cy: 16; | |
} | |
circle.first { | |
stroke: deeppink; | |
} | |
circle.second { | |
stroke: #fb3; | |
} | |
circle.third { | |
stroke: black; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg viewBox="0 0 32 32"> | |
<circle class='first' stroke-dasharray="75 100"></circle> | |
<circle class='second' stroke-dasharray="50 100"></circle> | |
<circle class='third' stroke-dasharray="24 100"></circle> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It perfect work in FF! Only add PX in rule.
and CSS
`