已经在yAxis中设置min:0了,但是当数值全为负数时还是会显示为负数
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: '分析图'
},
subtitle: {
text: ''
},
xAxis: {
categories: ['当前配置', '智能配置', '最高配置'],
crosshair: true,
labels : {
style : {
'fontSize' : '20px'
}
}
},
yAxis: [{
min: 0,
title: {
text: '人民币 (元)',
align: 'high'
}
}],
plotOptions: {
column: {
pointPadding: 0.3,
borderWidth: 0
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 0,
y: 20,
floating: true,
borderWidth: 1,
backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
shadow: true
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
series: [{
name: '资产',
color: 'rgba(200,200,169,1)',
data: [-90,-90,-90]
}, {
name: '收入',
color: 'rgba(131,175,155,1)',
data: [-60,-60,-60]
}]
});
});