evanluck Report post Posted March 3, 2009 (edited) I'm using JQuery and am running into a problem with the setDataURL function. It works the second time I execute the function but not the first. If I delay the running of the function with an alert, the function will work the first time. Tried to implement a setTimeout solution but could not get that to work at all. example can be seen here: http://www.tscplcommunityconnect.com/services.php Code excerpt is below: //updateChart method is called whenever the user clicks the button to //update the chart. Here, we get a reference to the chart and update it's //data using setDataURL method. function updateChart(service,percent){ //Get reference to chart object using Dom ID var chartObj = getChartFromId("rankgraph"); //assemble new data URL from arguments -dc replace with php script DONE var theURL = "services_like_me_all.php"+"?service="+service+"&percent="+percent; //set new URL //alert(theURL); chartObj.setDataURL(theURL); }; function findSegmentsbyService() { $('#graphbox').show(); var theService = $('#serviceselectbox').val(); var thePercent = $('#atleast').val(); $("#insservice").html(theService); $("#inspercent").html(thePercent); updateChart(theService,thePercent); }; Edited March 3, 2009 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted March 4, 2009 Hi, The setDataURL function is available only after the chart is rendered. This can be tracked down by placing FC_Rendered(DOMId) JavaScript function . The chart would call the function once the chart is ready for setDataURL(). Please call setDataURL() only after FC_Rendered() is called. Share this post Link to post Share on other sites
evanluck Report post Posted March 5, 2009 Thank you for the reply... Given my function, can you give me an example of how to implement the FC_Rendered(DOMId) function. I tried and couldn't get it to work Share this post Link to post Share on other sites