My issue sounds very similar to the one here.
I have 4 highcharts wrapped in a <div>
inside a .tab-pane
. Each .highcharts-container
slightly overextends the width of it's parent. I have attempted to set the width of the chart to 100% but truncates the chart which is not ideal.
HTML
<div class="tab-pane maxHeight" id="show_graph">
<div class="row maxHeight maxWide">
<div class="bottomWrapperTable col-md-12 col-sm-12 col-lg-12 col-xs-12 noPadLeft noPadRight">
<div class="row">
<div id="graph_bar_month" class="graph col-lg-6 col-md-6 col-sm-6"></div>
<div id="graph_bar_teamPercent" class="graph col-lg-6 col-md-6 col-sm-6"></div>
<div id="graph_line_year" class="graph col-lg-6 col-md-6 col-sm-6"></div>
<div id="graph_bar_teamActual" class="graph col-lg-6 col-md-6 col-sm-6"></div>
</div>
</div>
</div>
</div>
Like the issue I have linked to, this error only occurs on page load. For example, I can resize the page and maximise it again and it will be fine. I have attempted to invoke the reflow()
method to fix this as mentioned in one of the answers in that question. (Used comment and this jsFiddle to create it)
jQuery
$('.nav-pills').on('click', function() {
if($('#show_table').hasClass('active')) {
$('.bottomWrapperTable').find('.graph').each(function() {
$(this).highcharts().reflow();
});
}
});
This solution has not solved it.
Any help appreciated.