|
|
|
Junior Member
      
Group: Forum Members
Last Login: 9/1/2008 1:39:58 AM
Posts: 10,
Visits: 15
|
|
hi,
here is a requirement for me
i need to load the multiple charts in a single jsp
and need to refresh every five minutes
This i am doing with ajax
can any body help on this
Thanks in advance
Regards
Ranadd
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 9/1/2008 1:39:58 AM
Posts: 10,
Visits: 15
|
|
any body reply
Regards
Ranadd
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/31/2008 6:21:18 AM
Posts: 8,
Visits: 13
|
|
Hai, The following way you can proceed.1. Devide your jsp page into number of iframs 2. create seperate page for each chart. 3. call all the various chart pages from various iframes of the main page. 4.Write one javascript function in the main page function refresh_page(){ var url=document.getElementById('frame_left').src; document.getElementById('frame_left').src=url; var url1=document.getElementById('frame_right').src; document.getElementById('frame_right').src=url; } 5.Call this function withen a specific interval say window.setInterval("refresh_page()", 30000); --so the frames will be refreshed withen say 30 seconds but the entire page will not refresh.
hi to all
|
|
|
|
|
Junior Member
      
Group: Forum Members
Last Login: 9/1/2008 1:39:58 AM
Posts: 10,
Visits: 15
|
|
Thanks for replying
Regards
Ranadd
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 4:19:22 AM
Posts: 885,
Visits: 1,422
|
|
| Hi, If you intend to use AJAX then the model would be different, or if you choose you might try exploiting AJAX like feature built in FusionCharts. This can be simply done using setDataURL() function of the charts. 1. Say you have 4 charts that you have rendered with ID's "MyChartId1", "MyChartId2","MyChartId3" and "MyChartId4". Please render the charts with register With JS option set to true/1. 2. Say you have the XML generating URL as "dataGen.jsp" and pass a querystring for each chart as "dataGen.jsp?chartType=1","dataGen.jsp?chartType=1","dataGen.jsp?chartType=2","dataGen.jsp?chartType=3" or "dataGen.jsp?chartType=4" 3. Now use this code window.setInterval(function(){ for(var i=1;i<=4;++i){ var ch=getChartFromId("MyChartId"+i); ch.setDataURL("dataGen.jsp?chartType="+i); } }, 5000); This would update the charts every five seconds, fetching XML from the specified URL. No extra AJAX code required!
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|