﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts Free / General Usage  / Dynamic manipulation of an image / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Tue, 14 Oct 2008 08:08:21 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Thanks...&lt;/P&gt;&lt;P&gt;But why do I get a blank page after RF_Rendered() executed?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jo</description><pubDate>Thu, 01 May 2008 02:11:32 GMT</pubDate><dc:creator>garfild</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I am afraid, the progress bar can not be eliminated.</description><pubDate>Wed, 30 Apr 2008 05:20:26 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Guys,&lt;/P&gt;&lt;P&gt;It works great but now after loading the chart, I see this progress bar and after the image is automaticaly saved I get a blank page instead of the chart.&lt;/P&gt;&lt;P&gt;Can I eliminate this progress bar?&lt;/P&gt;&lt;P&gt;Why do I get a blank page?&lt;/P&gt;&lt;P&gt;Thanks guys again&lt;/P&gt;&lt;P&gt;Jo</description><pubDate>Wed, 30 Apr 2008 01:37:51 GMT</pubDate><dc:creator>garfild</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>It doesn't matter whether you use DataURL or DataXML. Make sure the chartd id and div id where you are embedding the chart are not the same. In the head section of your html add the following function&lt;br&gt;&lt;br&gt;[code]&lt;br&gt;        function FC_Rendered(DOMId) {&lt;br&gt;            alert(DOMId);&lt;br&gt;            //getChartFromId(DOMId).saveAsImage();&lt;br&gt;        }&lt;br&gt;[/code]     &lt;br&gt;&lt;br&gt;Then embed the following in the body of your html, not the last parameter in the new FusionCharts constructor below is 1 which registers the chart with the JS&lt;br&gt;&lt;br&gt;[code]&lt;br&gt;        var chart = new FusionCharts("Charts/MSBar3D.swf", "chartid", "400", "300", "0", "1");&lt;br&gt;        chart.setDataURL("Data/chart.xml");&lt;br&gt;        chart.render("chartdiv");&lt;br&gt;[/code]</description><pubDate>Tue, 29 Apr 2008 08:57:08 GMT</pubDate><dc:creator>exwhyz</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Hi again,&lt;/P&gt;&lt;P&gt;I'm using an xml (build in advanced) to render the FC&lt;/P&gt;&lt;P&gt;myChart.setDataURL(xmlURL);&lt;BR&gt;myChart.render(xmlURL);&lt;/P&gt;&lt;P&gt;maybe this is the reasong the saveAsImage() doent work?</description><pubDate>Tue, 29 Apr 2008 08:48:11 GMT</pubDate><dc:creator>garfild</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I have done all the followings, still,&lt;/P&gt;&lt;P&gt;savaAsImage() doesnt work (I have put alerts before and after).&lt;/P&gt;&lt;P&gt;Can you think of a reason why this function doesnt work?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jo </description><pubDate>Tue, 29 Apr 2008 08:10:00 GMT</pubDate><dc:creator>garfild</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>In addition you need to add the registerJS flag to the new Chart constructor. It is the last parameter if you look at the sample chart creation logic. This will then trigger the FC_rendered event.</description><pubDate>Mon, 28 Apr 2008 23:44:53 GMT</pubDate><dc:creator>exwhyz</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>thanks,&lt;/P&gt;&lt;P&gt;According to documentation I can add the following to a jsp file:&lt;/P&gt;&lt;P&gt;&amp;lt;SCRIPT LANGUAGE="JavaScript"&amp;gt;&lt;BR&gt;      &lt;STRONG&gt;function saveChart(){&lt;BR&gt;        &lt;SPAN class=codeComment&gt; //Get chart from its ID&lt;/SPAN&gt;&lt;BR&gt;         var chartToPrint = getChartFromId("chart1Id");&lt;BR&gt;         chartToPrint.saveAsImage();&lt;BR&gt;      }&lt;/STRONG&gt;&lt;BR&gt;      &amp;lt;/SCRIPT&amp;gt;&lt;BR&gt;.. and it should be enough,&lt;/P&gt;&lt;P&gt;but it doesnt, it stopps at saveAsImage() :(&lt;/P&gt;&lt;P&gt;Should I add the FC_Rendered()? where?&lt;/P&gt;&lt;P&gt;If I dont want to mess with the jpg location, can I leave the content of FusionChartsSave.jsp as is?&lt;/P&gt;&lt;P&gt;upgrading from ver 2.3 to ver3 should i change FusionCharts.js?&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Jo</description><pubDate>Mon, 28 Apr 2008 09:04:13 GMT</pubDate><dc:creator>garfild</dc:creator></item><item><title>RE: Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;You can tweak your image saving code to save image to a server side folder with out user inteference. But, the chart &lt;STRONG&gt;needs &lt;/STRONG&gt;to be rendered once at client side. Once that is done you can use JavaScript FC_Rendered() function to call the saveAsImage() function to send data to server side image saving script where you can save the chart to a file in the server's directory. For this you would need to modify the image saving code not to flush the image create to the resposne stream. Rather save the image. &lt;/P&gt;&lt;P&gt;In php you would need to comment some line and add the destination filename :&lt;/P&gt;&lt;P&gt;// JPEG Header&lt;BR&gt;//header('Content-type:image/jpeg');&lt;BR&gt;// Force download box if not IE&lt;BR&gt;//header('Content-Disposition: attachment; filename="FusionCharts.jpg"');&lt;/P&gt;&lt;P&gt;// JPEG Output with 100 quality&lt;BR&gt;imagejpeg($chart, "ThePathToImage.jpeg", 100);&lt;/P&gt;&lt;P&gt;In JSP it would be :&lt;/P&gt;&lt;P&gt;//response.setContentType("image/jpeg");&lt;BR&gt;//response.addHeader("Content-Disposition", "attachment; filename=\"FusionCharts.jpg\"");&lt;BR&gt;//OutputStream os = response.getOutputStream();&lt;BR&gt;&lt;STRONG&gt;ImageIO.write&lt;/STRONG&gt;(chart, "jpeg", new File("PathToSave.jpg")&lt;BR&gt;//os.close();&lt;BR&gt;&lt;/P&gt;&lt;P&gt;This way you can modify your ASP.NET code and other codes too.</description><pubDate>Mon, 28 Apr 2008 06:22:42 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>Dynamic manipulation of an image</title><link>http://www.fusioncharts.com/forum/Topic5974-40-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;The Save as Image feature works great.&lt;/P&gt;&lt;P&gt;I need to invoke the image creation in a nother way (it should be eliminated from the user)&lt;/P&gt;&lt;P&gt;Can I do this on the server side?&lt;/P&gt;&lt;P&gt;Can I set the target pathame for the image?&lt;/P&gt;&lt;P&gt;thanks alot&lt;/P&gt;&lt;P&gt;Jo </description><pubDate>Mon, 28 Apr 2008 05:51:42 GMT</pubDate><dc:creator>garfild</dc:creator></item></channel></rss>