﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionWidgets v3 (previously FusionGadgets) / Using FusionWidgets  / Caling Instrumentation charts using Javascript / 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>Tue, 14 Oct 2008 14:36:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Caling Instrumentation charts using Javascript</title><link>http://www.fusioncharts.com/forum/Topic1256-17-1.aspx</link><description>The Gantt chart is built on v2 platform and as such does not call FC_Rendered function or doesn't support setDataURL/setDataXML method (after rendering).&lt;/P&gt;&lt;P&gt;We will be coming with a v3 of the same in August.</description><pubDate>Tue, 12 Jun 2007 00:06:59 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: Caling Instrumentation charts using Javascript</title><link>http://www.fusioncharts.com/forum/Topic1256-17-1.aspx</link><description>The URL in the setDataURL , I just changed the URL for this post(also I have some typos in the URL like '/http' etc) , but trust me it fetches the XML properly.</description><pubDate>Fri, 08 Jun 2007 11:24:27 GMT</pubDate><dc:creator>kotesh</dc:creator></item><item><title>Caling Instrumentation charts using Javascript</title><link>http://www.fusioncharts.com/forum/Topic1256-17-1.aspx</link><description>I am using Ganttchart in the Instrumentation suite from the enterprise version.&lt;/P&gt;&lt;P&gt;When I try to call the Gantt chart in the instrumentation suite using Javscript, it gives me blank screen with just the border.&lt;STRONG&gt;However, when I try using &amp;lt;object&amp;gt; tag embedding in html approach, it works fine, I use the same XML file as input.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Find below my code snippet.Please help.I put some alerts in code, infact FC_Rendered function also does not get called.&lt;/P&gt;&lt;P&gt;&amp;lt;SCRIPT LANGUAGE="Javascript" SRC="/FusionCharts/FusionCharts.js"&amp;gt;&lt;BR&gt;//You need to include the above JS file, if you intend to embed the chart using JavaScript. &lt;BR&gt;&amp;lt;/SCRIPT&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;SCRIPT LANGUAGE="JavaScript"&amp;gt; &lt;/P&gt;&lt;P&gt;function FC_Rendered(DOMId){&lt;BR&gt;   //This method is called whenever a FusionCharts chart is loaded.&lt;BR&gt;   //Check if it's the required chart using ID&lt;BR&gt;   alert('inside FC_Rendered');&lt;BR&gt;   if (DOMId=="ChId1"){&lt;BR&gt;       //Invoke updateChart() method to update chart with new data&lt;BR&gt;       updateChart();&lt;BR&gt;   }&lt;BR&gt;} &lt;/P&gt;&lt;P&gt;function updateChart(){&lt;BR&gt;   //Get reference to chart object using Dom ID "ChId1" &lt;BR&gt;   var chartObj = getChartFromId("ChId1"); &lt;BR&gt;   alert('inside update chart'+ chartObj);&lt;BR&gt;   //Update its XML Data URL &lt;BR&gt;   chartObj.setDataURL("&lt;A href="http://OurlocalserverURL?XML=X:/FusionCharts/data/CollabGanttChartNew.xml"&gt;/http://OurlocalserverURL?XML=X:/FusionCharts/data/CollabGanttChartNew.xml&lt;/A&gt;"); &lt;BR&gt;   chartObj.render("chart1div");&lt;BR&gt;}&lt;BR&gt;&amp;lt;/SCRIPT&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;BODY&amp;gt;&lt;BR&gt;&amp;lt;div id="chart1div"&amp;gt;&lt;BR&gt;   This text is replaced by the chart.&lt;BR&gt;&amp;lt;/div&amp;gt;&lt;BR&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;BR&gt;   var chart1 = new FusionCharts("FI2_Gantt.swf", "ChId1", "600", "300", "0", "1"); &lt;BR&gt;   alert(chart1);&lt;BR&gt;   //Start Chart with empty data as we'll later update using JavaScript &lt;BR&gt;   chart1.setDataXML("&amp;lt;chart&amp;gt;&amp;lt;/chart&amp;gt;");&lt;BR&gt;   chart1.render("chart1div");&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;/BODY&amp;gt;</description><pubDate>Fri, 08 Jun 2007 11:19:52 GMT</pubDate><dc:creator>kotesh</dc:creator></item></channel></rss>