[email protected] Report post Posted December 24, 2008 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
srividya_sharma Report post Posted December 25, 2008 (edited) 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 December 25, 2008 by Guest Share this post Link to post Share on other sites
[email protected] Report post Posted December 26, 2008 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
[email protected] Report post Posted December 26, 2008 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
srividya_sharma Report post Posted December 27, 2008 Hi Kalyan, I can try to replicate the problem here, if you can give me some more information. What is the flow from the jsp? Sample jsp containing chart etc would be useful. Srividya Share this post Link to post Share on other sites
[email protected] Report post Posted December 29, 2008 Hi Sri, I successfully got the output with u r Javascript code.. i think that is cache problem and that is not in my system which is windows server but in XP.. anyways i got it... Can u give me u r Gmail id... Thanks and regards Kalyan Share this post Link to post Share on other sites
ketanmulay Report post Posted November 7, 2009 (edited) 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 November 7, 2009 by Guest Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 7, 2009 Hello Ketan, Can you please change you javascript which updates the xml to the following: var graphPath = "FusionDataXML/PieChart.xml?nocache="+ new Date().valueOf()"; Hope this helps. Srividya Share this post Link to post Share on other sites
ketanmulay Report post Posted November 9, 2009 Hi Srividya, Thanks for your reply. The solution given by you worked. Thanks, Ketan Share this post Link to post Share on other sites
Guest Rajroop Report post Posted November 9, 2009 Hey Ketan and everyone else!!!! Please indulge me on this! Please vote on the following question! Isn't Srividya the best? Vote on 10 please!!! Share this post Link to post Share on other sites
shamasis Report post Posted November 10, 2009 (edited) ... (3^2 - 2^2) * 2 Edited November 10, 2009 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted November 10, 2009 east or west ... Share this post Link to post Share on other sites
ketanmulay Report post Posted November 10, 2009 Definitely Rajroop..... Srividya is Rocking!!! I would rate 10/10 Share this post Link to post Share on other sites
Rahul Kumar Report post Posted November 10, 2009 Mine: 10/10. Share this post Link to post Share on other sites
rishin.goswami Report post Posted November 10, 2009 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 Report post Posted November 10, 2009 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
Guest Rajroop Report post Posted November 12, 2009 !!DUS!! Share this post Link to post Share on other sites
srividya_sharma Report post Posted November 12, 2009 Thank you all for the "support". Keep asking and keep getting more out of FusionCharts everyday! Srividya Share this post Link to post Share on other sites