Flash图表FusionCharts如何自定义图表导出菜单或界面

FusionCharts的导出组件界面有两种模式 javascript

Compact Mode: 用于保存单张图片,每个单独的导出组件实例都表明单独的图表。在这种模式下,只有一个按钮和标题是可见的。 java

Full Mode: 保存多个图表,不管是单独或做为一个单独的文件。在这种模式下,用户能够选择须要保存的图表以及保存的格式。 字体

在两种模式下,你能够自定义导出组件的颜色、字体和标题。在进入属性以前,先快速看一下导出组件的各类元素。以下图所示: this

 

定制导出组件的属性 spa

配置导出组件的属性时,一样须要在JavaScript中指定(其中的导出组件已经被初始化)。示例代码以下所示: code

<div id="fcexpDiv" align="center">
     FusionCharts Export Handler Component
</div>
<script type="text/javascript">
     var myExportComponent = new FusionChartsExportObject("fcExporter1",
                             "../../FusionCharts/FCExporter.swf");

//Customize the component properties 
//Width and height
 myExportComponent.componentAttributes.width = '400';
 myExportComponent.componentAttributes.height = '60';
//Background color
 myExportComponent.componentAttributes.bgColor = 'ffffdd';
//Border properties
 myExportComponent.componentAttributes.borderThickness = '2';
 myExportComponent.componentAttributes.borderColor = '0372AB';
//Font properties
 myExportComponent.componentAttributes.fontFace = 'Arial';
 myExportComponent.componentAttributes.fontColor = '0372AB';
 myExportComponent.componentAttributes.fontSize = '12';
//Message - caption of export
 component myExportComponent.componentAttributes.showMessage = '1';
 myExportComponent.componentAttributes.message = 'Export the
   chart first, and then click on this button to save';
//Button visual configuration
 myExportComponent.componentAttributes.btnWidth = '200';
 myExportComponent.componentAttributes.btnHeight= '25';
 myExportComponent.componentAttributes.btnColor = 'E1f5ff';
 myExportComponent.componentAttributes.btnBorderColor = '0372AB';
//Button font properties
 myExportComponent.componentAttributes.btnFontFace = 'Verdana';
 myExportComponent.componentAttributes.btnFontColor = '0372AB';
 myExportComponent.componentAttributes.btnFontSize = '15';
//Title of button
 myExportComponent.componentAttributes.btnsavetitle = 'Save the chart'
 myExportComponent.componentAttributes.btndisabledtitle = 'Waiting for export'; 
//Render the exporter SWF in our DIV
 fcexpDiv myExportComponent.Render("fcexpDiv");
</script>

通过上面的操做以后,导出组件的各类参数就已经完成指定了。须要遵循如下语法: component

Component_Instance.componentAttributes.Parameter_name = 'Value'; 图片

示例: ip

myExportComponent.componentAttributes.width = '400';
相关文章
相关标签/搜索