Cortez
Posts: 85
Joined: Fri May 29, 2020 9:41 am

Please, help me to understand this behavior (centerInCategory)

Hi falkes!
https://jsfiddle.net/Cortez/h85dgapz/

1. Considering 'grouping' is 'true' by default - my columns are displayed side by side instead of overlaying each other. Which is logical.
2. Considering my first series ('Ben') has 4 points for same x value - those columns are displayed overlaying each other. Which is logical.
3. Considering 'centerInCategory' is set to 'true' my groups two and three are perfectly centered and have no empty gaps despite second group doesn't have points for several x values. Which is logical.

Every single statement independently is logical. What is not logical is the combination of the three, which you can see in first group.
I would expect either
a) repeating x value columns to be displayed side by side, like all other columns.
or
b) displaying recurring x value columns as they are (overlaying each other), but not leaving that weird gap

Can you please explain me this behavior?
Thanks!
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Please, help me to understand this behavior (centerInCategory)

Hi there,

I think that this gap might actually be a bug in centerInCategory property. Technically it leaves enough space for all of the x values, but it does not take into consideration that the columns with the same x value are stacked.

Feel free to report that bug in our GitHub repository.
https://github.com/highcharts/highchart ... new/choose

I'm sorry that you had to wait for the answer,
Best regards!
Kamil Musiałowski
Highcharts Developer
Cortez
Posts: 85
Joined: Fri May 29, 2020 9:41 am

Re: Please, help me to understand this behavior (centerInCategory)

kamil,

many thanks for your reply! I have reported that bug on GitHub as you advised. However I can not afford to wait till some patch will be released with next versions. Can you offer some sort of temporary workaround? Maybe another wrapper function? Thanks!
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Please, help me to understand this behavior (centerInCategory)

You don't have to wait till the next Highcharts version release. Please wait and watch your GitHub topic, our dev team will take a look at this bug, investigate it and if it's possible, you will get a temporary workaround for that.

You will find more updates there,
Regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”