Skip to content

fix: Shared Tooltip part of series invisible#5141

Merged
junedchhipa merged 2 commits intoapexcharts:mainfrom
ZahidChandio:fix/shared-tooltip-series-invisible
Dec 22, 2025
Merged

fix: Shared Tooltip part of series invisible#5141
junedchhipa merged 2 commits intoapexcharts:mainfrom
ZahidChandio:fix/shared-tooltip-series-invisible

Conversation

@ZahidChandio
Copy link
Contributor

@ZahidChandio ZahidChandio commented Dec 18, 2025

New Pull Request

isInitialSeriesSameLen returns false due to hidden series having 0-length data ininitialSeries. This forces the tooltip to be treated as non-shared, and due toisXNumericusage in categorical charts, it falls back to displaying the first series info.

Fixes #5140

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • My branch is up to date with any changes from the main branch

Tooltip display after the fix

Screen.Recording.2025-12-18.at.7.50.56.PM.mov

@junedchhipa junedchhipa requested a review from Copilot December 22, 2025 10:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where shared tooltips display incorrect data when some series are hidden/collapsed. The issue occurred because isInitialSeriesSameLen() incorrectly returned false when hidden series had zero-length data, causing the tooltip to fall back to displaying only the first series.

Key Changes:

  • Modified isInitialSeriesSameLen() to filter out collapsed series before checking data length consistency
  • Removed an unnecessary blank line

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@junedchhipa
Copy link
Contributor

@ZahidChandio Please consider the changes suggested by CoPilot in above comments

@ZahidChandio
Copy link
Contributor Author

Code updated @junedchhipa.

@junedchhipa
Copy link
Contributor

Looks good to me.

@junedchhipa junedchhipa merged commit a9b2ceb into apexcharts:main Dec 22, 2025
1 of 7 checks passed
@ZahidChandio ZahidChandio deleted the fix/shared-tooltip-series-invisible branch December 22, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared tooltip is broken in the presence of hidden series

3 participants