data-pie='{
"percent": 75
}'
// css
[data-pie-index='2'] {
position: relative;
border-radius: 50%;
box-shadow: inset 0 0 25px 10px #a2caff;
}
// html
data-pie='{
"percent": 75
}'
data-pie='{
"percent": 75,
"colorSlice": "#BF360C",
"colorCircle": "#f1f1f1",
"fontWeight": 100
}'
data-pie='{
"lineargradient": ["yellow","#ff0000"],
"round": true,
"percent": 75,
"colorCircle": "#e6e6e6"
}'
data-pie='{
"inverse": true,
"percent": 75,
"colorSlice": "#AB47BC",
"colorCircle": "#f1f1f1",
"fontWeight": 100
}'
data-pie='{
"strokeDasharray": "1, 2",
"percent": 75,
"colorSlice": "#F5F5F5",
"colorCircle": "#424242",
"stroke": 5,
"strokeBottom": 10,
"round": true
}'
data-pie='{
"animationOff": true,
"percent": 75,
"colorSlice": "#CDDC39",
"colorCircle": "#f1f1f1",
"fontWeight": 100
}'
data-pie='{
"number": false,
"percent": 75,
"colorSlice": "#000",
"colorCircle": "#e6e6e6"
}'
data-pie='{
"rotation": 90,
"percent": 75,
"colorSlice": "#ff8c69",
"colorCircle": "#f1f1f1",
"fontWeight": 100
}'
data-pie='{
"fill": "#EFEBE9",
"percent": 75,
"stroke": 6,
"strokeBottom": 10,
"colorSlice": "#4E342E",
"colorCircle": "#EFEBE9",
"fontSize": "1.3em",
"round": true
}'
data-pie='{
"unit": "PL",
"percent": 75,
"stroke": 5,
"strokeBottom": 10,
"colorSlice": "#fff",
"colorCircle": "#F50057",
"round": true
}'
data-pie='{
"strokeBottom": 5,
"percent": 75,
"colorSlice": "#EC407A",
"colorCircle": "#f1f1f1",
"round": true
}'
data-pie='{
"speed": 30,
"percent": 75,
"colorSlice": "#DD2C00",
"colorCircle": "#f1f1f1",
"round": true
}'
data-pie='{
"cut": 30,
"percent": 75,
"rotation": 144,
"colorSlice": "#F50057",
"colorCircle": "#f1f1f1",
"textPosition": "1em",
"fontSize": "1.2rem"
}'
data-pie='{
"textPosition": "1.5em",
"percent": 75,
"colorSlice": "#880E4F",
"colorCircle": "#f1f1f1",
"fontSize": "1em"
}'
// css
[data-pie-index='16'] {
position: relative;
border-radius: 50%;
box-shadow: inset 0 0 25px 10px #f50057;
}
.heart {
position: absolute;
font-size: 3rem;
margin: auto;
width: 100%;
bottom: 45px;
text-align: center;
animation: heart 0.8s linear infinite;
text-shadow: 0px 0px 10px #f50057;
}
@keyframes heart {
0% {
transform: scale(1.07);
}
80% {
transform: scale(1);
}
100% {
transform: scale(0.8);
}
}
// html
data-pie='{
"percent": 75,
"textPosition": "0em",
"colorSlice": "#FF1744",
"colorCircle": "#fff",
"stroke": 5,
"strokeBottom": 10,
"strokeDasharray": "1, 3",
"fontSize": "1.2rem",
"fontWeight": 600,
"round": true
}'
<script>
setInterval(() => {
const typeFont = [100, 200, 300, 400, 500, 600, 700];
const colorHex = `#${Math.floor((Math.random() * 0xffffff) << 0).toString(16)}`;
const options = {
index: 16,
percent: Math.floor((Math.random() * 100) + 1),
colorSlice: colorHex,
fontColor: colorHex,
fontSize: `${Math.floor(Math.random() * (1.4 - 1 + 1) + 1)}rem`,
fontWeight: typeFont[Math.floor(Math.random() * typeFont.length)]
}
circle.animationTo(options);
}, 3000);
</script>
data-pie='{
"animationSmooth": "1s ease-out",
"percent": 75,
"colorSlice": "#6200EA",
"colorCircle": "#f1f1f1"
}'
// html
data-pie='{
"percent": 75
}'
// js
const globalConfig = {
index: 58,
speed: 30,
animationSmooth: "1s ease-out",
strokeBottom: 5,
colorSlice: "#FF6D00",
colorCircle: "#f1f1f1",
round: true
}
const global = new CircularProgressBar('global', globalConfig);