250x250
Notice
Recent Posts
Recent Comments
Link
Chanho_Park
donut chart 도넛차트 그리기 css 본문
728x90
<div class="flex-wrapper">
<div class="single-chart">
<svg viewBox="0 0 36 36" class="circular-chart orange">
<path class="circle-bg"
d="M18 2.0845
a 15.9155 15.9155 0 0 1 0 31.831
a 15.9155 15.9155 0 0 1 0 -31.831"
/>
<fmt:formatNumber var="ee" type="number" maxFractionDigits="0" value="${sell_Money/purchase_Money }" />
<path class="circle"
stroke-dasharray="${ee }, 100"
d="M18 2.0845
a 15.9155 15.9155 0 0 1 0 31.831
a 15.9155 15.9155 0 0 1 0 -31.831"
/>
<text x="18" y="20.35" class="percentage">${ee }%</text>
</svg>
</div>
</div>
/* 목표 */
.flex-wrapper {
display: flex;
flex-flow: row nowrap;
}
.single-chart {
width: 33%;
justify-content: space-around ;
}
.circular-chart {
display: block;
margin: 10px auto;
max-width: 80%;
max-height: 250px;
}
.circle-bg {
fill: none;
stroke: #eee;
stroke-width: 3.8;
}
.circle {
fill: none;
stroke-width: 2.8;
stroke-linecap: round;
animation: progress 1s ease-out forwards;
}
.circular-chart.orange .circle {
stroke: #ff9f00;
}
.percentage {
fill: #666;
font-family: sans-serif;
font-size: 0.5em;
text-anchor: middle;
}
728x90
'CSS' 카테고리의 다른 글
[CSS] div 수직 , 수평 정렬 (0) | 2022.11.21 |
---|---|
[JQuery] Modal 관련 Css (0) | 2022.11.20 |
[JQuery] 엔터 누를 때 작동되게 하는 법 (0) | 2022.11.20 |