从 FusionCharts 导出图像缺少什么拼图?

发布于 2024-11-09 23:06:18 字数 2385 浏览 0 评论 0原文

我正在尝试导出 FusionCharts。

除了指定 registerWithJS="1" 的 XML 文件之外,

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>
<script type="text/javascript" src="FusionCharts/FusionChartsExportComponent.js"></script>

Google 搜索还

<div class="portlet" id="recent-portfolio-trends">
<div title="View graphs and charts of your portfolio." class="portlet-header">Recent Portfolio Trends</div>
<div class="portlet-content">
<!-- Trends -->
<span id="Trends-OS">FusionCharts will load here!</span>
<span id="Trends-Vol">FusionCharts will load here!</span>
<div id="fcexpDiv">FusionCharts Export Handler Component</div>
<div id="fcexpDiv2">FusionCharts Export Handler Component 2</div>
<script type="text/javascript">
    var myChart = new FusionCharts( "FusionCharts/MSColumn2D.swf", "column", "350", "220", "0", "1" );
        myChart.setXMLUrl("FusionCharts/trends-outstandings.xml");
        myChart.render("Trends-OS");

    var myExportComponent = new FusionChartsExportObject("fcExporter1", "FusionCharts/FCExporter.swf");
    myExportComponent.debugMode = true;
    myExportComponent.exportAttributes.exportAtClient = '1';
    myExportComponent.exportFilename = "Outstanding";
    myExportComponent.render("fcexpDiv");
</script>

<script type="text/javascript">
    var myChart = new FusionCharts( "FusionCharts/MSCombi2D.swf", "column", "350", "220", "0", "1" );
        myChart.setXMLUrl("FusionCharts/trends-volume.xml");
        myChart.render("Trends-Vol");

    var myExportComponent2 = new FusionChartsExportObject("fcExporter2", "FusionCharts/FCExporter.swf");
    myExportComponent2.debugMode = true;
    myExportComponent2.exportAttributes.exportAtClient = '1';
    myExportComponent.exportFilename = "Volume";
    myExportComponent2.render("fcexpDiv2");
</script>

以各种形式建议我需要将 registerWithJS 指定为“1”,也许在多个地方,并且我应该在以下位置获得诊断错误代码: debugMode 设置为 True 的警报。 (我在 Chrome 的 JavaScript 控制台上没有收到警报或任何内容。)这是由不同的 Web 服务器提供的,因此这不是“本地文件系统保护”问题。

我得到的是两个正确渲染的图表,再加上两个按钮,上面写着“等待”,并且至少在几分钟后,永远不会更改为其他内容。如果我右键单击图表,上下文菜单会提供“打印图表”、“将数据复制到剪贴板”、“关于 FusionCharts”、“设置...”、“全局设置...”和“关于 Adob​​e Flash Player 10.3” .181.14...”,但没有应该可用的导出为 JPG、PNG 或 PDF 的选项。

关于我需要做什么的建议?

I am trying to get FusionCharts to export.

I have, besides XML files that specify registerWithJS="1",

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>
<script type="text/javascript" src="FusionCharts/FusionChartsExportComponent.js"></script>

and

<div class="portlet" id="recent-portfolio-trends">
<div title="View graphs and charts of your portfolio." class="portlet-header">Recent Portfolio Trends</div>
<div class="portlet-content">
<!-- Trends -->
<span id="Trends-OS">FusionCharts will load here!</span>
<span id="Trends-Vol">FusionCharts will load here!</span>
<div id="fcexpDiv">FusionCharts Export Handler Component</div>
<div id="fcexpDiv2">FusionCharts Export Handler Component 2</div>
<script type="text/javascript">
    var myChart = new FusionCharts( "FusionCharts/MSColumn2D.swf", "column", "350", "220", "0", "1" );
        myChart.setXMLUrl("FusionCharts/trends-outstandings.xml");
        myChart.render("Trends-OS");

    var myExportComponent = new FusionChartsExportObject("fcExporter1", "FusionCharts/FCExporter.swf");
    myExportComponent.debugMode = true;
    myExportComponent.exportAttributes.exportAtClient = '1';
    myExportComponent.exportFilename = "Outstanding";
    myExportComponent.render("fcexpDiv");
</script>

<script type="text/javascript">
    var myChart = new FusionCharts( "FusionCharts/MSCombi2D.swf", "column", "350", "220", "0", "1" );
        myChart.setXMLUrl("FusionCharts/trends-volume.xml");
        myChart.render("Trends-Vol");

    var myExportComponent2 = new FusionChartsExportObject("fcExporter2", "FusionCharts/FCExporter.swf");
    myExportComponent2.debugMode = true;
    myExportComponent2.exportAttributes.exportAtClient = '1';
    myExportComponent.exportFilename = "Volume";
    myExportComponent2.render("fcexpDiv2");
</script>

Google searching suggests in various forms that I need to specify registerWithJS to be "1", perhaps in more than one place, and that I should get a diagnostic error code in an alert with debugMode set to True. (I do not get an alert or anything on Chrome's JavaScript console.) This is being served up by a distinct web server, so it's not a "local filesystem protection" issue.

What I do get are two charts rendered properly, plus two buttons that say "Waiting" and never, at least after a few minutes, change to say anything else. If I right-click the graphs, the contextmenu offers "Print Chart", "Copy data to clipboard", "About FusionCharts", "Settings...", "Global Settings...", and "About Adobe Flash Player 10.3.181.14..." but not the options to export as JPG, PNG, or PDF that should be available.

Suggestions for what I need to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

淑女气质 2024-11-16 23:06:18

您需要在 XML 中设置至少三个与导出相关的 XML 属性,才能启用与导出相关的上下文菜单。它们是:exportEnabled、exportAtClient 和exportHandler。

因此,您的 trends-outstandings.xml 将包含:

<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' ...>

并且 trend-volume.xml 将包含:

<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter2' ...>

另外请确保您使用的是最新的 FusionCharts.js 和 FusionChartsExportComponent.js。

You would need to set at-least three export related XML attributes in your XML to enable the export related context menu. These are : exportEnabled, exportAtClient and exportHandler.

Hence, your trends-outstandings.xml would contain:

<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' ...>

and trends-volume.xml would contain:

<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter2' ...>

Also please make sure you are using the latest FusionCharts.js and FusionChartsExportComponent.js.

偏爱你一生 2024-11-16 23:06:18

请尝试设置exportEnabled='1'

Please try setting exportEnabled='1'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文