Accepted answer

update: as of highcharts version 4.1.8 , see adam goodwin's answer, below.

for many years, the only way to set the maximum width of the columns, was dynamically via javascript.


  1. check the current bar width.
  2. if it is greater than desired, reset the series' pointwidth.
  3. force a redraw to make the change visible.

something like:

var chart = new highcharts.chart ( { ... ...

//--- enforce a maximum bar width.
var maximumbarwidth = 40; //-- pixels.
var series          = chart.series[0];

if ( {

    if ([0].barw  >  maximumbarwidth) {
        series.options.pointwidth = maximumbarwidth;
        /*--- force a redraw.  note that redraw() will not 
            fire in this case!
            hence we use something like setsize().
        chart.setsize (400, 300);   

see the demo at jsfiddle.


i used the spacingtop attribute to enforce a maximum pointwidth on a bar chart:

if (series[0].data[0].pointwidth > maximumbarwidth) {
     this.options.chart.spacingtop = this.options.chart.height - (maximumbarwidth * series.length) - 30;
     this.isdirtybox = true;

so if there is one bar over a certain width the spacing will be adjusted and the chart is drawn smaller.

this does not change the size of the container but keeps the bars beneath a certain size and your pointpadding and grouppadding will not be affected.

you could do the same with spacingright and would have a consistent chart without ugly spaces between the bars.


in my case, setting pointrange to 1 was what i needed. if a category with a box was adjacent to a category without a box (only outliers in a scatter series) the box would be wider than the category.

there is a good explanation here.


i faced the same issue using highcharts and this is how i fixed it !!

-- create a wrapper div for the chart, with some minimum width and overflow:auto. (to enable horizontal scroll)

-- set the "pointwidth" of each bar to the required value. (say, pointwidth: 75)

-- now set the chartwidth dynamically, based on the number of bars.

use chartwidth = (number of bars) * (pointwidth) * 2

so, if you have 15 bars, chartwidth = 15*75*2 = 2250px, where 2 is used to create larger chart width, to accommodate spacing between bars.

--in this manner, you can have any number of bars of same width in the scrollable chart ... :)


        var series = chart.series[0];
        //--- enforce a maximum bar width
        if (series && {
            if ([0].pointwidth  >  maximumbarwidth) {
                for(var i=0;i< chart.series.length;i++)


ultimate solution is to wrap drawpoints and overwrite shaperargs of each point, especially x-position and width:

(function(h) { 
    var each = h.each;
    h.wrap(h.seriestypes.column.prototype, 'drawpoints', function(proceed) {
        var series = this;
        if( > 0 ){
            var width = series.barw > series.options.maxpointwidth ? series.options.maxpointwidth : series.barw;
            each(, function(point) {
                point.shapeargs.x += (point.shapeargs.width - width) / 2;
                point.shapeargs.width = width;


    chart: {
      type: 'column'
    series: [{
        maxpointwidth: 50,
        data: [ ... ]

and live demo:


obviously this question was asked a long time ago when this feature didn't exist, but as of highcharts 4.1.8 you can do this without any workarounds using the plotoptions.column.maxpointwidth setting:

    /* other chart settings here... */
    plotoptions: {
        column: {
            /* here is the setting to limit the maximum column width. */
            maxpointwidth: 50
    /* other chart settings here... */

below is the jsfiddle of the basic column chart example, modified to show this working:

and the documentation for this setting is here:

Related Query

More Query from same tag