问题描述
- highchart 柱状图有两个导出按钮 怎么解决
-
/**- 柱状图方法
- @param {} jsonXData x轴数据
- @param {} jsonyD y轴数据
- @param {} pannele 放置柱状图的div
*/
function chart(jsonXData,jsonyD,panele){
//定义导出按钮汉化
Highcharts.setOptions({
lang: {
printChart:"打印图表",
downloadJPEG: "下载JPEG 图片" ,
downloadPDF: "下载PDF文档" ,
downloadPNG: "下载PNG 图片" ,
downloadSVG: "下载SVG 矢量图" ,
exportButtonTitle: "导出图片"
}
});
panele.highcharts({
chart: {
type: 'column',
margin: [ 50, 50, 100, 100]
},
title: {
text: '日志报表'
},
credits:{enabled:false},
xAxis: {
categories: jsonXData,
labels: {
rotation: -40,
align: 'right',
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
},
yAxis: {
min: 0,
title: {
text: '日志记录总数'
}
},
legend: {
enabled: false
},
tooltip: {
pointFormat: '{point.y:.1f} 次',
},
series: [{
data: jsonyD,
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
textShadow: '0 0 3px black'
}
}
}]
})
}
时间: 2024-10-03 13:06:30