Remy

Angular Gauge - Dial position does not update after setJSONData()

Recommended Posts

Greetings!

 

We have encountered an issue while upgrading from FusionCharts 3.3.1 SR1 to FusionCharts 3.11. We use an approach where we first render an empty chart, then obtain chart data through an Ajax call, and finally set this data through the setJSONData() function. Previously, this approach seemed to work without issue. However, after updating to FusionCharts 3.11, the angular gauge dial no longer moves to the appropriate location.

 

I have created a fiddle that showcases this issue: http://jsfiddle.net/f5cv6sby/

 

Would this be considered a bug?

 

We can work around the issue by calling render() on the chart again, but this feels a bit hacky.

 

Kind regards,

Remy

Share this post


Link to post
Share on other sites
Hello Remy,


 

Your requirement is achievable.

 

You don't need to call the  render() function again. Please call the render() function once, after setJSONData(myChartData) ie.

 

setJSONData(myChartData)

myChart.render("chart-container");


 

Kindly refer the fiddle below for the implementation.


 

Hope this helps,

Thanks,

Edited by Prerana

Share this post


Link to post
Share on other sites

Dear Prerana,

 

Thank you for your feedback! Unfortunately, your proposed solution would not work in our situation.

 

As I mentioned in my first post, we obtain the JSON chart data through an Ajax call, i.e. asynchronously. Therefore, calling render() after setJSONData() will not accomplish much. An example can be seen in this fiddle, where I take the liberty of using setTimeout() to simulate the asynchronous behavior of an Ajax call: http://jsfiddle.net/f5cv6sby/3/

 

While I could call render() inside the timeout callback, doing so seems undesirable. We sometimes push new data to an existing chart, so having render() inside the Ajax callback would force FusionCharts to redraw the entire chart, even though we only want to update the chart's data. Moreover, it seems strange that only the angular gauge dial is not updated properly after calling setJSONData() - the other chart types we support do not suffer from any such issues after receiving new JSON data.

 

Eagerly awaiting your feedback!

 

Kind regards,

Remy

Edited by Remy

Share this post


Link to post
Share on other sites

Hello Remy,


 


We are glad to inform you that - 


 


FusionCharts 3.12.0 release is available now. You can download latest files from PUC portal: http://puc.fusioncharts.com/

 

You can also download evaluation version, using this link: http://www.fusioncharts.com/download/

 


 

The issue reported by you has been fixed, kindly check this fiddle for the same.

 

Please revert back to us if you have any queries.

Share this post


Link to post
Share on other sites

Hello,

Hope you are doing well.

We are glad to inform you that FusionCharts v3.12.1 release is available now.

You can download latest files from PUC portal: http://puc.fusioncharts.com/

You can also download evaluation version, using this link: http://www.fusioncharts.com/download/

Version History link: http://www.fusioncharts.com/version-history/

Please check for the issues reported and revert back to us if you have any queries.

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