Recharts 3.11.3 / React 18: Line shows solid for one frame before entrance animation
Comments · 0
Be the first to comment.
Bug reportby SceneRecap AI
Repro steps
- 1.Open the test page 'Recharts 3.11.3 / React 18: Line flash bug'. It contains a Line chart and a counter that reads 'First frame solid: N of M mounts'.
- 2.Observe the counter after the initial mount.
- 3.Click the 'Mount 10 times' button.
- 4.Watch the counter while the chart remounts and replays its entrance animation.
- 5.Click 'Mount 10 times' again.
- 6.Watch the counter after the second batch finishes.
Expected
On each mount, the first painted frame of the Line should be empty or at the animation start state. The line should then draw in progressively from Page A to Page G. The counter should read 0 solid first frames.
Actual
Every mount is reported as solid on its first frame. The counter reads 1 of 1 at 1.0s, 11 of 11 at 13.0s and 21 of 21 at 21.0s. The draw-in animation itself does run after that first frame: partial lines are visible at 9.0s, 11.0s, 19.0s and 21.0s. This means the full line flashes for one frame before the animation restarts it.
Evidence
Issue markdown (copy-paste ready)
## Summary In Recharts 3.11.3 with React 18.3.1, a `Line` with an entrance animation is painted fully solid on its first frame. The draw-in animation starts only after that frame, so the full line flashes for one frame on every mount. ## Environment - Chromium 151.0.7922.34, macOS, 1280x720, dpr 1 - recharts 3.11.3, react 18.3.1, loaded via esm.sh CDN - Test page setting: BusyCommit 30 ms ## Steps to reproduce 1. Open the test page 'Recharts 3.11.3 / React 18: Line flash bug' (2.0s). 2. Note the counter 'First frame solid: N of M mounts' after the initial mount (1.0s). 3. Click **Mount 10 times** (7.7s). 4. Wait for the batch to finish (13.0s). 5. Click **Mount 10 times** again (16.5s) and wait (21.0s). ## Expected The first painted frame of each mount shows no line, or shows the animation start state. The line then draws in from Page A to Page G. The counter reports 0 solid first frames. ## Actual Every mount is flagged as solid on its first frame: - 1.0s: `1 of 1 mounts` - 9.0s: `4 of 4` - 11.0s: `9 of 9` - 13.0s: `11 of 11` - 16.5s: `12 of 12` - 19.0s: `17 of 17` - 21.0s: `21 of 21` The animation itself does run after the first frame. Partial lines are visible at 9.0s (to Page D), 11.0s (to Page B), 19.0s (near Page C) and 21.0s (to Page E). At 16.5s the plot shows an empty start state. ## First bad moment 1.0s: the initial mount is already reported as solid on its first frame. ## Suggested area Line entrance animation setup. The progress 0 path state seems to be applied after the first paint. This may be a timing issue between the React 18 commit and the animation start, and the page's BusyCommit 30 ms setting may make it easier to see. *Recorded with SceneRecap.*
This report was written by SceneRecap from a screen recording. Try SceneRecap free
Turn a screen recording into a bug report like this one.
Repro steps, expected vs actual and the console and network evidence, each with a timestamp. On every plan, Free included.
Try SceneRecap free →