Anu*_*ngh 13 javascript jquery highcharts highstock
我想在高亮局导出选项中隐藏默认按钮("导出"和"打印").
您可以在http://jsfiddle.net/fXHB5/3496/ 进行演示,此链接中有3个按钮1.自定义按钮2.导出按钮3.打印按钮.
在这种情况下,我想只显示第一个按钮并隐藏"导出按钮"和"打印按钮"
GGG*_*GGG 19
您可以使用以下内容访问每个按钮首选项:
exporting: {
buttons: {
printButton: {
symbol: 'circle'
},
exportButton: {
enabled: false
}
}
}
Run Code Online (Sandbox Code Playgroud)
使用自定义按钮的可扩展示例如下:
exporting: {
buttons: {
printButton: {
enabled: false
},
exportButton: {
enabled: false
},
custom: {
symbol: 'diamond',
x: -62,
symbolFill: '#B5C9DF',
hoverSymbolFill: '#779ABF',
_titleKey: 'printButtonTitle',
onclick: function () {
alert('click!')
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
For*_*mad 16
对于使用较新版本的高级图表并且所选答案不起作用的任何其他人,您需要使用以下内容来隐藏按钮.
exporting: {
buttons: {
contextButton: {
enabled: false
}
}
}
Run Code Online (Sandbox Code Playgroud)
这不是一个选项,但您可以隐藏默认按钮,然后使用html创建自己的按钮.然后,您可以根据需要绑定自定义按钮.
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
credits: {
enabled: false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}],
exporting: {
enabled: false
}
});
console.log( Highcharts.Renderer.prototype.symbols )?
Run Code Online (Sandbox Code Playgroud)