Change width of columns or spacing between columns on bar/column chart.

Answered

Comments

2 comments

  • Avatar
    Yoni Lerner

    Thank you Nicolaus.

     

    Great job!

    0
    Comment actions Permalink
  • Avatar
    Tal Admon

    Thanks Nicolaus.

    I've modified the script to shift the columns to the left as they widen to keep them in center.

    Since the default width is 45, the left shift is the delta between 45 and the new size, divided by 2.

     

    widget.on('ready', function(se, ev){

    var w = 60;
    var l = (w-45)/2;

    $(element).find('.highcharts-series-group').find('rect').each (function(){var x = $(this).attr('x'); $(this).attr('x',x-l); $(this).attr('width',w)})

    })

     

    0
    Comment actions Permalink

Please sign in to leave a comment.