|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/27/2008 1:59:23 AM
Posts: 4,
Visits: 5
|
|
Are there any callback routines or anything to state that the XML has completed loading?
I need to display one chart after another is loaded. There's a total of 12 charts on my page and each represent a significant amount of load on the SQL Server backend. In order to reduce the load, I want to show each chart sequentially.
SetTimeout will not be sufficient as the time will vary significantly. I know Actionscript can communicate directly with Javascript so it would be possible.
Thanks in advance.
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/27/2008 1:59:23 AM
Posts: 4,
Visits: 5
|
|
A call back from the Flash to say it is finished loading is most likely there, I just want to know how I can access it from the Javascript so I can sequentially display these charts.
Anyone?
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 7/29/2008 12:15:49 PM
Posts: 2,001,
Visits: 474
|
|
We raise 2 events in FusionCharts free:
- Once when the chart is loaded (SWF)
- Once when the chart is rendered (SWF loaded, XML loaded, chart rendered)
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/27/2008 1:59:23 AM
Posts: 4,
Visits: 5
|
|
and how would I access such?
oChart.onChartRendered() = function () { //do something }
??
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: 7/29/2008 12:15:49 PM
Posts: 2,001,
Visits: 474
|
|
Please see http://www.fusioncharts.com/docs/Contents/JS_Overview.html
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/27/2008 1:59:23 AM
Posts: 4,
Visits: 5
|
|
Hi folks,
Just in case anyone was interested, this is how I implemented the sequential loading based on the example given. This assumes there to be HTML elements named myid1, myid2, myid3 up to the value of iMaxCharts. I could also have made it check for DOM objects to evaluate the maximum number of charts instead of the iMaxCharts variable.
var iChart = 1;
var iMaxCharts = 3;
function FC_Rendered(){
if (iChart <= iMaxCharts) {
var oChart = new FusionCharts("/Include/Charts/Column3D.swf", "chart_myid" + iChart, "100%", "100%", "0", "1");
oChart.setDataURL("MyXMLDataSource.aspx?chart=" + iChart);
oChart.render("myid" + iChart);
iChart++
}
}
onload = function() {
FC_Rendered()
}
|
|
|
|