title: Increase circle size depend on text inside SVG
body: <p>I am trying to create circle SVG with text inside. 
  I created following with text. But, when i text digit increase i want to scale svg circle. </p>
  
  <p>I created following yet.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;svg height=22 viewBox="0 0 18 18" width=22&gt;
      &lt;circle cx="10" cy="10" fill="#49f9b9" r="7" stroke="black" stroke-width="1" /&gt;
      &lt;text x="55%" y="50%" text-anchor="middle" dy="0.45em" font-size="11" fill={textcolor}&gt;5&lt;/text&gt;
    &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But, now i want to create big circle if value increase. Suppose 10 or 100 or 5000 then i want to increase circle depend on it.</p>
  
  <p>Something like below. I limited value till 4 decimal.</p>
  
  <p><a href="https://i.stack.imgur.com/eCfDl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eCfDl.png" alt="enter image description here"></a></p>
  
  <p>If I pass value in 4 digit then it goes outside circle.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;svg height=22 viewBox="0 0 18 18" width=22&gt;
          &lt;circle cx="10" cy="10" fill="#49f9b9" r="7" stroke="black" stroke-width="1" /&gt;
          &lt;text x="55%" y="50%" text-anchor="middle" dy="0.45em" font-size="11" fill="#252525"&gt;5000&lt;/text&gt;
        &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried to find way to scale circle but couldn't.</p>
  
  <p>Any help would be greatly appreciated.</p>