SVG饼图与零件转换有关的问题

问题描述

我试图完全只使用svg制作饼图,但是我无法使用转换来安排饼图。

你能帮我吗?

<svg height="100" width="100" viewBox="0 0 20 20">
<circle r="10" cx="10" cy="10" fill="#fff" fill-opacity="0.4"/>
<circle 
        r="5" 
        cx="10" 
        cy="10" 
        fill="transparent" 
        stroke="#b07318"
        stroke-width="10"
        stroke-dasharray="calc(79.99 * 31.4 / 100) 31.4"
        transform="rotate(-90) translate(-20)"
        >
        <title>Java 79.99%</title>
 </circle>
 <circle 
        r="5" 
        cx="10" 
        cy="10" 
        fill="transparent" 
        stroke="#f1e257"
        stroke-width="10"
        stroke-dasharray="calc(11.46 * 31.4 / 100) 31.4"
        transform="rotate(0) translate(0)"
        >
        <title>Javascript 11.46%</title>
 </circle>
 <circle 
        r="5" 
        cx="10" 
        cy="10" 
        fill="transparent" 
        stroke="#2d7489"
        stroke-width="10"
        stroke-dasharray="calc(6.30 * 31.4 / 100) 31.4"
        transform="rotate(0) translate(0)"
        >
        <title>Typescript 6.30%</title>
 </circle>
  <circle 
        r="5" 
        cx="10" 
        cy="10" 
        fill="transparent" 
        stroke="#e34c26"
        stroke-width="10"
        stroke-dasharray="calc(1.88 * 31.4 / 100) 31.4"
        transform="rotate(0) translate(0)"
        >
        <title>Html 1.88%</title>
 </circle>
  <circle 
        r="5" 
        cx="10" 
        cy="10" 
        fill="transparent" 
        stroke="#563d7b"
        stroke-width="10"
        stroke-dasharray="calc(0.28 * 31.4 / 100) 31.4"
        transform="rotate(0) translate(0)"
        >
        <title>Css 0.38%</title>
 </circle>
</svg>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)