ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.51k stars 5.99k forks source link

Linechart on tvOS creates multiple overlapping charts when data is added #5065

Open sheiladoherty-dolby opened 1 year ago

sheiladoherty-dolby commented 1 year ago

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. Simulator Screenshot - iPhone 14 - 2023-05-30 at 13 23 14

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:

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.