答案 0 :(得分:0)
使用plotLines
绘制线条,将值设置为0:
plotLines: [{
color: '#000000',
width: 1,
value: 0
}],
这是一个演示:
$(function () {
$('#container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Column chart with negative values'
},
xAxis: {
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
},
credits: {
enabled: false
},
series: [{
name: 'John',
data: [5, 3, 4, 7, 2]
}, {
name: 'Jane',
data: [2, -2, -3, 2, 1]
}, {
name: 'Joe',
data: [3, 4, 4, -2, 5]
}],
yAxis:{
gridLineWidth: 0,
plotLines: [{
color: '#000000',
width: 1,
value: 0
}],
labels: {
enabled: false
}
}
});
});

rect {
stroke-width:0;
}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
&#13;
PS:这个条形图的代码不是我的,我从Highcharts&#39;网站:http://www.highcharts.com/demo/column-negative