Currently, we pass a URL (data parameter) to the OFC2 charts pointing to a data feed.
Proposal: - use AJAX to retrieve the data and then pass the data to the Flash object via its load() method
Benefits: - increase browser responsiveness when changing date or site; some users report the browser stalls while loading data - better handle an invalid session, e.g., where user no longer logged in; see #975 - decouples data feed retrieval from the flash object; potentially allows for non-flash, client-side charts to re-use the ofc data feed - could be extended to make a single request to the server for all the data feeds on that page
I would even suggest that, instead of using an ajax request, we could directly load the graph JSON data in the HTML calling the flash, and set this data to the graph object. This means that, to show the graph, you would just need one http request to request widget+graph data, + one request to fetch the SWF file if not already in cache.
In , refs #997 - set content-type to application/json for OFC data feed
ToDo: - fix Widgetize (needs the data URL for embedding OBJECTs) - replace sendHttpRequest() with ... ???
In , refs #997 - reorder params slightly
In , refs #997 - add config option; allow users to revert to previous behavior