﻿<?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 / JavaScript Problems  / setDataXML cannot be called / 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:22:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>@someone1&lt;br&gt;prototyping only creates a new object.  the prototype library should in no way interfere with the prototype method of this architecture.</description><pubDate>Thu, 29 Mar 2007 12:00:52 GMT</pubDate><dc:creator>funktifyknow</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>figured it out, thanks</description><pubDate>Thu, 15 Mar 2007 16:52:33 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Ah, that was my problem, that fixed it, thanks. Now I have another question :)&lt;br&gt;&lt;br&gt;When i call the chart through Javascript like that, how do i set:&lt;br&gt;&lt;br&gt;&lt;param NAME="wmode" VALUE="transparent"&gt;	&lt;br&gt;&lt;br&gt;</description><pubDate>Thu, 15 Mar 2007 09:53:21 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Also, please make the following change:&lt;/P&gt;&lt;P&gt;function FC_Rendered(domId){&lt;BR&gt;if (domId=="&lt;STRONG&gt;myChartId&lt;/STRONG&gt;"){&lt;BR&gt;var chartObj = getChartFromId(domId);&lt;BR&gt;chartObj.setDataXML("");&lt;BR&gt;}&lt;BR&gt;return true;&lt;BR&gt;}</description><pubDate>Wed, 14 Mar 2007 06:11:27 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>The init function is initializing the chart with blank data.&lt;br&gt;&lt;br&gt;I try to put data in the chart when its loaded with the FC_Rendered function. Isnt FC_Rendered called automatically after the chart is loaded?&lt;br&gt;&lt;br&gt; function init(){&lt;br&gt;var myChart = new FusionCharts("${staticServer}/Charts/Doughnut2D.swf", "myChartId", "900", "300", "0", "1");&lt;br&gt;myChart.setDataXML("");&lt;br&gt;myChart.render("chartdiv");&lt;br&gt;}&lt;br&gt;YAHOO.util.Event.addListener(window, "load", init);&lt;br&gt;&lt;br&gt;function FC_Rendered(domId){&lt;br&gt;if (domId=="chartdiv"){&lt;br&gt;var chartObj = getChartFromId(domId);&lt;br&gt;chartObj.setDataXML("");&lt;br&gt;}&lt;br&gt;return true;&lt;br&gt;}</description><pubDate>Tue, 13 Mar 2007 11:31:59 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>The init function should be called from FC_Rendered. &amp;#119;indow.load occurs much before the chart is loaded - as the chart is a streaming SWF file.&lt;/P&gt;&lt;P&gt;When the chart is loaded, FC_Rendered method is called - there, you need to call init().</description><pubDate>Tue, 13 Mar 2007 02:18:01 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Ive don it this way, I still get the error, this is embedded in the JSP so its not a static server error.&lt;br&gt;After init it called, the chart is rendered with No Data. When FC_Rendered is called, I get the chartObj error.&lt;br&gt;&lt;br&gt;        function init(){&lt;br&gt;		var myChart = new FusionCharts("${staticServer}/Charts/Doughnut2D.swf", "myChartId", "900", "300", "0", "1");&lt;br&gt;		myChart.setDataXML("&lt;chart&gt;&lt;/chart&gt;");&lt;br&gt;		myChart.render("chartdiv");&lt;br&gt;	}&lt;br&gt;	YAHOO.util.Event.addListener(window, "load", init);&lt;br&gt;	&lt;br&gt;		function FC_Rendered(domId){			&lt;br&gt;			if (domId=="chartdiv"){			&lt;br&gt;				var chartObj = getChartFromId(domId);&lt;br&gt;				chartObj.setDataXML("&lt;chart caption='Total Amounts Paid per Category' numberPrefix='$'&gt;&lt;set label='May' value='29600' /&gt;&lt;set label='June' value='27600' /&gt;&lt;set label='July' value='31800' /&gt;&lt;set label='August' value='39700' /&gt;&lt;set label='September' value='37800' /&gt;&lt;set label='October' value='21900' /&gt;&lt;set label='November' value='32900' /&gt;&lt;set label='December' value='39800' /&gt;&lt;/chart&gt;");&lt;br&gt;			}			&lt;br&gt;			return true;			&lt;br&gt;		}</description><pubDate>Mon, 12 Mar 2007 10:46:19 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Im doing all those except the&lt;br&gt;&lt;br&gt;registerWithJS flag set to 1&lt;br&gt;&lt;br&gt;Im following the examples you have that change XML with javacsript and I didnt see that flag being set anywhere.</description><pubDate>Mon, 12 Mar 2007 10:05:39 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>the example works when run from a webserver. Unfortunately, I still have the problem when I try to populate with my actual web page.&lt;br&gt;&lt;br&gt;I have a JBOSS server running struts. The javascript on the struts page fills data dynamically, but I always get teh cartObj has no properties when I fill it. &lt;br&gt;&lt;br&gt;I have a page, that initializes the chart with blank data. I use Yahoo YUI widgets which calls the init function after the page is loaded. In the init function, it runs a dwr call to get data. when data come back, i use setDataXML to fill the chart. (Im just using a set string to populate to test). I still get chartObj has no properties.&lt;br&gt;&lt;br&gt;I have something like this:&lt;br&gt;&lt;br&gt;        function init(){		&lt;br&gt;               setTimeout("Budget.getChartData(getChartDataReturn)",1500);	&lt;br&gt;	}&lt;br&gt;	YAHOO.util.Event.addListener(window, "load", init);&lt;br&gt;&lt;br&gt;	function getChartDataReturn(data){&lt;br&gt;		if(data != null){&lt;br&gt;		     var chartObj = getChartFromId("chartdiv");&lt;br&gt;		     chartObj.setDataXML("&lt;chart caption='Total Amounts Paid per Category' numberPrefix='$'&gt;&lt;set label='May' value='29600' /&gt;&lt;set             label='June' value='27600' /&gt;&lt;set label='July' value='31800' /&gt;&lt;set label='August' value='39700' /&gt;&lt;set label='September' value='37800' /&gt;&lt;set label='October' value='21900' /&gt;&lt;set label='November' value='32900' /&gt;&lt;set label='December' value='39800' /&gt;&lt;/chart&gt;");&lt;br&gt;		  &lt;br&gt;		}&lt;br&gt;	}&lt;br&gt;&lt;br&gt;    &lt;div id="chartdiv" align="center"&gt;&lt;/div&gt;&lt;br&gt;   &lt;script type="text/javascript"&gt;&lt;br&gt;	var myChart = new FusionCharts("${staticServer}/Charts/Doughnut2D.swf", "myChartId", "900", "300", "0", "0");&lt;br&gt;	myChart.setDataXML("&lt;chart&gt;&lt;/chart&gt;");&lt;br&gt;	myChart.render("chartdiv");&lt;br&gt;   &lt;/script&gt; &lt;br&gt;</description><pubDate>Mon, 12 Mar 2007 09:59:58 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"&gt;Can you make sure that you’re:&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;UL style="MARGIN-TOP: 0in" type=disc&gt;&lt;LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Using v3 charts&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Set the registerWithJS flag to 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Not placing the chart inside a FORM element&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;LI class=MsoNormal style="COLOR: navy; mso-list: l0 level1 lfo1"&gt;&lt;FONT face=Arial color=navy size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Not calling the setDataXML method before the chart has loaded and rendered&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt; &lt;/LI&gt;&lt;/UL&gt;</description><pubDate>Mon, 12 Mar 2007 04:50:12 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Has a solution to this been found? I have a similar problem and thought maybe that it had to do with other javascript files i had included. I use the prototype.js framework/library and thought it might be interfering with fusion charts extensions of javscript's prototype</description><pubDate>Sun, 11 Mar 2007 23:13:56 GMT</pubDate><dc:creator>someone1</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Im getting a similar problem, and its coming from the example from the download. From \Code\JavaScript\Basics\ChangeDataXML.html it errors out in Firefox and IE. When you try to change the data, nothing happens and in firefox the error chartObj.setDataXML is not a function is returned. It errors out in IE also. Ive tried it with the developer package and the evaluation package and I get the error in both packages.</description><pubDate>Fri, 09 Mar 2007 18:22:01 GMT</pubDate><dc:creator>minkey</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>I'm unable to open the given URL. &lt;/P&gt;&lt;P&gt;We did receive your email and replied that we're unable to open the URL.</description><pubDate>Tue, 27 Feb 2007 23:08:31 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Hi, here is the link &lt;br&gt;&lt;br&gt;https://213.130.16.232/financial/graph/dashboard&lt;br&gt;&lt;br&gt;Please log in as 'lohika', password - 'test'.&lt;br&gt;&lt;br&gt;It is part of a comercial project that is why link is given privately.&lt;br&gt;&lt;br&gt;On the page there is a chart with no data set on its creation(that is '&lt;code&gt;&lt;code&gt;')&lt;br&gt;&lt;br&gt;Then javaScript slider component is created for this chart.&lt;br&gt;Slider has event that is triggered on slider position changing (and after slider initialization).&lt;br&gt;This event in our case calls function that updates graph data.&lt;br&gt;The function has to send AJAX request but i simplified that for debugging purposes and simply some stub data is set into the chart.&lt;br&gt;Actually it is no set because error occurs on setDataXml method call. Javascript breaks its execution and i even cannot move the slider &lt;br&gt;&lt;br&gt;For now as a  workaround i recreate chart every time the data has to be updated but what is bad is that chart is blinking on being recreated.&lt;br&gt;&lt;br&gt;Please let me know if i can somehow assist in solving this problem... &lt;br&gt;If you have any questions feel free to ask (more detail explanation on our JavaScript or any other)..&lt;br&gt;&lt;br&gt;Thank you very much for you help.&lt;br&gt;&lt;br&gt;P.S.: It looks like Email button under the posts on this forum doesn't work.. :(</description><pubDate>Tue, 27 Feb 2007 09:39:22 GMT</pubDate><dc:creator>buratino</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Can you please send us the link?</description><pubDate>Tue, 27 Feb 2007 00:56:36 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>I use Area2D and Chart2D but it looks like the error occurs for both of them. &lt;br&gt;The page is deployed for debug. Please let me know if you received a link and successfully signed in.&lt;br&gt;&lt;br&gt;Thank you very much. Appreciating your help.</description><pubDate>Mon, 26 Feb 2007 04:07:19 GMT</pubDate><dc:creator>buratino</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Which SWF file are you using? Also, can you please host the page live so that we can debug?</description><pubDate>Tue, 20 Feb 2007 07:23:35 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>Yeah it is not inside a form...&lt;br&gt;&lt;br&gt;The error is:&lt;br&gt;"chartObj.setDataXML is not a function&lt;br&gt;[Break on this error] chartObj.setDataXML(newDynamicData);"&lt;br&gt;</description><pubDate>Mon, 19 Feb 2007 04:00:51 GMT</pubDate><dc:creator>buratino</dc:creator></item><item><title>RE: setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>getChartFromId method returns a reference to the Flash Object in the DOM Model. What error are you getting? Also, can you make sure that your chart is NOT inside a FORM?</description><pubDate>Mon, 19 Feb 2007 01:32:48 GMT</pubDate><dc:creator>Pallav</dc:creator></item><item><title>setDataXML cannot be called</title><link>http://www.fusioncharts.com/forum/Topic354-35-1.aspx</link><description>I need my chart data to be dynamically changed. To update chart data next code is used:&lt;br&gt;[code]&lt;br&gt;var chartObj = getChartFromId(chartToUpdateId);&lt;br&gt;chartObj.setDataXML(newDynamicData);&lt;br&gt;[/code]&lt;br&gt;But here is what is going on: &lt;br&gt;&lt;br&gt;chartObj returned by getChartFromId is a function! and thus cannot have setDataXML method... &lt;br&gt;Please help. Where is a mistake? What is wrong here?&lt;br&gt;&lt;br&gt;Thanks in advance.</description><pubDate>Sat, 17 Feb 2007 09:31:37 GMT</pubDate><dc:creator>buratino</dc:creator></item></channel></rss>