Skip to content

Conversation

@dilipkumar6306316-art
Copy link

@dilipkumar6306316-art dilipkumar6306316-art commented Jan 2, 2026

Background

This PR addresses a rendering regression observed in ECharts v5 when dealing with hierarchical structures (Treemap/Graph) that utilize upperLabel. Under specific interaction sequences, child nodes would intermittently disappear from the canvas.

Problem Analysis

The issue occurs when a parent node (e.g., a container like 'Blob' or 'Pool') enters the selected state while upperLabel is active. The internal state transition logic in v5 seems to conflict with the rendering of child elements during hover-in and hover-out events on a selected parent.

Key observations:

  1. Visual Glitch: Selecting a parent node followed by hovering causes child nodes to lose their rendering context and vanish.
  2. Style Inconsistency: The select.itemStyle.color for parent nodes incorrectly inherits borderColor instead of the specified selection color.

Proposed Solution

Since the select state logic for labeled parent containers is currently unstable, this PR introduces a safeguard by setting select: { disabled: true } for parent-level nodes. This ensures that:

                1. The visual integrity of the child nodes is preserved during all hover interactions.
                2. The rendering engine does not enter a broken state-transition loop for container nodes.

This is a non-breaking workaround that maintains the core functionality of the diagram while fixing the "disappearing nodes" bug for end-users.

Test Cases
1.Initialize a Treemap with hierarchical data and upperLabel: { show: true }.
2.Click to select a parent node.
3.Move the cursor in and out of the parent node's boundary.

Result: All child nodes remain visible.

Type of Change
Bug fix
Documentation update

Related Issue: #20098

@echarts-bot
Copy link

echarts-bot bot commented Jan 2, 2026

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

To reviewers: If this PR is going to be described in the changelog in the future release, please make sure this PR has one of the following labels: PR: doc ready, PR: awaiting doc, PR: doc unchanged

This message is shown because the PR description doesn't contain the document related template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant