问题:使用highcharts不想显示无用的东西,如何设置
解决:在js中配置
方法:
配置如下:
$(function () {
$('#container').highcharts({
chart: {
polar: true,
type: 'line'
},
title: { // 不显示标题
text: '',
},
credits: { // 不显示版权信息
enabled: false
},
exporting: { // 不显示导出图片
enabled:false
},
pane: {
size: '80%'
},
xAxis: {
categories: ['销售', '市场营销', '发展', '客户支持',
'信息技术', '行政管理'],
tickmarkPlacement: 'on',
lineWidth: 0
},
yAxis: {
gridLineInterpolation: 'polygon',
lineWidth: 0,
min: 0
},
tooltip: {
shared: true,
pointFormat: '<span style="color:{series.color}">{series.name}: ${point.y:,.0f}<br/>'
},
legend: { // 不显示说明
enabled: false
},
series: [{
name: '预算拨款',
data: [43000, 19000, 60000, 35000, 17000, 10000],
pointPlacement: 'on'
}, {
name: '实际支出',
data: [50000, 39000, 42000, 31000, 26000, 14000],
pointPlacement: 'on'
}]
});
});