title: How to trigger resize event using nvd3?
body: <p>I need to now how to trigger the resize event on nvd3 for AngularJS.</p>
  
  <p>The problem is that I have made line breaks on the labels within the piechart and when I resize the window, the labels return to their original state(1 line).</p>
  
  <p>And I want it to break the line every time it triggers the resize event.</p>
  
  <p>This is my <strong>html</strong>:</p>
  
  <pre><code>&lt;nvd3 on-ready="ctrl.onReadyPie('id')" options='ctrl.pieChartOptions' data='ctrl.data'&gt;
  &lt;/nvd3&gt;
  </code></pre>
  
  <p>The function <code>onReadyPie</code> makes the line breaks:</p>
  
  <pre><code>function onReadyPie(id){            
      var svg = d3.selectAll('#' + id + ' svg g text');
      svg.each(function(){
          var el = d3.select(this),
              lines = el.html().split(' / ');
          el.text('');
          for(var i = 0; i&lt;lines.length; i++){
              var tspan = el.append('tspan').text(lines[i]);
              if(i&gt;0){
                  tspan.attr('x', 0).attr('dy', 15);
              }
           }
       })
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BjMfv.png" rel="nofollow noreferrer">This is the current behavior</a></p>