Skip to content

Add regression test for enter animation with fractional container width#12270

Open
zizhao-hu wants to merge 1 commit into
chartjs:masterfrom
zizhao-hu:test/issue-12256-fractional-width-enter-animation
Open

Add regression test for enter animation with fractional container width#12270
zizhao-hu wants to merge 1 commit into
chartjs:masterfrom
zizhao-hu:test/issue-12256-fractional-width-enter-animation

Conversation

@zizhao-hu

Copy link
Copy Markdown

#12256: the initial enter animation was suppressed when the chart container had a sub-integer CSS pixel width (CSS grid fr units, percentage widths, calc()).

The underlying bug is already fixed on master by #12142 (Use integer canvas dimensions), but nothing currently guards the scenario. This adds a focused regression test: a responsive line chart in a 200.4px container, asserting the points start at the scale base (enter animation playing) rather than at their final value.

Verified the test passes on master and fails on the pre-#12142 code.

Closes #12256

chartjs#12256 reported that the enter animation is suppressed when a chart's
container has a sub-integer CSS pixel width (e.g. CSS grid `fr` units,
percentage widths or `calc()`). The underlying bug was already fixed on
master by chartjs#12142 (Use integer canvas dimensions); this adds a dedicated
regression test so the scenario can't silently regress.

Closes chartjs#12256

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Enter animation suppressed when container's CSS pixel width is sub-integer (fractional getBoundingClientRect width)

1 participant