FusionCharts Forum: Not Able To Use Setdataxml - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Not Able To Use Setdataxml Cannot properly get the setDataXML method to work for me; chart fails

#1 User is offline   ScottShea 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 13-September 11

Posted 13 September 2011 - 08:44 PM

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>


0

Other Replies To This Topic

#2 User is offline   Angshu 

  • Supreme Being
  • Group: Administrators
  • Posts: 3222
  • Joined: 08-December 10

Posted 14 September 2011 - 05:10 AM

Hi,

Welcome to FusionCharts Forum! Posted Image

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.
Help us improve our documentation with your precious feedback at:

http://documentation...sioncharts.com/

Best,

Angshu

Follow us on @Twitter


0

Other Replies To This Topic

#3 User is offline   ScottShea 

  • Forum Newbie
  • Group: Members
  • Posts: 4
  • Joined: 13-September 11

Posted 14 September 2011 - 05:34 PM

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

View PostAngshu, on 14 September 2011 - 05:10 AM, said:

Hi,

Welcome to FusionCharts Forum! Posted Image

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.

0

Other Replies To This Topic

#4 User is offline   Angshu 

  • Supreme Being
  • Group: Administrators
  • Posts: 3222
  • Joined: 08-December 10

Posted 15 September 2011 - 05:41 AM

Hi,

Thank you very much for your appreciation and valuable feedback.

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

Happy FusionCharting!Posted Image
Help us improve our documentation with your precious feedback at:

http://documentation...sioncharts.com/

Best,

Angshu

Follow us on @Twitter


0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic