Sign in to follow this  
jfetner

Chart Animation Not Working Correctly After Changing Attribute

Recommended Posts

I want to give the user of my chart the ability to view the data either as a pie or bar chart. I have a button that changes the chart type via the Fusion Chart jquery plugin. I also need to change the showLabels attribute when changing the chart type. Changing this attribute causes the animation of the chart to work incorrectly or not at all.

 

You can reproduce this bug using your own sample located here: http://docs.fusionch...ChangeType.html

 

Just change the updateChart js function from:

 

function updateChart()
{
$("#chartContainer").updateFusionCharts({ swfUrl: "../../../Charts/Pie3D.swf" });
}

To:

 

function updateChart()
{
$("#chartContainer").updateFusionCharts({ swfUrl: "../../../Charts/Pie3D.swf" });
$("#chartContainer").attrFusionCharts("showLabels", "1");
}

 

Is there any current work around for this bug?

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Please note that if you will update the chart type using "updateFusionCharts()" function, the chart will reload with the new chart type and hence the animation will work.

 

But, if you will update the chart attributes, the value will update, on the existing chart only. So the chart animation will not be shown, as the entire chart is not re-loading.

 

However, as a work around, you can dispose the chart and re-render the chart with the updated chart attributes, so that the chart will re-load in the browser with proper animation.

 

Hope I am able to clarify myself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this