ba11
Posts: 6
Joined: Wed Jul 24, 2024 6:05 pm

Help to configure bars chart with groups

Hi.
I need to create a bar chart with groups and subgroups.

Is that possible to group the data like on the image below:
Image

So, I have 2 categories: "Male" and "Female".

Each category has 2 different groups of data.
I've tried different approaches but have had no luck achieving the expected result.

Is that possible to do with HighCharts?

Thanks in advance
Attachments
Screenshot 2025-01-13 at 19.50.33.png
Screenshot 2025-01-13 at 19.50.33.png (170.97 KiB) Viewed 1911 times
User avatar
dawid.d
Site Moderator
Posts: 1222
Joined: Thu Oct 06, 2022 11:31 am

Re: Help to configure bars chart with groups

Hello,

Thanks for the question!

This is a bit tricky because from what I see, besides grouping two series, between one category tick you have two groups of points from the same series. I think the easiest way to achieve this is by manipulating the position and labels of the ticks, see the demo below.

Demo: https://jsfiddle.net/BlackLabel/9eLm1r2k/

Let me know if this meets your expectations.

Best regards,
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”