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

Any demo in swift ? #139

Closed
benju69 opened this issue Jun 10, 2015 · 7 comments
Closed

Any demo in swift ? #139

benju69 opened this issue Jun 10, 2015 · 7 comments

Comments

@benju69
Copy link

benju69 commented Jun 10, 2015

Hi
I try to make a barchart in swift but I need help.
The demos are in Objective C, can I have a sample in swift ?
Thanks

@liuxuan30
Copy link
Member

it is in the ChartsDemo folder.

@benju69
Copy link
Author

benju69 commented Jun 10, 2015

My problem is to set data

@anhnt92
Copy link

anhnt92 commented Jun 11, 2015

same question

@liuxuan30
Copy link
Member

Read https://github.com/PhilJay/MPAndroidChart/wiki
15. The ChartData class
16. ChartData subclasses
17. The DataSet class
18. DataSet subclasses

It tells you how to set data.
I believe you have the ability to write it in swift:)

@danielgindi
Copy link
Collaborator

Yeah, the only difference is maybe the Chart keyword prepended to most classes for namespacing, and an enhanced Swift syntax. I believe you'll be fine :-)

@anismansuri63
Copy link

You don't need swift demo at all.
Select chart which you want to make in swift from demo.
e.g MultipleLinesChart.
Just convert Objective-C code to swift.
https://objectivec2swift.com/#/home/main
Use above site. There will be minor changes after you convert code.

@liuxuan30
Copy link
Member

OS X contains swift code.. that's enough

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