Page 1 of 1

Please, help me to understand this behavior (centerInCategory)

Posted: Sat Aug 13, 2022 6:28 pm
by Cortez
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!

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

Posted: Tue Aug 16, 2022 9:39 am
by Cortez
Nobody has any idea?

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

Posted: Tue Aug 16, 2022 9:57 am
by kamil.m
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!

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

Posted: Tue Aug 16, 2022 1:29 pm
by Cortez
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!

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

Posted: Tue Aug 16, 2022 3:47 pm
by kamil.m
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!