Javascript 如何使用幻灯片效果修改Highchart大小

Javascript 如何使用幻灯片效果修改Highchart大小,javascript,jquery,css,charts,highcharts,Javascript,Jquery,Css,Charts,Highcharts,我在同一页的两列中有多个图表,我有一个使用jqueryanimate()向右滑动的按钮,左列图表隐藏右列图表 我的问题是: 使用函数chart.reflow()我只能在动画结束时调整图表的大小,这并不漂亮 另一个问题是,回流时,饼图上的.brighting()属性丢失(仅在饼图上) 用我的小提琴举一个小例子来描述我的问题: $('#resize').click(function(){ $('#first').animate({ width : '100%' },

我在同一页的两列中有多个图表,我有一个使用jquery
animate()
向右滑动的按钮,左列图表隐藏右列图表

我的问题是:

使用函数
chart.reflow()
我只能在动画结束时调整图表的大小,这并不漂亮

另一个问题是,回流时,饼图上的
.brighting()
属性丢失(仅在饼图上)

用我的小提琴举一个小例子来描述我的问题:

$('#resize').click(function(){
    $('#first').animate({
        width : '100%'
    }, 600);
    $('#second').animate({
        width : 'toggle',
        opacity : 'toggle'
    }, 600).queue(function(){
        $('#first').highcharts().reflow();
    });
});


谢谢你的帮助

看起来您需要使用


谢谢,这正是我要搜索的!我在整个dqy期间都在找它!
    $('#resize').click(function(){
    $('#first').animate({
        width : '100%'
    },{
    duration: 600,
    step: function() {
      $('#first').highcharts().reflow();
    }
    });

    $('#second').animate({
        width : 'toggle',
        opacity : 'toggle'
    }, 600).queue(function(){
        $('#first').highcharts().reflow();
    });
});