{"id":3123,"date":"2014-03-16T22:55:30","date_gmt":"2014-03-16T22:55:30","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/highcharts-does-not-resize-charts-inside-tabs-collection-of-common-programming-errors-2\/"},"modified":"2014-03-16T22:55:30","modified_gmt":"2014-03-16T22:55:30","slug":"highcharts-does-not-resize-charts-inside-tabs-collection-of-common-programming-errors-2","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/16\/highcharts-does-not-resize-charts-inside-tabs-collection-of-common-programming-errors-2\/","title":{"rendered":"Highcharts does not resize charts inside tabs-Collection of common programming errors"},"content":{"rendered":"<p>This is my fix for this (using jQuery):<\/p>\n<pre><code>$.each($(\"[data-highcharts-chart]\"), function () {\n    var highChart = Highcharts.charts[$(this).data('highchartsChart')];\n    var highChartCont = $(highChart.container).parent();\n    highChart.setSize(highChartCont.width(), highChartCont.height());\n    highChart.hasUserSize = undefined;\n});\n<\/code><\/pre>\n<p>Call this function whenever the chart gains focus to make sure it is resized properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is my fix for this (using jQuery): $.each($(&#8220;[data-highcharts-chart]&#8221;), function () { var highChart = Highcharts.charts[$(this).data(&#8216;highchartsChart&#8217;)]; var highChartCont = $(highChart.container).parent(); highChart.setSize(highChartCont.width(), highChartCont.height()); highChart.hasUserSize = undefined; }); Call this function whenever the chart gains focus to make sure it is resized properly.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3123","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3123"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3123\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}