Mansi Shah Report post Posted March 12, 2010 I need to export the fusion chart to PDF, which may contain other data also. So I think for that I need to convert it to image, then I can put that image in PDF with other data. How can I problematically create an image of chart? Share this post Link to post Share on other sites
Guest Madhumita Report post Posted March 12, 2010 Hello, You can use the Export functionality of FusionCharts V3 to export chart as image or PDF. You can view a demo of the Export functionality from the link below: http://www.fusioncharts.com/Demos/ExportChart/Contents/client_export.html Please refer to our documentation on Export functionality from the link below: http://www.fusioncharts.com/docs/ >> Export to Image/PDF Share this post Link to post Share on other sites
Mansi Shah Report post Posted March 16, 2010 Hi, Thanks for the reply. But I am still having some issues, not able to save the image. I am creating the image serve side. Client side code < div id="dvChart" runat="server" > <%=GetChart()%> [server side function which will create categories, dataset and values in xmlData stringbuilder] < /div > < asp:HiddenField ID="hdnXML" runat="server" / > < script type="text/javascript" > //Callback handler method which is invoked after the chart has saved image on server. function myCallBackFunction(objRtn){ if (objRtn.statusCode=="1"){ alert("The chart was successfully saved on server. The file can be accessed from " + objRtn.fileName); }else{ alert("The chart could not be saved on server. There was an error. Description : " + objRtn.statusMessage); } } < /script > < script type="text/javascript" > //Create the chart. Make sure registerWithJS is set to 1, else callback cannot happen. var myChart = new FusionCharts("../FusionCharts/MSColumn3D.swf", "121", "400", "300", "0", "1"); myChart.setDataURL(document.getElementById('hdnXML').value); myChart.render("dvChart"); < /script > Server side code StringBuilder xmlData = new StringBuilder(); xmlData.Append(""); And for rendering, code is, xmlDATA = FusionCharts.RenderChart("../FusionCharts/MSColumn3D.swf","http://localhost/golf/FusionCharts/PDFs/", xmlData.ToString(), "BallTest", "700", "400", false, true); Exporer CS private const string SAVE_PATH = "../FusionCharts/PDFs/"; private const string HTTP_URI = "http://localhost/golf/FusionCharts/PDFs/"; I think client side new FusionCharts() function, but not sure with that. At present it is displaying "Error in loading data" and then some javascript text with that. There is something wrong with above code for sure, but don't know where. Can you please help me out? Share this post Link to post Share on other sites
Bessemer Report post Posted October 17, 2013 It's very smart for you to adpot a image converting applciation to trasform the chart to image and then render image to pdf, for image to pdf saving, I just search a big third party sit and get this: public static void SaveImageFile(Image image, string filePath);public static void SaveImageFile(Image image, string filePath, BaseEncoder enc); Share this post Link to post Share on other sites