|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 3/22/2008 9:37:53 PM
Posts: 2,
Visits: 5
|
|
Does a JavaScript hook/function exist for the "Save As Image" menu item to make that publicly available (via actionscript) to the JavaScript API?
We want to create a button on the page so that users can download their chart as a JPEG without having to right-click on the chart itself. Otherwise they may never know that the option to download exists.
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 2 days ago @ 2:56:41 AM
Posts: 704,
Visits: 1,139
|
|
| hi, We are afraid, FusionCharts does not, as yet, expose the JS API to hook image saving function. But we are working on this.
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/18/2008 2:50:56 AM
Posts: 9,
Visits: 24
|
|
Hi ,
I want to save the charts as image and then move it into the pdf file using javascript. I downloaded v3 evaluation version .I try to do it the same . But I find an error in FusionCharts.js . When i try save the chart it hows an error "chartToPrint.saveAsImage() does not support method". So Could you please provide the details or any source code?
Dharmendra
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 2 days ago @ 2:56:41 AM
Posts: 704,
Visits: 1,139
|
|
| hi, Though I am writing this long after v3.0.6 launch, since then FusionCharts supports Image saving API call using JavaScript. For this you need to set register with JS option on. That will not give the error that you are mentioning. Please refer to our online documentaion's page - http://www.fusioncharts.com/docs/Contents/JS_saveAsImage.html for more on this.
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/18/2008 2:50:56 AM
Posts: 9,
Visits: 24
|
|
Hi ,
I did it the same as mentioned in the link( as you provided ) .I throws the javascript error for saveAsImage function .I also set JS variable. I copy the same as mentioned in documentation along with the required changes.I am using evaluation version .This version provides such facility or not .Can you please confirm me. Is there any work around?
Thanks
Dharmendra
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: 2 days ago @ 2:56:41 AM
Posts: 704,
Visits: 1,139
|
|
| Hi, All features are enabled in Eval version.
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/29/2008 12:08:35 PM
Posts: 6,
Visits: 17
|
|
| Hi, I finally figured out what the issue was with the charttoprint object does not support that method or property error in IE that I was receiving. I figured it out that I have to call registerWithJS on the FlashVars param in order for IE to to acknowledge the OBJECT's id as in: so.addParam("FlashVars","&dataURL=cache/myfile.xml®isterWithJS=1"); Once I provided that, it worked fine. I was relying on the "1" flag on the new instantiation function but it ignores that in IE. Here's what I ended up using that works: <SCRIPT LANGUAGE="JavaScript"> function saveChart(chartID){ var chartToPrint = getChartFromId(chartID); chartToPrint.saveAsImage(); } </SCRIPT> <script type="text/javascript"> var so = new FusionCharts('FusionCharts/Area2D.swf', 'chart1Id','600','400','0','1','FFFFFF','exactFit','','8'); so.addParam("type", "application/x-shockwave-flash"); so.addParam("id", "chart1Id"); so.addParam("FlashVars","&dataURL=cache/myfile.xml®isterWithJS=1"); so.addParam("movie", "FusionCharts/Area2D.swf"); so.addParam("quality", "high"); so.addParam("menu", "true"); so.addParam("wmode", "opaque"); so.addParam("pluginurl", "http://www.macromedia.com/go/getflashplayer"); so.render("chart1div"); </script> <a href="" onClick="saveChart('chart1Id');">Save Chart</a> I hop this helps someone out there .
|
|
|
|