0
HIGH CHARTS 

Please look at JSFIDDLE. Here the bars overlap each other. How to prevent this by resizing the bar width dynamically.

Jeffrin John
  • 675
  • 2
  • 7
  • 16
  • Or you may use scroll bar http://jsfiddle.net/qpus6b6q/ .see [blogs](https://www.highcharts.com/blog/news/224-scrollbars-for-any-axis/) – Deep 3015 Aug 18 '17 at 07:24

2 Answers2

2

If happens because you set bar width with fixed value. If you want bars to take all available place for width, instead of using pointWidth, set pointPadding to 0, groupPadding to 0 and borderWidth to 0.

API Reference:
http://api.highcharts.com/highcharts/plotOptions.bar.pointPadding
http://api.highcharts.com/highcharts/plotOptions.bar.groupPadding
http://api.highcharts.com/highcharts/plotOptions.bar.borderWidth

Example:
http://jsfiddle.net/yek6g5vy/

pawel_d
  • 3,061
  • 1
  • 8
  • 13
  • 2
    Thank you @d_paul. Your example works in the same way as I expected. I have done some update like changing pointPadding and it worked exactly to my need. If you like to see what I modified see them [here](http://jsfiddle.net/yek6g5vy/1/). – Jeffrin John Aug 18 '17 at 11:51
  • @JeffrinJohn No problem, glad it helped you. Using pointPadding is convenient. – pawel_d Aug 18 '17 at 12:09
  • can you help me in this issue paul?. https://stackoverflow.com/questions/46067813/how-to-get-height-of-individual-bars-in-column-chart-of-highcharts @d_paul – Jeffrin John Sep 06 '17 at 05:58
  • Hi Paul, can you help me in [this](https://stackoverflow.com/questions/46221064/how-to-do-multi-level-pie-chart-in-highcharts) issue. – Jeffrin John Sep 14 '17 at 14:01
1

If possible remove container inline css height.

Fiddle Demo

Or you can use scrollbar using highstock.js

 xAxis: {
  categories: ['First', 'Second', 'Third', 'Fourth', 'Fifth', 'sixth', 'seventh'],
  allowDecimals: false,
  min: 0,
  max: 4,
  scrollbar: {
    enabled: true
  },
},

Fiddle demo

Deep 3015
  • 9,929
  • 5
  • 30
  • 54
  • Thanks for the suggestions deep. But I can use neither of the two suggestions. If you find a way to adjust the bar width dynamically, just like column chart works, please suggest me. Thanks for your time deep. :-) – Jeffrin John Aug 18 '17 at 10:58
  • Hi @deep, d_paul solution worked for me. Thanks again for your help. :-) – Jeffrin John Aug 18 '17 at 11:52
  • Hi deep, can you help me in [this](https://stackoverflow.com/questions/46221064/how-to-do-multi-level-pie-chart-in-highcharts) issue. – Jeffrin John Sep 14 '17 at 14:00