title: Yii refresh Tab data on Tab Active
body: <p>I am working on Yii application and using Tabs to show chart and data.
  my code is as bellow</p>
  
  <pre><code>&lt;ul class="nav nav-tabs"&gt;
             &lt;li class="active"&gt;
              &lt;a href="#tab-graph” data-toggle="tab"&gt;
               &lt;?php echo Yii::t('li', ‘Graph’);?&gt;
                 &lt;/a&gt;
               &lt;/li&gt;
                &lt;li&gt;
                 &lt;a href="#tab-overview" data-toggle="tab"&gt;
                   &lt;?php echo Yii::t('li', ‘Overview');?&gt;
                    &lt;/a&gt;
                      &lt;/li&gt;
                &lt;/ul&gt;
  
  
  &lt;div class="tab-content"&gt;
        &lt;div class="tab-pane active" id="tab-graph"&gt;
    &lt;?php
    $this-&gt;renderPartial(‘graph/graph’);
    ?&gt;
  &lt;/div&gt;
  &lt;div class="tab-pane" id="tab-overview"&gt;
    &lt;div&gt; here is status&lt;/div&gt;
    &lt;div&gt; 10%&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>in first tabe i am renderPartial the file which show YII graph, but the issue is when i click on next tab and come back to first tab, graph dissappear.</p>
  
  <p>i think YII graph did't like tabs and hide.</p>
  
  <p>how to make the graph active on first tab when click away and come back ?
  or
  i want to refresh the tab and render again to show graph.</p>
  
  <pre><code>&lt;script&gt;
  $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
    var target = $(e.target).attr("href")
  
    if(target=="#tab-graph"){
      //alert(target);
      location.reload();
    }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>i have done this uing jquery but this refresh all page, but i only need to show graph or only refresh the tab not all page.</p>
  
  <p>Thanks</p>