giovanni.mv Report post Posted March 13, 2012 Hi, I'm trying to print a gantt graph by Javascript, like the default print mode (right click -> print chart), but it doesn't reconize the method "print". What I'm doing is: var myChart = new FusionCharts("../../common/baseclass/chart/fusioncharts/Gantt.swf", "myChartId", <?=$width?>,<?=$height?>, "0", "0"); myChart.setDataURL("../../temp/<?=$ob_xml->getXmlName()?>"); myChart.render("divGantt"); And after: var chartReference = FusionCharts("myChartId"); chartReference.print(); Is it possible to print this graph using Javascript? Thanks for the answer! xmlgantt52c68863.xml Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted March 15, 2012 (edited) Hi, You can able to print chart by using browser's File->Print menu, JavaScript's native window.print() function, Chart's context menu, FusionCharts JavaScript API function print () or Print Manager's advanced function ManagedPrint (). I am able to print the Gantt chart using your XML file. Attached here the sample for your reference. Please un-zip the file and open the index.html page in the browser. After the chart render in the browser, you can print by clicking on the HTML click button (provided below the chart using JavaScript method) or by right click on the chart's context menu -> print chart . Hope this helps! Edited March 15, 2012 by Sashibhusan Share this post Link to post Share on other sites
giovanni.mv Report post Posted March 15, 2012 Hi, You can able to print chart by using browser's File->Print menu, JavaScript's native window.print() function, Chart's context menu, FusionCharts JavaScript API function print () or Print Manager's advanced function ManagedPrint (). I am able to print the Gantt chart using your XML file. Attached here the sample for your reference. Please un-zip the file and open the index.html page in the browser. After the chart render in the browser, you can print by clicking on the HTML click button (provided below the chart using JavaScript method) or by right click on the chart's context menu -> print chart . Hope this helps! Hi, Thanks for your answer, but with your files, the error continues. When I click on the button "Click", to print, I have the same Javascript error: "object doesn't support this property or method 'print'". I tryed in other two machines and it gives the same error. Have any idea? Thanks Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted March 16, 2012 Hi, If you are using Firefox browser then could you please enable the Firebug and inspect errors by Breaking on all errors and share the result with us? For all other browsers(except Firefox) please open the browser console and share the information with us, as we are not able to get any error for the sample ZIP file that I have posted. Also could you please try printing the chart by enabling print manager of FusionCharts JavaScript API? Ref. Code: FusionCharts.printManager.enabled(true); //write this line of code just before creating FusionCharts JavaScript instance variable. var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); ... For more details on "Managed Printing", please follow the link below: http://docs.fusioncharts.com/charts/contents/?JavaScript/JS_PrintManager.html Awaiting your response! Hi, Thanks for your answer, but with your files, the error continues. When I click on the button "Click", to print, I have the same Javascript error: "object doesn't support this property or method 'print'". I tryed in other two machines and it gives the same error. Have any idea? Thanks Share this post Link to post Share on other sites
giovanni.mv Report post Posted March 16, 2012 Hi, If you are using Firefox browser then could you please enable the Firebug and inspect errors by Breaking on all errors and share the result with us? For all other browsers(except Firefox) please open the browser console and share the information with us, as we are not able to get any error for the sample ZIP file that I have posted. Also could you please try printing the chart by enabling print manager of FusionCharts JavaScript API? Ref. Code: FusionCharts.printManager.enabled(true); //write this line of code just before creating FusionCharts JavaScript instance variable. var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" ); ... For more details on "Managed Printing", please follow the link below: http://docs.fusionch...intManager.html Awaiting your response! Hi Sashibhusan! I've enabled the print manager and the error continues. I attached the images with the error on Mozila and IE (with the JS graph properties, without "print" method). Thank you again! Share this post Link to post Share on other sites
Guest Sumedh Report post Posted March 19, 2012 Hi, Could you please configure Flash Player Global Security Settings? Flash Player's Global Security implementation blocks JavaScript to interact with charts (Flash charts) when you are running the the web page or application with charts from local file system. To configure Flash Player Global Security Settings (to enable links and chart APIs) and enable JavaScript calls from charts, you will need to add the folder containing the chart SWF files to Flash Player's Trusted Zone. Refer the following link to configure Flash Player Global Security Settings: http://docs.fusioncharts.com/charts/Tools/FlashPlayerSecuritySetup/HowToSetup.html Share this post Link to post Share on other sites
giovanni.mv Report post Posted March 19, 2012 Hi, Could you please configure Flash Player Global Security Settings? Flash Player's Global Security implementation blocks JavaScript to interact with charts (Flash charts) when you are running the the web page or application with charts from local file system. To configure Flash Player Global Security Settings (to enable links and chart APIs) and enable JavaScript calls from charts, you will need to add the folder containing the chart SWF files to Flash Player's Trusted Zone. Refer the following link to configure Flash Player Global Security Settings: http://docs.fusionch...HowToSetup.html Thank you very much! It works now!!! Share this post Link to post Share on other sites