IDForums

FusionCharts behaviour in IE

Recommended Posts

Hi there,

 

 

 

I am using Sparkline chart and Bulb gauge in my dashboard. For some reason, the dashboard does not behave as expected in IE6. No compatibility issues with Mozilla and Chrome.

 

 

 

Main page has time frames 5days, 15d, 45d, 90d. Based on user selection, this parameter is passed to the same page. And this time, based on this timeframe, the sparkline chart should show 5 data points, 15 data pts etc...

 

 

 

Firefox and chrome are getting updated with the required number of data pts but IE always shows 5 data pts irrespective of user's selection.

 

 

 

I can attach the screenshot and code if you want more details.

 

 

 

Thanks,

 

Mona.

Share this post


Link to post
Share on other sites

Hi Mona,

It seems the IE is having caching issue with the data so could you please try adding "&noCache="{Random Number}" with the dataURL parameter?

Example:

{chartObject}.setDataURL("testdata.aspx?noCache="{Random Number}");

Hope this helps.

Share this post


Link to post
Share on other sites

Hi there,

 

 

 

Thanks for your reply. But I am still having the same problem. Attached is the source code for index.jsp. Could you please verify and let me know what could be the remedy?

 

 

 

Thanks,

 

Mona

index.jsp.doc

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Mona,

Looks like you have not added a random number as a value to the parameter noCache in the url.

Please do something like this in java:

Calendar cal = Calendar.getInstance();
String dataFormat ="hh_mm_ss_SSSS";
   SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
 String  currentTime = sdf.format(cal.getTime());

Now append this currentTime to the url like this:

  String csfBulb="bulbChart_CSF.jsp?metricId="+metricId+"&noCache="+currentTime; 

Hope this helps.

Srividya :)

Share this post


Link to post
Share on other sites

Hi Srividya,

 

 

 

This solution worked great!

 

I have another question...I am aware that its not specific to Fusion Charts but it will be great if you can provide me a solution.

 

 

 

When I pass params to JSP link, its always picking up only first param and ignores the rest. For ex, in the below string, only metric id is recognized and I still have the issue with cache since currentTime is passed as second param.

 

String kpiBulb="bulbChart_KPI.jsp?childMetricId="+childMetricId+"&noCache="+currentTime;

 

 

 

If I change the order of params, then I am able to resolve cache problem but no value is passed for metric id.

 

 

 

Can you please suggest me?

 

 

 

Thanks,

 

Mona.

Share this post


Link to post
Share on other sites

Hi Mona,

You could use the encodeDataURL function from

com.fusioncharts.FusionChartsHelper class as follows:

String strDataURL = FusionChartsHelper.encodeDataURL("PieData.jsp?metricId=2","true",response);

The first parameter is the URL.

Second param: whether to add no cache to the URL or not

Thrid param is the reponse object.

Also, you would not need to write the code for getting the current time and appending it to the URL.

This function does it all.

Hope this helps.  :)

Srividya

Edited by Guest

Share this post


Link to post
Share on other sites

Srividya,

 

 

 

I am using encodeDataURL as suggested. IE behaves as expected only for the first 2 clicks. In the sense, the charts refresh when I am navigating from 5d link to 15d link. When I come back to 5d link, it still shows 15d data. Attached is the source code for your reference.

 

 

 

-Mona.

index.jsp-with Encoding.txt

Share this post


Link to post
Share on other sites

Hi Mona,

I am unable to pin-point the cause of problem, because the page involves several things.

We might have to create a simpler example involving only the links and the charts and try it out.

Would you be able to do that? ( say, create 2 jsps - one with the charts, the other, providing some info)

Thanks

Srividya

Share this post


Link to post
Share on other sites

Hi Srividya,

 

 

 

I am trying to replicate this issue by creating a simple application. I will send you the source code when I am done.

 

 

 

Thanks,

 

Mona

Edited by Guest

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