Bellash
Bellash

Reputation: 8184

How to Change space between series data colums in highcharts?

This is not DUPLICATED!!! Sorry if yes.

I want to increase the space between columns independently to the pointWidth property and the #container width. Please this couple of pictures and the fiddle is here

<code>pointWidth</code>=14 pointWidth=40

How can I edit this space/margin/padding ?

Upvotes: 1

Views: 2812

Answers (2)

stovroz
stovroz

Reputation: 7065

In your current chart, the number of bars you have, combined with the fixed pointWidth of 14 (pixels) you have set on each series, means that the groupPadding setting which you have not set and therefore defaults to 0.2 (x-axis units) is squashing the bar pairs together, overriding any increase you try to set to pointPadding.

If you reduce groupPadding, like so, the pairs will come apart accordingly. If your number or bars and/or chart width are variable, and you want to fix the ratio of the gaps between points and groups, then set your pointPadding and groupPadding as required, and remove the fixed pointWidths you have specified so that the bar widths take up the slack, like this.

Upvotes: 2

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

You can use pointRange / groupPadding / pointPadding, skipping pointWidth.

http://api.highcharts.com/highcharts

Upvotes: 1

Related Questions