fusioncharts 改变导出图片按钮的背景色 FusionChartsExportObject

 
导出时的中文菜单怎么定制例子:
<chart exportEnabled='1'  exportAtClient='1' exportDialogMessage='正在导出,请稍候...' exportFormats='JPEG=导出为JPG图片|PNG=导出为PNG图片|PDF=导出为PDF文件'>

Flash10的导出按钮中文化及定制是通过js完成的:
<div id="fcexpDiv" align="center">XXXXXXXXXXXXXXXXXXXXXX</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", "/FusionCharts/Charts/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 = '在报表上右键导出,然后点此按钮保存图片';
//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 = '图片已生成,点击保存'
myExportComponent.componentAttributes.btndisabledtitle = '报表上右键可以导出图片';
//Render the exporter SWF in our DIV fcexpDiv
myExportComponent.Render("fcexpDiv");
</script>

对了,最最重要的,如果要使用client-side导出,别忘了在用js调用FusionCharts时,设定最后一个参数为1!!
<div id="chartdiv" align="center">The chart will appear within this DIV.</div>
<script type="text/javascript">
var myChart = new FusionCharts("/FusionCharts/Charts/Column2D.swf", "myChartId", "900", "300", "0", "1");
//就是上面这最后一个参数,必须是1,才能和另外那个控制按钮交互
myChart.setDataURL("/xml/fc_cn.xml");
myChart.render("chartdiv");
</script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值