原創|使用教程|編輯:郝浩|2013-08-12 11:43:19.000|閱讀 4057 次
概述:FusionCharts的導出組件界面有兩種模式,本次的教程將對如何自定義FusionCharts圖表的菜單和界面進行詳細說明,并附上示例代碼。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
FusionCharts的導出組件界面有兩種模式:
在兩種模式下,你可以自定義導出組件的顏色、字體和標題。在進入屬性之前,先快速看一下導出組件的各種元素。如下圖所示:
配置導出組件的屬性時,同樣需要在JavaScript中指定(其中的導出組件已經被初始化)。示例代碼如下所示:
<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_Instance.componentAttributes.Parameter_name = 'Value';
示例:
myExportComponent.componentAttributes.width = '400';
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網