Skip to content

Axis labels are getting duplicated in dom for every resize (highcharts-grouped-categories) #223

@bm64

Description

@bm64

Issue transferred from the Highcharts GitHub repository highcharts/highcharts#22003

Expected behaviour

When we resize, axis labels shouldn't be duplicated in dom

Actual behaviour

Axis labels are getting duplicated in dom for every resize. It is keep growing without any limits. Issue is replicable when nesting is enabled via highcharts-grouped-categories

Live demo with steps to reproduce

template: https://jsfiddle.net/82abwekd/

Product version

"highcharts": "^11.4.1",
"highcharts-grouped-categories": "^1.3.2",

Affected browser(s)

Chrome

From the below attached image, you can see test-label axis label has more than one instance in dom.
image

Here is the behavior after few resize, the labels are getting duplicated and keep goes on.
image

How we are affected due to this issue:
We have some cases where we need to switch the axis labels between original label and modified label. Here we will show the modified label as axis label and show the original label as tooltip. Due to this multiple duplicated labels, we are unable to show the tooltip when we hover on it as the dom is occupied with the latest duplicated label (not allowing mouseover event).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions