.donut-chart-block {
overflow: hidden;
}
.donut-chart {
position: relative;
width: 200px;
height: 200px;
margin: 2rem auto;
border-radius: 100%
}
.donut-chart .center {
background: #00ced1;
position: absolute;
top: 30px;
left: 30px;
height: 140px;
width: 140px;
border-radius: 70px;
}
.clip {
border-radius: 50%;
clip: rect(0px, 200px, 200px, 100px);
height: 100%;
position: absolute;
width: 100%;
}
.item {
border-radius: 50%;
clip: rect(0px, 100px, 200px, 0px);
height: 100%;
position: absolute;
width: 100%;
font-family: monospace;
font-size: 1.5rem;
}
#section1 {
transform: rotate(0deg);
height: 200px;
}
#section1 .item {
background-color: #2b9a9e;
transform: rotate(90deg);
}
#section2 {
transform: rotate(90deg);
}
#section2 .item {
background-color: black;
transform: rotate(50deg);
}
#section3 {
transform: rotate(140deg);
}
#section3 .item {
background-color: gray;
transform: rotate(60deg);
}
#section4 {
transform: rotate(180deg);
}
<div class="container">
<div class="donut-chart-block block">
<div class="donut-chart">
<div id="section1" class="clip">
<div class="item" data-rel="21"></div>
</div>
<div id="section2" class="clip">
<div class="item" data-rel="39"></div>
</div>
<div id="section3" class="clip">
<div class="item" data-rel="31"></div>
</div>
<div id="section4" class="clip">
<div class="item" data-rel="9"></div>
</div>
<div class="center"></div>
</div>
</div>
</div>
Please help me to create this shape with css.
I got the cirle code from stackoverflow. I have created circle but I can't change size of particular part.
This is the code by using css in html. How to customize the graph. By using css in html in order to make the graphs parts particular size change, but the graph cannot be customized. how to customize it. It is possible to customize in css?