pri_dev
pri_dev

Reputation: 11645

Fusion Charts getting timed out

I have page with multiple charts rendered using fusion charts and I am pulling large amount of data from the database for populating them. Some of the charts are getting timed out and have a continuous spinner, http request get aborted. the same chart shows up if the url for that chart is seperately run in the browser. I have increased the timeout value for jquery.ajax call but that is not working, I am assuming the time out occurs at the flash player level.Anyways to handle this timeout issue?

Upvotes: 0

Views: 1472

Answers (1)

Shamasis Bhattacharya
Shamasis Bhattacharya

Reputation: 3502

There are various reasosn why this might happen and there are a number of workarounds as well.

  1. Are you using the latest version of FusionCharts? If not, then upgrading would be a good idea. The newer JavaScript framework of FusionCharts uses AJAX to fetch data. This might turn out to be more stable and reliable for you. If you are already using latest version, check that you are not using any deprecated API (like .setDataURL) and that you are not using pure HTML embedding method.
  2. It might also be that you are trying to put too many data-points than recommended and the load is simply too much for all charts to render. generally, the charts render fine with 300 to 500 points (and even higher if the configuration is simple.) Pie charts are useful upto a 100 points. If you have too much data, try using the ZoomLine chart.
  3. Other reason can be network load. Too much data trying to concurrently load is causing the browser to abort / timeout connections. Are you on a slow connection or an older browser? Try chain-loading the charts in a staggered manner (i.e. when one chart fires FC_Rendered event, render the next one... and so on.)
  4. You can also try fetching data directly using jQuery AJAX and when all data is loaded, you may start rendering the charts by feeding data as XML string using .setXMLData().

You can also check whether this occurs even you are using JavaScript variant of the charts. If not then you may stick to using it.

PS: Answering this way late... but if you are still in the loop, it may help. :P

Upvotes: 2

Related Questions