I am working with an unstacked bar chart when the data is all zero. The yAxis in the middle is a straight line when the data length smaller than or equal to 4, when the data length is bigger than four the yAxis become a dashed line. If I add 'stacking': normal to the series to make the bar chart a stacked bar chart, the yAxis is always a straight line. See the fiddle
http://jsfiddle.net/junkainiu/u6sgyxL6/5/
html
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
js
$(function () {
$('#container').highcharts({
chart: {
type: 'bar',
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [0,0,0,0],
stacking: 'normal'
}]
});
});
and
http://jsfiddle.net/junkainiu/bz22h3eb/7/
html
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
js
$(function () {
$('#container').highcharts({
chart: {
type: 'bar',
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [0,0,0,0,0],
}]
});
});
to see the difference. In highcharts, the default minPointLength is zero, but it doesn't seem to work in unstacked bar charts. So I would like to make the yAxis a straight line no matter it is a stacked chart or unstacked chart. Is there a way to do this? Thanks