Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Graph error #396

Closed
smilydronavalli opened this issue Sep 19, 2015 · 5 comments
Closed

Line Graph error #396

smilydronavalli opened this issue Sep 19, 2015 · 5 comments

Comments

@smilydronavalli
Copy link

Hi,

When i create the any graph I got the following error

    Could not cast value of type 'MyGraphProject.BarChartData' (0x108f67b40) to 'Charts.BarChartData' (0x10942dad0).

Pls help me for the solution

@yas375
Copy link
Contributor

yas375 commented Sep 22, 2015

Could you please provide a sample app showing the issue? I guess something wrong with the setup, but with the provided info it's hard to say what's wrong.

@smilydronavalli
Copy link
Author

Hi

Sorry its my problem now its working fine

@davidck
Copy link

davidck commented Sep 25, 2015

@smilydronavalli: I just ran into the same issue with it embedded into a Obj-C project. Would you mind sharing your solution?

If I comment out:
[yVals addObject:[[BarChartDataEntry alloc] initWithValue:2.0 xIndex:i]];
The application won't crash. Any value will cause it to crash with the same error message.

@liuxuan30
Copy link
Member

@davidck you crash at [[BarChartDataEntry alloc] initWithValue:2.0 xIndex:i] or yVals addObject?

@davidck
Copy link

davidck commented Sep 28, 2015

@liuxuan30 The crash actually occurred at addObject as you've indicated. I've since solved the issue by cleaning up the Swift to Obj-C generated code from the bridging headers. As such, I'm not entirely sure why this is happening in the first case, which can be based on our setup. After the manual cleanup of the generated file, the issue happened once more and the same cleanup needed to apply.

I did not use the pod install method, but manually dragging the entire ios-chart source into the project. I tried using the cocoapods method using the !use_frameworks directive in the pod file, but no luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants