javascript - Can I transition one pie chart into a different one using a fade? -
i'm using highcharts v.2.3.3 , have built pie chart. when user clicks on something, can replace chart different one, replacing happens instantaneously. there way have first pie chart fade out while new pie chart fades in, there "blur" effect?
note: first pie chart gets deleted before new chart gets built.
i found solution. used jquery clone svg element of first chart , appended div absolutely positioned on chart area. used "dummy" chart fade out animation without needing fade in second chart.
var clonedchart = $('#chartcontainer').find('svg').clone(); $('<div class="cloned_chart"></div>').append(clonedchart).appendto('#piechartwrapper'); // delete first chart , create second 1 .... // chart creation callback $('.cloned_chart').fadeout('slow', function(){ $(this).remove(); });
Comments
Post a Comment