﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts v3 / Using FusionCharts / General usage  / Example (Code) for Charts using AJAX / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 02:04:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>hi !&lt;P&gt;( sorry for my english ... again )&lt;/P&gt;&lt;P&gt;I did it!&lt;/P&gt;&lt;P&gt;The Solution:&lt;/P&gt;&lt;P&gt;** in the main page, include de basic code to load a FC&lt;/P&gt;&lt;P&gt;(The $XML2Lines is a smarty variable, you`ll use another XML file)&lt;/P&gt;&lt;P&gt;&amp;lt;div id="chart7"&amp;gt;&lt;BR&gt;      &amp;lt;script type="text/javascript"&amp;gt;              &lt;BR&gt;       var chart = new FusionCharts("charts/MSLine.swf", "chart7", "700", "300", "0", "1");&lt;BR&gt;       chart.setDataXML("{$XML2Lines}");                            &lt;BR&gt;       chart.render("chart7");              &lt;BR&gt;       ObjectChart = chart;       &lt;BR&gt;       GoAjax();&lt;BR&gt;      &amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;** the GoAjax() and UpdateGraphic() javascript function &lt;/P&gt;&lt;P&gt;function GoAjax(id)&lt;BR&gt;{&lt;BR&gt;    TimerGraphic = setTimeout("UpdateGraphic()", 3000);         &lt;BR&gt;} // you`ll understand the parameters, sure.&lt;/P&gt;&lt;P&gt;function UpdateGraphic(id)&lt;BR&gt; {&lt;BR&gt;    var object = document.form_mediciones.ddlObject.value;     &lt;BR&gt;    var sensor = document.form_mediciones.ddlSensor.value;     &lt;BR&gt;    var variable = document.form_mediciones.ddlVariable.value;     &lt;BR&gt;    var ini_filter = document.form_mediciones.inicio_filtro_hidden.value;&lt;BR&gt;    var ter_filter = document.form_mediciones.termino_filtro_hidden.value;    &lt;BR&gt;    var company = document.form_mediciones.company_hidden.value;         &lt;BR&gt;    var iStartCounter = document.form_mediciones.iStartCounter_hidden.value;         &lt;BR&gt;    var nValuesToCalc = document.form_mediciones.nValuesToCalc_hidden.value;;&lt;/P&gt;&lt;P&gt;    &lt;BR&gt;    var URL = "SetSourceOfGraphic.php?";&lt;BR&gt;    URL = URL + "im=" + id;&lt;BR&gt;    URL = URL + "&amp;amp;fi=" + ini_filter;&lt;BR&gt;    URL = URL + "&amp;amp;ft=" + ter_filter;&lt;BR&gt;    URL = URL + "&amp;amp;ep=" + company;&lt;BR&gt;    URL = URL + "&amp;amp;object=" + object;&lt;BR&gt;    URL = URL + "&amp;amp;sensor=" + sensor;&lt;BR&gt;    URL = URL + "&amp;amp;variable=" + variable;&lt;BR&gt;    URL = URL + "&amp;amp;iStartCounter=" + iStartCounter;&lt;BR&gt;    URL = URL + "&amp;amp;nValuesToCalc=" + nValuesToCalc;&lt;BR&gt;    &lt;BR&gt;    var ajax=objetoAjax(); &lt;BR&gt;    ajax.open("GET", URL, true);&lt;BR&gt;    ajax.onreadystatechange=function() &lt;BR&gt;   {&lt;BR&gt;    if (ajax.readyState==4) &lt;BR&gt;    { &lt;BR&gt;      ObjectChart.setDataXML(ajax.responseText);       &lt;/P&gt;&lt;P&gt;    }&lt;BR&gt;  }&lt;BR&gt;  ajax.send(null);&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;** end&lt;/P&gt;&lt;P&gt;I hope you understand de MAIN IDEA of code, a remove some variables to make more "friendly" the solution.&lt;/P&gt;&lt;P&gt;the another tecnologies ( smarty, pear ), have not idea of my code, just javascript and html play this.&lt;P&gt;PD: the objetoAjax() function is in every where in the internet, you have to find it, it`ll be the dificulty of my solution. ( always have a dificulty )&lt;P&gt;any question, find me...&lt;P&gt;Regards.</description><pubDate>Fri, 29 Feb 2008 07:24:45 GMT</pubDate><dc:creator>Coyote</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>hi,&lt;/P&gt;&lt;P&gt;We have not yet impleted FusionCharts in such environment. If you can kindly provide us some code for the same combination (PHP+PEAR etc. and using AJAX) we can try embedding FusionCharts in that.</description><pubDate>Fri, 29 Feb 2008 00:38:36 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>hi !&lt;P&gt;(My English is very bad... sorry)&lt;/P&gt;&lt;P&gt;i `ve a problem using ajax.&lt;/P&gt;&lt;P&gt;i`m developing a proyect using PEAR, SMARTY, PHP, FUSIONCHARTS and now .... my boss say me "ok, let`s include ajax" ... &lt;/P&gt;&lt;P&gt;I`ve been searching for any information and don`t find nothing. please just need some pages, or tutorias, or something to help me.&lt;/P&gt;&lt;P&gt;PD: Already I have seen the main pages of PEAR, SMARTY, PHP, FUSIONCHARTS, but they don`t give me "instructions" to how combinate ajax with the another tecnologies.&lt;/P&gt;&lt;P&gt;Regards.</description><pubDate>Tue, 05 Feb 2008 07:34:35 GMT</pubDate><dc:creator>Coyote</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>[quote][b]Sudipto Choudhury (1/10/2008)[/b][hr]hi,&lt;P&gt; FusionCharts' charts has the capability to dynamically fetch XML data from a server side script or any XML source without page refresh. You just need to specify the datURL path from where the XML is to be fetched. &lt;BR&gt;[/quote] &lt;/P&gt;&lt;P&gt;Oh. Interesting. Okay, I need to educate myself some more (read more of the documentation). I'll come back and post the additional information you suggested if I can't figure it out.  Thanks for the reply Sudipto - very helpful.&lt;/P&gt;&lt;P&gt; - Andrew</description><pubDate>Thu, 10 Jan 2008 05:39:56 GMT</pubDate><dc:creator>coolegg</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>hi,&lt;/P&gt;&lt;P&gt;This can be achieved using AJAX. But, may be, that would confuse you more. YOu can just use simple JS to imlpement this. I am saying this because you have no need to use AJAX backbone to fetch XML for the chart. FusionCharts' charts has the capability to dynamically fetch XML data from a server side script or any XML source without page refresh. You just need to specify the datURL path from where the XML is to be fetched. &lt;BR&gt;&lt;BR&gt;Still, you can provide us the structure (i mean a more details) of the application AJAX+PHP+FusionCharts and we can try providing you the solution.</description><pubDate>Thu, 10 Jan 2008 05:30:33 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>I wish there was simpler example of AJAX integration with FusionCharts. I am in the same boat as the original poster, I am not a professional web developer. An example using AJAX and PHP such as where a user simply clicks on one of three text links and one of three corresponding charts is rendered into a chart container without the page refreshing would be very helpful as a very basic but highly useful example of AJAX, PHP and FusionCharts.  I can't use JS-only because eventually I want to have far more than 3 possible charts, so I need to generate the FusionCharts XML dynamically. I just can't seem to put it all together: AJAX, PHP and FusionCharts. Looking at ASP examples is like looking at Mandarin to me.&lt;/P&gt;&lt;P&gt;If anyone happens to have a simpler example of AJAX, PHP and FusionCharts in action I would much appreciate it.</description><pubDate>Tue, 08 Jan 2008 17:49:33 GMT</pubDate><dc:creator>coolegg</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>Hi,&lt;br&gt;&lt;br&gt;Here is a sample example with AJAX (using ASP and Access at the backend).. in \ASP\AjaxSample\ folder.&lt;br&gt;This example first extracts data from database and calculates the total output of 3 factories..this is plain ASP.Then it renders a pie chart. Now the ajax part...when on clicks on a pie it calls a a javascript function. The intension is to load a chart with details of production of that particular factory. &lt;br&gt;&lt;br&gt;AJAX part : the javasctipt calls ajax to send request to an asp page FactoryData.asp which returns an XML for the detailed chart. Then that detailed chart (column 2d) will load below the pie chart. ON clicking on another slice the ajax call will again reload the detailed chart with different data....</description><pubDate>Tue, 23 Oct 2007 02:39:40 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>[quote][b]Pallav (10/5/2007)[/b][hr]Yes - we've a lot of examples in our documentation at www.fusioncharts.com/docs &gt; Guide for Web Developers &gt; FusionCharts and JavaScript.[/quote]&lt;br&gt;But these are not AJAX examples, no? Just normal Javascript ones. There is no direct Javascript interaction with the server, as I can see it... Please correct me if I am wrong.</description><pubDate>Thu, 18 Oct 2007 09:57:21 GMT</pubDate><dc:creator>luftikus143</dc:creator></item><item><title>RE: Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>Yes - we've a lot of examples in our documentation at www.fusioncharts.com/docs &gt; Guide for Web Developers &gt; FusionCharts and JavaScript.</description><pubDate>Fri, 05 Oct 2007 03:26:41 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>Example (Code) for Charts using AJAX</title><link>http://www.fusioncharts.com/forum/Topic2576-28-1.aspx</link><description>Hi there,&lt;br&gt;&lt;br&gt;are there any examples of charts using AJAX for generating graphs without the need of reloading the whole page? If possible with the used code? I am not a big Javascript/AJAX programmer, so I would like to reuse some code to achieve that...&lt;br&gt;&lt;br&gt;Thanks for any help!&lt;br&gt;&lt;br&gt;Stef</description><pubDate>Wed, 03 Oct 2007 03:03:40 GMT</pubDate><dc:creator>luftikus143</dc:creator></item></channel></rss>