doggerdude Report post Posted May 1, 2009 When I get my chart using getChartFromId in the chart rendered event, and try to load some new data, I get the setDataXML not found error. I'm using firefox and mixing with seam and extjs. Ive searched the forums and google but have had no luck... We are looking to purchase a license very soon but need to get this working first... The chart will appear within this DIV. This text will be replaced by the chart. function FC_Rendered(DOMId){ var myChart= getChartFromId("chart1id"); myChart.setDataXML(chartXml); return true; } var callback1 = function(chartXml) { var chart1 = new FusionCharts("#{contextPath}/fusioncharts/templates/Column3D.swf", "chart1id", "450", "300", "0", "1"); chart1.setDataXML(chartXml); chart1.render("chart1div"); }; Seam.Component.getInstance('dashboard').getOpportunitiesByCustomerType(callback1); Share this post Link to post Share on other sites
FusionCharts Support Report post Posted May 4, 2009 Hi, Could you please try : var myChart= document.getElementById("chart1id"); Please make sure that you do not have any other ids having the same name. Share this post Link to post Share on other sites
doggerdude Report post Posted May 4, 2009 Thanks for the suggestion... I tried it but still get this error: chart1.setDataXML is not a function The chart will appear within this DIV. This text will be replaced by the chart. function FC_Rendered(DOMId){ firebugLog(DOMId + ' has rendered.'); if (DOMId=="chart1id") { var callback4 = function(chartXml) { firebugLog('chart 1 data:'+chartXml); var chart1 = document.getElementById("chart1id"); chart1.setDataXML(chartXml); chart1.render("chart1div"); firebugLog('chart1id render request.'); }; var exceptionHandler1 = function(ex) { alert("An exception occurred: " + ex.getMessage()); }; Seam.Component.getInstance('dashboard').getOpportunitiesByCustomerType(callback4); } return true; } var chart1 = new FusionCharts("#{contextPath}/fusioncharts/templates/Column3D.swf", "chart1id", "450", "300", "0", "1"); chart1.setDataXML(""); chart1.render("chart1div"); Share this post Link to post Share on other sites
doggerdude Report post Posted May 4, 2009 I finally figured it out... Was related to how I was adding the chart within an extjs panel... I was adding the chart this way: html: document.getElementById('chart2div').innerHTML but once I changed it to this, everything was fine! contentEl: 'chart2div' Just a little thing to watch out for if you are using extjs! Share this post Link to post Share on other sites
Dhruva Report post Posted May 4, 2009 Good to know that you figured it out! Share this post Link to post Share on other sites