Sign in to follow this  
chadm

Real Time With Json Updates

Recommended Posts

Hello,

 

 

Let me start with saying I am new to Fusion Charts. I am looking for a good example of an angular guage using a JSON object to refresh the data with animations.

 

 

The goal is to not have the guage pull for updates - I want the server to push to the client page and have the page refresh the guage data with animation.

 

 

Any suggestions to point me in the right direction?

 

 

Thanks!

 

 

 

Chad

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum ! :D

 

You can not feed JSON values as realtime update. However, you can make use of a number of JavaScript functions to update data of the angular gauge.

 

For example, you may use feedData function that takes a string to update chart gauge. The format of the string is same as the output expected from a realtime data streaming URL i.e., querystring format.

 

Example: myGauge.feedData("&value=10");

 

The other API s are (name and parameters):

 

a) setData(dialIndex, value)

 

B) setDataForId(dialId, value)

 

 

A complete list of APIs:

 

http://docs.fusioncharts.com/widgets/?Angular/JSAPI.html

 

More examples:

http://docs.fusioncharts.com/widgets/?JavaScript/JS_ChangeData.html#rt

 

 

The gauge in this example makes use of feedData function.

Share this post


Link to post
Share on other sites

It took some review.

 

 

I now have an angular guage rendered with javascript. The page subscribes to a web service that pushes data.

 

 

The client page recieves pushed JSON objects and updates the guage with animations turned on and no reloading.

 

 

 

Works good.

Edited by chadm

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