Sign in to follow this  
kalyankumar786@gmail.com

Data is not updating from the xml which we get from database

Recommended Posts

Hi FusionCharts Team,

I am creating dashboard using fusion charts.. i m getting values from database into an xml file successfully but, the  chart is displaying successfully for the first time  and for the second time the chart is displaying with the previous values only even though the xml file content is changed from the database...

This is the script used in JSP File

 <div id="chartdiv" align="center">

 

</div>

 

  <script type="text/javascript">

 

var chart = new FusionCharts("../Charts/FCF_MSColumn3D.swf", "ChartId", "600", "350","0","1");

chart.setDataURL("../Data/MSColumn3D.xml");

chart.render("chartdiv");

</script> </td>

 

Share this post


Link to post
Share on other sites

It could be a cache problem. Try putting the following headers in your jsp page:

<%
// These headers are required to prevent caching in IE
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
// set standard HTTP/1.1 no-cache headers
response.setHeader("Cache-Control","no-store, no-cache, must-revalidate");
// set IE extended HTTP/1.1 no-cache headers
response.addHeader("Cache-Control", "post-check=0, pre-check=0");
// set standard HTTP/1.0 no-cache header
response.setHeader("Pragma", "no-cache");
%>

Also, can you tell me how you are accessing the chart the second time?

Srividya

Edited by Guest

Share this post


Link to post
Share on other sites

Hi srividya

 

 

 

We are getting the updated values from the database and put into a xml file.. whenever the data is updated from the database the content is changed completely into the xml file... but it is not reflecting into the charts wheras we can see only the previous values..

 

 

 

If we change the inputs we cant see the changes

 

 

 

Help me

 

 

 

 

 

---Kalyan

Share this post


Link to post
Share on other sites

Hi srividya,

What i m trying to do is ... I want to prepare a dashboard. So for every change in the database it should effect the dashboard

So i am getting the values from the database and storing into an xml file and using that xml content to display in the chart...

So, if i change the date and try to get the values for the changed date.. i m not getting..

instead, i m getting that previous values.. The wonder is that the values in that xml file are changing...

what may be the problem!!!!!!!!!!!!!

-- Kalyan

Share this post


Link to post
Share on other sites

Hi srividya,

 

 

 

I am having same issue of Fusion Chart not refreshing.

 

I am drilling down the pie chart.

 

As we click the pie, a ajax request goes to server.

 

On server I am building a xml file with same name as that of earlier one.

 

After I generate the xml, I am sending a response. Once the response comes I am using below javascript function

 

 

 

var graphPath = "FusionDataXML/PieChart.xml";

 

var myChart = new FusionCharts("FusionCharts/FCF_Pie2D.swf", "myChartId", "450", "300");

 

myChart.setDataURL(graphPath);

 

myChart.render("fusionChartDiv");

 

 

 

When we manually delete the cache and start drilling down correct values are reflecting only for 2-3 times. But then after old pie chart is displayed again and again.

 

I checked the xml. The data is changing every time.

 

 

 

Is there any way to solve the issue.

 

I have tried the code -

 

 

 

<%

 

// These headers are required to prevent caching in IE

 

response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");

 

// set standard HTTP/1.1 no-cache headers

 

response.setHeader("Cache-Control","no-store, no-cache, must-revalidate");

 

// set IE extended HTTP/1.1 no-cache headers

 

response.addHeader("Cache-Control", "post-check=0, pre-check=0");

 

// set standard HTTP/1.0 no-cache header

 

response.setHeader("Pragma", "no-cache");

 

%>

 

 

 

but it is not the solution.

 

 

 

Thanks,

 

Ketan

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Rajroop

Hey Ketan and everyone else!!!!

 

 

 

Please indulge me on this! Please vote on the following question! :P

 

 

 

Isn't Srividya the best?

 

 

 

Vote on 10 please!!!

Share this post


Link to post
Share on other sites

I give her whatever the program prints,

 

 

 

public static void main(String[] args) {

 

System.out.println(srividiyasScore());

 

}

 

 

 

private static double srividiyasScore() {

 

try {

 

return srividiyasScore();

 

} catch(Error e) {

 

return srividiyasScore();

 

}

 

}

 

 

 

 

 

PS. it prints 10

Share this post


Link to post
Share on other sites
Guest Madhumita

Hi Srividya,

jinsi yeyote anaweza kiwango cha mtu ambaye hawezi kuwa hata kuwa ikilinganishwa na mtu mwingine yeyote? Kama mtu ni benchmark yake mwenyewe, je, tuna kulinganisha na wake? kwamba idadi pia? vizuri kwangu wewe ni nini wewe na utakuwa nini wanataka kuwa hata kama watu kima wewe au wao hawana. Kuwa nini ninyi. Hawataki kupunguza nina heshima kwa wewe kwa rating wewe.

Salamu,

Madhumita

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