matthew_pond Report post Posted March 5, 2010 I have 7 charts in a page and I need to export all the charts to the server and then I'm going to do some clever stuff to create a PDF inserting all the charts into PDF, combining it with outher data in the PDF to create a report. The problem I have is that the charts won't export until they have been rendered in the page, and in order to do this I need to view each graph and scroll down the page, is there anyway I can force the charts to render without scrolling down the page and viewing them. I have had a look in IE and it looks like it renders all the charts straight away, but what about IE? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted March 5, 2010 Hello, You can check if a chart has rendered using the hasRendered() function. If this returns 1 then you can call the export function on the chart. You can also test if The FC_Rendered() event has fired for the charts in concern. ref. - http://www.fusioncharts.com/docs/Contents/JS_Example.html Share this post Link to post Share on other sites
matthew_pond Report post Posted March 5, 2010 Hi, Thanks for the reply, I have all the code in place to make sure the graph has rendered before it tries to export. But in in Firefox you have to scroll down the page and view every chart for it to render them, from a useability point of view this is not great as I have a print button at the top of my page, clicking the button launches my Javascript function that is saving each graph image to the server. I don't want to force the user to view all the charts before they can export them, I was hoping there was some way I could change a setting to tell firefox to render the chart straight away, or use Javascript in my function to render the chart if has not been rendered already?! Thanks Matt Share this post Link to post Share on other sites
Guest Madhumita Report post Posted March 5, 2010 (edited) Hello, What you can do is let the Print Button to be disabled initially. When all the charts return hasRendered as true, then enable the button. So the client-will not have to move down. Edited March 5, 2010 by Guest Share this post Link to post Share on other sites
raekwon Report post Posted March 9, 2010 Hello, I'm expiriencing the same problem. If a Chart isn't visible, it simply won't render in Firefox. Turns out this is _not_ a FusionCharts but a Firefox problem with the newest versions of the Flash Player. I found other people with this problem here: http://support.mozilla.com/en-US/forum/1/369466 There seems to be no solution at the moment. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted March 9, 2010 Hello, Welcome to FusionCharts Forum. As of now, we do not have any workaround. As soon as we do, we will post it here in the forum. Share this post Link to post Share on other sites
raekwon Report post Posted March 9, 2010 I found a solution to that problem that works for me. Removing the wmode parameter from the Flash Object seems to render it even when hidden. Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted March 9, 2010 Hi, Thanks for sharing your idea. Glad that your issue is resolved. Share this post Link to post Share on other sites
Guest Madhumita Report post Posted March 9, 2010 Hey, Would it be possible for you to send us a sample code? It would be a good reference for our future users. Share this post Link to post Share on other sites
matthew_pond Report post Posted March 18, 2010 Thanks for all your input guys. The solution I found was... 1. When the user hits the print button a jQuery Impromptu popup appears asking the user to select what charts then want to print by ticking various tick boxes. http://demos.flesler.com/jquery/scrollTo/ 2. When the above popup is loaded, a callback function is used to scroll down the page and back to the top. But because there is an Inpromptu popup the users doesn't see the page scrolling up and down. http://demos.flesler.com/jquery/scrollTo/ Effectivly I'm tricking the browser to think the user has scrolled up and down the page and know it has to render the chart. 3. By the time the user has selected the charts they want to print the pages has rendered all charts 4. They then hit print, and export images to the server for each chart 5. Once the final chart they eported is done, using another callback function I create a PDF with all the charts in 6. Job done! Share this post Link to post Share on other sites
srividya_sharma Report post Posted March 21, 2010 Hi Thanks for sharing the code with us. I am sure, other users will find it very useful. Srividya Share this post Link to post Share on other sites