无法在Fusion Charts v3中保存图像 [英] Unable to save image in Fusion Charts v3

查看:181
本文介绍了无法在Fusion Charts v3中保存图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Fusion Charts v3 API成功创建了2D饼图。以下是我的HTML文件:

I have successfully created a 2D Pie Chart using Fusion Charts v3 API. Following is my HTML file :

<html>
  <head>        
    <title>My First chart using FusionCharts</title>    
    <script type="text/javascript" src="FusionCharts.js">
    </script>
    <script type="text/javascript" src="FusionChartsExportComponent.js">
    </script>

  </head>   
  <body>     
    <div id="chartContainer"></div>          
    <script type="text/javascript">         

      var myChart = new FusionCharts( "Pie2D.swf", 
      "myChartId", "500", "500", "0", "1" );
      myChart.setXMLUrl("age-demographics.xml");
      myChart.render("chartContainer");


    </script>     

    <div id="fcexpDiv" align="center">FusionCharts Export Handler Component</div>
     <script type="text/javascript"> 
        //Render the export component in this     
        //Note: fcExporter1 is the DOM ID of the DIV and should be specified as value of exportHandler      
        //attribute of chart XML.      
        var myExportComponent = new FusionChartsExportObject("fcExporter1", "FCExporter.swf");
        myExportComponent.debugMode = true;
        //Render the exporter SWF in our DIV fcexpDiv      
        myExportComponent.Render("fcexpDiv");   
    </script>
  </body> 
</html>

这是我的XML文件:

<chart caption='Age Demographics' showPercentValues='1' exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' showExportDataMenuItem='1'>
    <set label='3-11' value='0' />
    <set label='12-17' value='5' />
    <set label='18-25' value='99' />
    <set label='26-34' value='65' />
    <set label='35-49' value='0' />
    <set label='50+' value='5' />
</chart>

我在Fusion图表文档中所述的文件夹中有以下文件:

I have the following files in my folder as said in the Fusion Charts Documentation:

FCExporter.swf
FusionCharts.js
FusionChartsExportComponent.js
highcharts.js
jquery.min.js
Pie2D.swf

我无法导出并保存图像为jpeg / PNG / PDF。 捕获进程启动并完成自身到100%,但是我没有看到任何弹出的保存为窗口。我的Flash版本是10.2.x。

I am unable to export and save the image as jpeg/png/pdf. The "capture" process initiates and completes itself to 100% but I don't see any popup "save-as" window. My flash version is 10.2.x.

请帮助。

推荐答案

I tried out your code and it works fine for me here. The save button of the export component gets enabled after capturing is completed.

我认为问题在于您的计算机上的全局闪存设置。

I think that the problem is with flash global settings on your machine.

从FusionCharts文档中,

From the FusionCharts documentation,


运行客户端示例时,请确保您已经复制 - 将示例(以及../FusionCharts文件夹)粘贴到您的服务器(本地主机或远程)。为什么它们不适用于本地文件系统的原因是Adobe Flash Player出于安全原因阻止Flash到JavaScript本地文件系统的通信,FusionCharts用于客户端导出。如果您需要覆盖特定文件夹,则需要访问 http: //www.macromedia.com/support/documentation/en/flash player / help / settings_manager04.html,然后在该界面中将包含我们的示例的文件夹添加到允许的文件夹列表中。

When running client-side examples, make sure that you've copied-pasted the examples (along with ../FusionCharts folder) to your server (either localhost or remote). The reason why they would not work on local files system is that Adobe Flash Player blocks Flash to JavaScript communication on local file system for security reasons, which FusionCharts uses for client-side exporting. If you need to over-ride that for a specific folder, you'll need to visit http://www.macromedia.com/support/documentation/en/flash player/help/settings_manager04.html and then in that interface add the folder containing our examples to the list of allowed folder.

访问Flash全局设置站点,并允许访问特定文件夹或整个驱动器的闪存。这应该可以解决你的问题。

Visit the flash global settings site and allow access to flash for the specific folder or for the whole drive. This should solve your problem.

这篇关于无法在Fusion Charts v3中保存图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆