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>