spectrum Report post Posted January 9, 2010 Hi, I have a project where I am refreshing a div with a chart via xmlhttprequest, and I am running some Javascript from the response - when I try to set a chartWidth of 100% within the ajax-provided response the chart is not displayed at all. If I use a chartWidth that is a pixel value then it does work. Can anyone explain what is going on, and how I can get FusionCharts to support a width of 100% when operating using this technique. Sorry that I have not shown any code in the actual post - I have attached some simple html and xml files that demonstrate the behaviour. Thanks very much. FusionChartsTest.zip Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 11, 2010 Hello, There were some issues with double quotes and single quotes while using parameters to instantiate a new chart. I have modified the necessary parts in your code. I am attaching them for your reference. Hope this helps. Looking forward to your reply. FusionChartsTest.zip Share this post Link to post Share on other sites
spectrum Report post Posted January 11, 2010 Hi Madhumita, When I try your version I get the same problem - the second chart does not display at all. I am using IE 7.0.6001.18000. Does it work for you? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 13, 2010 Hello, in your code could you please replace myChart2.render("ajaxdiv"); with document.getElementById("chartdiv").innerHTML = myChart2.getSWFHTML(); ? Hope this helps. Share this post Link to post Share on other sites
spectrum Report post Posted January 13, 2010 Hi Madhumita, Yes that works, and it also works with : document.getElementById("ajaxdiv").innerHTML = myChart2.getSWFHTML(); I need it to work with the "ajaxdiv" reference because the xmlhttpresponse will send html with variable div containers into which I will need to render the charts, and I won't know the names of the container divs until the xmlhttpresponse is received. i.e. ajaxdiv might not be called ajaxdiv, but will be named according to dynamic rules. Do you suggest I change my production code as above, or are you still investigating? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted January 14, 2010 Hello, You can use any division name to render the chart, as you wish to. As of now, please implement with this code while using AJAX Call. In our next FusionCharts.js, we will try to overcome this issue. Share this post Link to post Share on other sites