cheesegrits

Members
  • Content count

    4
  • Joined

  • Last visited

About cheesegrits

  • Rank
    Forum Newbie
  1. More setDataXML problems

    Ah HAH! Thanks for the quick response. I'll try that. Re-rendering is working OK, but would obviously be cleaner to just update it. -- hugh
  2. More setDataXML problems

    OK, I just found some other responses to this issue explaining that the setDataXML() method is not exposed to JS in the free version. Don't know how I missed that on my first pass through this forum, I must be going blind. So I'm working round it by just re-rendering the chart after each AJAX call. Works fine. Thanks for an awesome product! -- hugh
  3. More setDataXML problems

    Just FYI, the initial call to setDataXML (inside the domReady function) does have valid XML data, it just got removed when posting, presumably phpBB not liking the chevron tags. Also, just in case it is relevant, I'm using Mootools 1.2, which is where the domReady event and the Ajax call are handled. And ... the initial chart render in the domReady works like a charm. -- hugh
  4. More setDataXML problems

    I've googled till I'm blue in the face, read this forum from cover to cover, but like a lot of folk I'm having an issue trying to get setDataXML to work. Here's the relevant chunks of my code: var chartObj; function calculateLoan_RateMargin() { ... blah ... new Ajax(url, { data: { ... blah ... onComplete: function(response){ $('calculating_loan').hide(); if (response != '') { json = Json.evaluate(response); if (json['errors'] != '') { alert("Error: " + json['errors']); } else { ... blah... //var chartObj = getChartFromId("Pie2D1"); chartObj.setDataXML(json['chart']); } } } }).request(); } window.addEvent('domready', function(){ var chart_Pie2D1 = new FusionCharts("components/com_fabrik/plugins/visualization/fusionchart/FCcharts/FCF_Pie2D.swf","Pie2D1", "300", "300", "0", "1", "","noScale","EN"); chartObj = chart_Pie2D1; //Provide entire XML data using dataXML method chart_Pie2D1.setDataXML(""); chart_Pie2D1.render("Pie2D1Div"); }); My Pie2D1Div is not inside a form. I'm setting RegisterWithJS. The AJAX call returns correct XML. But no matter what I try, when I call setDataXML, these two lines: var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id')); chartObj.setDataXML(strDataXML ... inside your setDataXML always return a chartObj which is the embed element, not the actual chart object, so the call fails because the setDataXML method doesn't exist. As you can see from my code, I've tried the getChartFromId method, and copying the original object to my own variable. I'm beating my brains out on this one, any help much appreciated. -- hugh