Sign in to follow this  
rs1980

Real Time Chart Simulation For Pie

Recommended Posts

Hi,

I know pie is not listed as real time widget but was wondering if someone has tried to simulate a real time charting using pie. The idea is that the chart shows the updated value without refreshing the page.

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi,

 

A warm welcome to FusionCharts Forum! smile.gif

 

This is not possible. Implementing Pie chart with real-time capabilities in not possible. sad.gif

 

Thanks for your time and support.

Share this post


Link to post
Share on other sites

The idea is that the chart shows the updated value without refreshing the page.

 

In case, you would only need to update a pie chart with new data focusing on "without refreshing the page" it can be easily achieved using JavaScript and chart's inbuilt AJAX capabilities (or if required use of AJAX through third party frameworks).

 

I would want to elaborate on the implementation steps required:

 

As you know that a chart can load data from a data providing URL (we call it Data URL method) without refreshing the page using inbuilt AJAX capabilities, all you would need to do is:

 

1. Render a chart

2. Once the render is complete, set a timer or interval (window.setInterval/window.setTimout) to ask the chart to fetch new data from a Data URL using setXMLUrl or setJSONUrl JavaScript function of the chart. This would use AJAX to update chart's data without refreshing the page.

3. Repeat step 2 as per your required refresh interval, this will be automatically done in case you use window.setInterval - the native JavaScript API.

 

Again, if you do not wish to use Data URL method, you can simply use AJAX methods using native JavaScript or some other framework like jQuery and get data as String/text from a URL. Once received, pass the data as XML/JSON to the chart using setXMLData or setJSONData function of the chart.

Share this post


Link to post
Share on other sites

Hi Sudipto

 

Thanks. We tried this option, but it actually slows down the page load and sometime you can see the pie chart rendering (i.e. show on/off). Which does not simulate real time unlike other charts.

Any other suggestions?

I think making pie and other charts real time should be a top priority for the company.

 

Rahul

In case, you would only need to update a pie chart with new data focusing on "without refreshing the page" it can be easily achieved using JavaScript and chart's inbuilt AJAX capabilities (or if required use of AJAX through third party frameworks).

 

I would want to elaborate on the implementation steps required:

 

As you know that a chart can load data from a data providing URL (we call it Data URL method) without refreshing the page using inbuilt AJAX capabilities, all you would need to do is:

 

1. Render a chart

2. Once the render is complete, set a timer or interval (window.setInterval/window.setTimout) to ask the chart to fetch new data from a Data URL using setXMLUrl or setJSONUrl JavaScript function of the chart. This would use AJAX to update chart's data without refreshing the page.

3. Repeat step 2 as per your required refresh interval, this will be automatically done in case you use window.setInterval - the native JavaScript API.

 

Again, if you do not wish to use Data URL method, you can simply use AJAX methods using native JavaScript or some other framework like jQuery and get data as String/text from a URL. Once received, pass the data as XML/JSON to the chart using setXMLData or setJSONData function of the chart.

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