无法在 Fusion Charts v3 中保存图像
我已使用 Fusion Charts v3 API 成功创建了 2D 饼图。以下是我的 HTML 文件:
<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 Charts 文档中所述,我的文件夹中有以下文件:
FCExporter.swf
FusionCharts.js
FusionChartsExportComponent.js
highcharts.js
jquery.min.js
Pie2D.swf
我无法将图像导出并保存为 jpeg/png/pdf。 “捕获”过程启动并完成至 100%,但我没有看到任何弹出的“另存为”窗口。我的Flash版本是10.2.x。
请帮忙。
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>
and this is my XML file :
<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>
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
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.
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我尝试了你的代码,它在这里对我来说效果很好。导出组件的保存按钮在捕获完成后启用。
我认为问题出在您机器上的闪存全局设置上。
从 FusionCharts 文档中,
访问闪存全局设置站点并允许访问特定文件夹或整个驱动器的闪存。这应该可以解决你的问题。
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.
From the FusionCharts documentation,
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.
捕获过程完成后,您将不会看到任何“另存为窗口”。您的导出组件的“保存”按钮将被启用,或者导出组件的列表将被填充。
You won't see any "save as window" after the capture process is complete. Your Export Component' Save button would get enabled or the Export Component's list would get populated.