nvd3 Change the chart width (wrapper div of chart) after the chart is paint the chart doesnt refreshed
<p>I trying to change the chart's width according to some parametres I get from server.</p>

<p>The chart width is changed ( I can see that by inspecting the element) but doesnt change in the UI.</p>

<pre><code> &lt;div class="outer"&gt;
      &lt;div class="inner"&gt;
        &lt;nvd3 options="options2" data="data2"&gt;&lt;/nvd3&gt;
      &lt;/div&gt;
 &lt;/div&gt;

div.outer { overflow: scroll; }
div.outer .inner { width: 500px; }

$scope.clickme = function(){
    var chartWidth = peopleNumbers * 200000 + "px";
    document.getElementsByClassName("inner")[0].style.width = chartWidth;
}
</code></pre>

<p>if i set it to conastant somethimes it refresh in UI too  </p>

<pre><code>document.getElementsByClassName("inner")[0].style.width = "20000px";
</code></pre>