Skip to content

TreeGraph chart with collapsed levels shows initially one extra node expander with tooltip for hidden child #19368

Closed

Description

@bigend

Expected behaviour

When I initialize TreeGraph chart with certain levels collapsed it should render with that levels collapsed.
image

Actual behaviour

When I initialize TreeGraph chart with certain levels collapsed it renders extra collapse node and when you hover over that node the tooltip for hidden child is shown.
image

Live demo with steps to reproduce

https://jsfiddle.net/80kp4fwb

Product version

Highcharts 11.1.0

Affected browser(s)

Chrome, Firefox

Activity

  1. pawellysy commented on Jul 17, 2023

    @pawellysy
    Contributor

    Hi @bigend, thanks for reporting the issue!
    The problem lies here:

    if (!point.collapseButton) {
    if (!point.node.children.length || !btnOptions.enabled) {
    return;
    }

    When initially creating the collapse button, it is not checked, if the point is visible.

    Here is example workaround: https://jsfiddle.net/BlackLabel/bmnadqk9/2/

  2. self-assigned this
    on Jul 17, 2023
  3. added a commit that references this issue on Jul 17, 2023
    03799cc
  4. bigend commented on Jul 18, 2023

    @bigend
    Author

    Hi @pawellysy , thanks a lot for looking into this and for the workaround. I have checked the workaround fiddle, and it seems that there is still some minor issue. The collapse point is initially not visible, but if you try to hover over the place where it was, it appears again and it stays there, even when you move cursor away.

  5. pawellysy commented on Jul 20, 2023

    @pawellysy
    Contributor

    @bigend indeed, thanks for your input. Other idea is just not creating the button, if it is not needed, but then, when toggling the collapse status, it is already in its destined position.

    https://jsfiddle.net/BlackLabel/bmnadqk9/5/

    As a drop-in fix it can be used, but we will try to figure out the proper way of doing it in the core.

  6. added a commit that references this issue on Aug 24, 2023
    b806be9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions