ChartsOrg / Charts

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

After upgrade to 5.0 all charts crash on <Chart>.delegate = self in ViewDidLoad() #5104

Closed perbrondum closed 10 months ago

perbrondum commented 11 months ago

What did you do?

After upgrade to DGCharts 5.0, all my IB defined charts crash when assigning ' .delegate = self' in ViewDidLoad()

What did you expect to happen?

Same code has been working in 3.0/4.0 of Charts

What happened instead?

Crash

DGCharts Environment

DGCharts version/Branch/Commit Number: Master Xcode version: Version 15.0 beta 8 (15A5229m) Swift version: Platform(s) running DGCharts: Mac Studio macOS version running Xcode: Version 14.0 Beta (23A5337a)

Demo Project

ℹ Please link to or upload a project we can download that reproduces the issue.

oleksandr-kosylov commented 11 months ago

For me crashing on every usage of PieChartView properties. Error message says: [Storyboard] Unknown class _TtC6Charts12PieChartView in Interface Builder file.

perbrondum commented 11 months ago

I see the same error message in the console.

perbrondum commented 11 months ago

Solved: In my case (and most likely all) cases, the Charts 'Module Name' change caused this. Change 'Module Name' in all IB chart elements from 'Charts' to 'DGCharts' and it should work.

perbrondum commented 11 months ago

Can be closed.

niralishaha25 commented 11 months ago

Even I was facing same crash. @perbrondum thanks your solution worked for me

devssun commented 11 months ago

Solved: In my case (and most likely all) cases, the Charts 'Module Name' change caused this. Change 'Module Name' in all IB chart elements from 'Charts' to 'DGCharts' and it should work.

it works. thank you.

rajesh-ogmaconception commented 10 months ago

Just change the storyboard you are using inside a view. Tap on the module and it should be like Charts --> DGCharts we are good to go.