kotesh

Members
  • Content count

    2
  • Joined

  • Last visited

Everything posted by kotesh

  1. I am using Ganttchart in the Instrumentation suite from the enterprise version. When I try to call the Gantt chart in the instrumentation suite using Javscript, it gives me blank screen with just the border.However, when I try using <object> tag embedding in html approach, it works fine, I use the same XML file as input. Find below my code snippet.Please help.I put some alerts in code, infact FC_Rendered function also does not get called. <SCRIPT LANGUAGE="Javascript" SRC="/FusionCharts/FusionCharts.js"> //You need to include the above JS file, if you intend to embed the chart using JavaScript. </SCRIPT> <SCRIPT LANGUAGE="JavaScript"> function FC_Rendered(DOMId){ //This method is called whenever a FusionCharts chart is loaded. //Check if it's the required chart using ID alert('inside FC_Rendered'); if (DOMId=="ChId1"){ //Invoke updateChart() method to update chart with new data updateChart(); } } function updateChart(){ //Get reference to chart object using Dom ID "ChId1" var chartObj = getChartFromId("ChId1"); alert('inside update chart'+ chartObj); //Update its XML Data URL chartObj.setDataURL("/http://OurlocalserverURL?XML=X:/FusionCharts/data/CollabGanttChartNew.xml"); chartObj.render("chart1div"); } </SCRIPT> <BODY> <div id="chart1div"> This text is replaced by the chart. </div> <script type="text/javascript"> var chart1 = new FusionCharts("FI2_Gantt.swf", "ChId1", "600", "300", "0", "1"); alert(chart1); //Start Chart with empty data as we'll later update using JavaScript chart1.setDataXML("<chart></chart>"); chart1.render("chart1div"); </script> </BODY>
  2. 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.