I am working on Highcharts. I also used Bootstrap for tabs. I have two charts, and each one of the chart I want to show in the different tab. Somehow I am getting correct first chart in the first tab. But second tab is empty. Please find below my code.
HTML
<div class="container">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#home">Quarterly</a></li>
<li><a data-toggle="tab" href="#menu1">Waterline</a></li>
</ul>
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<br/><br/>
<select id="dropdown">
<option>Portfolio</option>
</select>
<br/><br/><br/>
<div class="left" id="left" style="width: 790px; height: 400px; margin: 0 auto"></div>
</div>
<div id="menu1" class="tab-pane fade">
<div class="right" id="right" style="width: 790px; height: 400px; margin: 0 auto"></div>
</div>
</div>
</div>
JS
$('#home').click(function () {
alert("left");
$('#left').highcharts().reflow();
});
$('#menu1').click(function () {
alert("right");
$('#right').highcharts().reflow();
});
Also, if you can see I've given alert messages also. It is not running at all? Though first tab is working fine.
Please suggest. TIA.
RESOLVED: From here: Why are Bootstrap tabs displaying tab-pane divs with incorrect widths when using highcharts?