Component | GroupedBar: Collapse and fade bars of removed series by rokotyan · Pull Request #963 · f5/unovis · GitHub
Skip to content

Component | GroupedBar: Collapse and fade bars of removed series - #963

Merged
lee00678 merged 2 commits into
f5:mainfrom
rokotyan:fix/grouped-bar-series-exit
Oct 22, 2026
Merged

lee00678 merged 2 commits into
f5:mainfrom
rokotyan:fix/grouped-bar-series-exit

Conversation

@rokotyan

Copy link
Copy Markdown
Contributor

What & why

Part 1 of #951. When a GroupedBar series is removed (fewer y accessors), the bars of that series inside the remaining groups exited with an empty transition: they stayed at full height and opacity for the whole duration, then disappeared. Meanwhile the remaining bars widened underneath them, and the frozen bars, being later in the DOM, painted over them.

Exiting bars now behave like exiting groups:

  • They collapse to the baseline in place (the path keeps its current band position and width, height goes to 0) and fade out. Works for both orientations and for negative bars.
  • They keep the bar class, so adding the series back before the exit ends re-adopts them. The update transition now also animates opacity back to 1 (or to barStyle's opacity), so a re-adopted bar doesn't stay semi-transparent. opacity is added to the managed barStyle keys for that, like in StackedBar.

Series are still matched to bars by position. Keying them by colorKeys (part 2 of #951) is a separate PR.

Checklist

  • Dev examples (Grouped Bar → Series Exit Transitions: 6 → 2 → 6 series, and removing four then re-adding them mid exit; vertical and horizontal)
  • Dev gallery examples
  • Wrappers
  • Gallery example
  • Docs
  • Lint passes on the files I changed; pnpm build:ts and pnpm build:dev pass

Recordings

Before: the removed bars freeze at full height, then vanish, painted over the widening bars (mp4)

before

After: they collapse to the baseline and fade out (mp4)

after

@lee00678
lee00678 merged commit ec63052 into f5:main Oct 22, 2026
7 checks passed
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.

2 participants