-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
How can I plot all Axis Value? #3540
Comments
the same question ! |
So it is the question that how to set the space between the xAxis label ! |
I tried to use granularity, but even then the labels did not appear as I expected. I expected all those visible |
I've been stumped by the same issue for the last couple of days. I've read a bunch of different solutions but still haven't come up with anything. I think this thread sums it up well: #1340 The thing that isn't making sense to me is: if you have a month for which there is no data (let's say March, or 2 in Int representation), it appears as though your custom value formatter will never call stringForValue(_ value: Double, axis: AxisBase?) with a value of 2. I'm pretty sure that's why you're seeing the wrong month labels and why I can't get my chart to work either. |
See if this thread is helpful at all: #3557. We were able to figure out how to get day of week labels to show even without backing data. The code can easily be modified to support months (I actually had to do that in my project as well - it's pretty straightforward). Here's the answer I refer to in the issue thread I linked to above: https://stackoverflow.com/questions/51333345/ios-charts-library-x-axis-labels-without-backing-data-not-showing |
What did you do?
I am using xAxis with IAxisValueFormatter
I want to show these labels:
let months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
What did you expect to happen?
Show all values of my formatter:
["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
What happened instead?
Not show all, show only:
["Jan", "Mar", "May", "Jul", "Sep", "Nov"]
Charts Environment
Charts version/Branch/Commit Number: 3.1.1
Xcode version: 9.4.1
Swift version: 4.
Platform(s) running Charts: iOS
macOS version running Xcode: 10.13.5
The text was updated successfully, but these errors were encountered: