Sign in to follow this  
litboyboots

question:how to generate the chart quickly ? it's urgent ~

Recommended Posts

now i'm in this situation :

i have a html page,it will show 5 ms_line chart .Every chart has 3 datasets,and every dataset has 2880 value.All the chart uses datetime as the labelname.

Question:

Everytime i open this page,it will take me 15 seconds more or less.and i already take a test that no time is wasted in get data from DB, it all wastesd in download the html and generate the chart. I save the html's source code,the .txt is about 830KB.  so , how can i generate the html page quicker ?  15 seconds is unacceptable.

ps: i try to find a way to generate a picture directly with fusionchart and invoke the picture in html page , but i see the api and i didn't find something about it .

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

We appologize for the inconvenience.

Our development team is working on it.

We will get back to you as soon as possible.

Share this post


Link to post
Share on other sites

Hi,

We have experienced a delay in loading the charts when the dataset gets a bit larger. We are testing with IE7. We generate the XML data in out JSP and then create and load the chart using the Javascript functions.

We found that the longest duration task was actually the setDataXML javascript function, in particular the encodeDataXML function. IE7 seems much slower at this than say FireFox.

Our solution is to create the chart with no data, then when we get the rendered event we use the setDataXML function to load the data. This is much quicker as it appears only the initial data goes through the encodeDataXML function.

 function renderChart() {
  graph = new FusionCharts(...);
  graph.setDataXML('<chart />');
  graph.render("chartDivId");
 }
 function FC_Rendered(DOMId) {
 graph.setDataXML('<c:out value="${XML}" escapeXml="false" />');  
 }

Hope this "feature" helps :)

Paul

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Bigger data would take time to parse.

 

 

 

You can use the chart's native API function - setDataXML(), rather than FusionCharts.js's setDataXML().

 

 

 

Please write:

 

 

 

function FC_Rendered(DOMId) {

 

getChartFromId('yourChartDOMId').setDataXML('');

 

}

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