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

(v3.0 LineChart) xAxis with String/double label issue #1481

Closed
Huang-Libo opened this issue Sep 19, 2016 · 2 comments
Closed

(v3.0 LineChart) xAxis with String/double label issue #1481

Huang-Libo opened this issue Sep 19, 2016 · 2 comments

Comments

@Huang-Libo
Copy link

Huang-Libo commented Sep 19, 2016

My xAxis shows date string before, with v2.x; today I update Charts to v3.0, I find that I can only show double value instead, then I set x's values to 1.0, 2.0, 3.0...but the values showed on xAxis are .8, 1.6, 2.4, 3.2......
2016-09-20 12 08 46

@Huang-Libo Huang-Libo changed the title (v3.0 LineChart) (v3.0 LineChart) xAxis with String/double issue Sep 19, 2016
@Huang-Libo Huang-Libo changed the title (v3.0 LineChart) xAxis with String/double issue (v3.0 LineChart) xAxis with String/double label issue Sep 19, 2016
@jayvenn
Copy link

jayvenn commented Sep 19, 2016

would like to know how to set string in the x axis as well

@danielgindi
Copy link
Collaborator

You just need to use a formatter.
A double can represent any value. If you want to represent a date, you can get the NSTimeInterval of a date. NSTimeInterval is actually a double.

Please look at the time chart demo!

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

3 participants