title: Is it possible to change the fill color of an svg chart using javascript?
body: <p>In the backend, the following graph is being generated: </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 width="911.4" height="300"&gt;
       &lt;g transform="translate(40,20)"&gt;
       &lt;g&gt;
       &lt;g fill="#6d6e71"&gt;
       &lt;rect x="1" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="66" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="131" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="196" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="261" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="326" y="159" height="21" width="62" fill="#6d6e71"&gt;&lt;/rect&gt;
       &lt;rect x="391" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="456" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="521" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="586" y="161" height="19" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="651" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="716" y="166" height="14" width="62"&gt;&lt;/rect&gt;
       &lt;rect x="781" y="180" height="0" width="62"&gt;&lt;/rect&gt;
       &lt;/g&gt;
       &lt;/g&gt;
       &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there a way I could change the <code>fill="#6d6e71"</code> value in the frontend just using javascript? </p>