jQuery UI Tabs and Highcharts display/rendering issue

前端 未结 13 2373
长发绾君心
长发绾君心 2020-12-28 18:57

Anyone ever used the tabs (jquery-ui-1.8.9) and pie charts from Highcharts 2.1.4 together? To put it simply, I have multiple tabs, where each tab s

13条回答
  •  清歌不尽
    2020-12-28 19:28

    The second chart may be off because it sounds like it is hidden when you draw it. Try to draw the chart upon selection.

    Here is some pseudo code to give you an idea of what I imagine. This is not tested.

    $("#tabs").tabs({
      select: function(event, ui) {
         var chart = new Highcharts.Chart({
          chart: {
           renderTo: ui.panel.id,
           // blah blah
          }
         });
    
      }
    });
    

提交回复
热议问题