jQuery UI Tabs and Highcharts display/rendering issue

前端 未结 13 2343
长发绾君心
长发绾君心 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:13

    Hi see my fiddle jsfiddle

    ...
    $("#tabs").tabs();
    var ids = ['chart-1', 'chart-2', 'chart-3'];
    for (var i = 0, j = ids.length; i < j; i++) {
        if ((container = $('#'+ids[i])).size()) {
            if (container.width()==0) {
                container.width(container.actual('width'));   
            }
    
            oclone = $.extend({}, options);
            oclone.chart.renderTo = ids[i];
            new Highcharts.Chart(oclone);
        }
    
    }
    ...
    

提交回复
热议问题