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

Adding additional X index values without the initWithXVals #1451

Closed
nicholassmith opened this issue Sep 15, 2016 · 5 comments
Closed

Adding additional X index values without the initWithXVals #1451

nicholassmith opened this issue Sep 15, 2016 · 5 comments

Comments

@nicholassmith
Copy link

So to get my app working with XCode 8 & Charts I grabbed the source to get to the latest build and managed to get it working, however I need to add X Values that extended past the Y values (to show further into the past and future) so I used the initWithXVals with an array that allowed that to happen and plotted Y vals against that.

Is there anyway to do that with the latest changes?

@liuxuan30
Copy link
Member

Which version? Chart 3.0 or 2.2.5? Not really understand your issue.

@mrsensen
Copy link

@liuxuan30 V3.0 This version does not have the xVal initialization method.How to add the xAxis label value?

@nicholassmith
Copy link
Author

@liuxuan30 V3.0, latest commit to master basically. Previously I could initialise a set of X vals then plot a set of Y values with them which meant there could be more X values than Y values. This allowed me to build a graph showing time progression with the ability to show the current date and the distance to the last entry.

@danielgindi
Copy link
Collaborator

danielgindi commented Sep 18, 2016

Just set the minimum/maximum value for the chart.xAxis. You do not have to add entries.

@nicholassmith
Copy link
Author

That worked perfectly, thanks @danielgindi!

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

4 participants