【发布时间】:2020-07-29 05:00:35
【问题描述】:
我正在尝试显示图表,但它没有显示 column bar 。我的浏览器控制台没有看到任何错误,下面是我的脚本
$('#complete_chart').highcharts({
chart: {
type: 'column',
margin: 75,
options3d: {
enabled: false,
alpha: 10,
beta: 25,
depth: 70
}
},
title: {
text: 'Performance',
style: {
fontSize: '18px',
fontFamily: 'Verdana, sans-serif'
}
},
subtitle: {
text: 'Complete',
style: {
fontSize: '15px',
fontFamily: 'Verdana, sans-serif'
}
},
plotOptions: {
column: {
depth: 25
}
},
credits: {
enabled: false
},
exporting: {
enabled: false
},
xAxis: {
categories: ["25","35","23","36","34"]
},
yAxis: {
title: {
text: ''
},
},
tooltip: {
formatter: function() {
var s = '<b>'+ this.point.project_name +'</b>';
return s;
}
},
series: [{
name: 'Report Data',
data: [{"name":"Progress 1","val":100},{"name":"Progress 1","val":-165},{"name":"Progress 1","val":-1233},{"name":"Progress 1","val":-1114},{"name":"Progress 1","val":-175}],
shadow : true,
dataLabels: {
enabled: true,
color: '#045396',
align: 'center',
formatter: function() {
return Highcharts.numberFormat(this.val, 0);
}, // one decimal
y: 0, // 10 pixels down from the top
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
}]
});
我错过了什么吗?
【问题讨论】:
标签: javascript json highcharts