Ketchupy
Posts: 2
Joined: Fri Jan 27, 2023 10:43 am

stackLabels on the wrong bar with 2 stacks

Hi,

Here is my problem with a chart.

I have 4 series grouped in 2 stacks for each month, with value for current month and the same month one year earlier for comparison.
The total value of the stacklabels are inverted between the two stacks.
See the image under, the values are "right" but not on the right bar, it's the total of the other bar.

"108 517" and "99 678" should be inverted, we can see at the size of the bar that the total is wrong. Same for each month.

Image

My data :

Code: Select all

[
    series : {
        "data": [5133, 6712, 5196, 5812, 5305, 7455],
        "name": "Autres",
        "color": "#A8E49A",
        "stack": "0"
    },
    {
        "data": [7826, 5315, 6227, 6207, 5269, 5864],
        "name": "Autres - an dernier",
        "color": "#D3FCC9",
        "stack": "1"
    },
    {
        "data": [103384, 87677, 94360, 87144, 87217, 95522],
        "name": "Forfait",
        "color": "#A6D2F2",
        "stack": "0"
    },
    {"data": [91852, 86466, 90563, 85643, 88923, 89634],
        "name": "Forfait - an dernier",
        "color": "#CCE7FA",
        "stack": "1",
    }
]
I think maybe the order of my data is the problem here ? (my XAxis is categories with the right order)
I spend some time on the forum but couldn't find something like that.
Thanks !
Ketchupy
Posts: 2
Joined: Fri Jan 27, 2023 10:43 am

Re: stackLabels on the wrong bar with 2 stacks

Here is a jsfiddle of the problem :

https://jsfiddle.net/10xzhosg/
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: stackLabels on the wrong bar with 2 stacks

Hi,

Welcome to our forum and thanks for contacting us with your question!

This looks like a bug. From what I can see, it has appeared since the last version of Highcharts (v10.3.3). In version 10.3.2 everything seems to work fine.

Demo: https://jsfiddle.net/BlackLabel/3np9wv0d/

You can report the issue to our official GitHub repository here: https://github.com/highcharts/highchart ... new/choose

​If you have further inquiries, you may reach out to me at any time.
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”