您的位置:首页 > 其它

highcharts 去掉chart content menu 关于 exporting介绍

2016-04-11 10:57 417 查看
http://www.hcharts.cn/    highcharts官网网址

1、去掉官网的链接

credits:{
enabled:false
},
添加自己需要的网站连接

credits:{
text:"某某公司",
href"http://"
},


enabled:设置是否显示链接

text:设置链接显示的名称

href:设置链接的url

2、去掉chart   content menu 打印功能  图像生成png jpg svg等

exporting:{
enabled:true //用来设置是否显示‘打印’,'导出'等功能按钮,不设置时默认为显示
},


3、 去掉打印功能

JS去除打印功能

exporting.js 图表库去掉 以下代码
printButton : {
symbol :"printIcon",
x :-36,
symbolFill :"#B5C9DF",
hoverSymbolFill :"#779ABF",
_titleKey :"printButtonTitle",
onclick : function() {
this.print()
}
}


4、 highcharts 打印 功能

<span style="white-space:pre">	</span>exporting:
<span style="white-space:pre">		</span>{
//enabled:true,默认为可用,当设置为false时,图表的打印及导出功能失效

buttons:{    //配置按钮选项
printButton:{    //配置打印按钮
width:50,
symbolSize:20,
borderWidth:2,
borderRadius:0,
hoverBorderColor:'red',
height:30,
symbolX:25,
symbolY:15,
x:-200,
y:20

},

exportButton:{    //配置导出按钮
width:50,
symbolSize:20,
borderWidth:2,
borderRadius:0,
hoverBorderColor:'red',
height:30,
symbolX:25,
symbolY:15,
x:-150,
y:20
},

},

filename:'52wulian.org',//导出的文件名

type:'image/png',//导出的文件类型

width:800    //导出的文件宽度

},



exporting属性详解

参数说明默认值
buttons:{

    exportButton:{…},

    printButton:{…}

}
按钮属性,包括导出按钮(exportButton)及打印按钮(printButton)。

可配置相应按钮中具体的属性来改变按钮的大小、样式等
 
enabled是否使用该功能,当我false时,则图表没有导出及打印功能true
filename导出图片文件的文件名,不包含后缀chart
type导出图的类型,有image/png, image/jpeg, application/pdf可选image/png.
url导出功能的服务器地址,导出功能需要相应的服务提供支持。你可以自己搭建服务器,在/exporting-server目录下有相应的源文件http://export.highcharts.com
width导出图片文件的宽度,相应的,高度这按照比例800.0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: