[Bug] Too many points on a mixed chart of scatter and line would cause canvas not to be cleared correctly
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.4.3
### Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/large-scale-candlestick-forked-mtvc4k?file=%2Findex.js%3A135%2C19
### Steps to Reproduce
1. Add a line series and a scatter series on one chart
2. scroll to zoom in and zoom out
3. The line would not be cleared properly on the canvas
### Current Behavior

It seems like only the lines would be left on the canvas when zooming in and zoom out.
If I change one of the two specific types to another type, e.g., change 'line' to 'candlestick', the problem would not occur.
### Expected Behavior
Lines and scatters be rendered properly together
### Environment
```markdown
- OS: macOS 12.7.2 (Apple M2)
- Browser: Version 120.0.6099.234 (Official Build) (arm64)
- Framework: React
```
### Any additional comments?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.