Linechart on tvOS creates multiple overlapping charts when data is added
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
* [ X] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md).
## What did you do?
In tvOS, I have a LineChartView that displays on the `customOverlayViewController` of `AVPlayerViewController`. Over time, data is added to the LineChart & the chart is updated.
## What did you expect to happen?
I expected that as the data was updated, that the chart would update as well, no longer showing the previous data as it does using the exact same code in iOS, shown below.

## What happened instead?
In tvOS, when new data is added to an existing line chart, the visualization creates a new line chart image that overlaps the previous image. This is true whether the entire dataSet is replaced or if items are added to the dataSet.
I have verified:
- there is only only dataSet
- that the one dataSet is being appended to & another one is not being created
- there is only one instance of the LineChartView

## Charts Environment
**Charts version/Branch/Commit Number:** 4.1.0
**Xcode version:** 14.3
**Swift version:** 5.8
**Platform(s) running Charts:** iOS & tvOS
**macOS version running Xcode:** Ventura 13.3
## Demo Project
Not available.
Contributor guide
Research direction
The reported entry point is a LineChartView used in customOverlayViewController of AVPlayerViewController; reproduce the update path on tvOS and compare it with iOS behavior. Done means adding data or replacing the data set redraws a single chart without retaining the previous rendering; no demo project or file/test is provided, so locating the implementation is part of the work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- data-visualization, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100