ScottShea

Not Able To Use Setdataxml

Recommended Posts

I am trying to pass an XML stream to a FusionChart and running into some issues. The chart fails to load on the page and I cannot find any errors

 

Controller code grabbing the XML from an external URL:

 

data_url = "https://[removed]/run/custom.xml?start=#{@start_week}&end=#{@end_week}&x=daychart=line&application=#{@application}".html_safe

data_uri = URI::escape(data_url)
@response = RestClient.get(data_uri)
Rails.logger.debug("Data: " + @response.inspect)

 

 

 

View Code to invoke the Chart:

 

 

<script>
    var chart = new FusionCharts("/charts/MSLine.swf", "quality_center_stats", "700", "400", "1", "0");
    chart.setDataXML("<%= @response %>");
    chart.render("quality_center_stats");
</script>

 

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please send us the generated XML code to look into the issue?

 

Please confirm the FusionCharts version you are using.

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Angshu,

 

Thank you for the response. I appreciate it. It turns out I was passing in a hash of the XML itself and not the XML generated by the outside api. Once I corrected that everything worked fine. Please chalk this up to User Error.

 

Scott

 

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

Could you please send us the generated XML code to look into the issue?

 

Please confirm the FusionCharts version you are using.

 

Awaiting for your response.

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thank you very much for your appreciation and valuable feedback.

 

Glad to know that you have managed to resolve your problem.

 

Happy FusionCharting!biggrin.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now