Reputation: 2390
Consider the following high chart
At 15 jun, category II has no data, what if I dont want that spacing left for it, Is there anyway to remove such spaces.
for code reference
`http://jsfiddle.net/G5S9L/8/`
Upvotes: 3
Views: 1375
Reputation: 108512
I don't see anything in the API that allows you to do this. As a kludgy workaround you could shift the columns yourself in the onload callback:
, function(chart){
var barLeft = $(chart.series[0].data[1].graphic.element);
var barRight = $(chart.series[2].data[1].graphic.element);
barLeft.attr('x',parseInt(barLeft.attr('x')) + parseInt(barLeft.attr('width'))/2);
barRight.attr('x',parseInt(barRight.attr('x')) - parseInt(barRight.attr('width'))/2);
});
Updated fiddle.
Upvotes: 3
Reputation: 3384
This is how Highcharts
work. It calculates the space for categories, then divide it between series. It doesn't matter if you have data or not, space is given for possible points.
Upvotes: 2