-
-
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
HorizontalBarChart values not showing Charts 3.0 #1731
Comments
are you talking about x axis labels, or bar values? ChartsDemo - horizontal bar chart can draw bar values. |
When posting screenshots to compare - please give screenshots with the same data. From the screenshots being very different it is hard to figure out the problem. |
@danielgindi i gave this screens because data not important for this case. |
@liuxuan30 as you see in my code snippet i was set But this is not working for me. And why bar chart values not showing? |
It's about your configuration, so you should compare yours to one of the demos, or post a working sample project so we can test it. When you do - please re-open the issue. |
@mecid so I am confused what labels are you asking - either x value labels, or just data value labels? If you are talking about data values, then I think you might miss some setup. My code just wants to fix the x value labels appears every 2nd. |
@liuxuan30 can you show me an example how to show label on every 2nd bar (because I need to show 6 bars with labels that have following format: 2016-06, 2016-07, 2016-08, 2016-09, 2016-10, 2016-11). Since labels are pretty long it would be great if I could show every 2nd label. Here are the screenshots of what I want to accomplish (first one is Android version 2.2.5 just to see what I need and the second is from an iOS app with v3.0.0) for now I'm using: |
@liuxuan30 found the solution, I needed granularity btw, sorry for posting on closed issue, didn't see that |
Setting the labelCount to the number of xAxis values did it for me. Maybe it should've behaved the other way around? Show every label by default, and let the user adjust in case they don't fit. After setting labelCount:
Feels somewhat awkward comparing from the previous versions (before swift 3). |
@nmdias Sorry that post here. How did you add some string labels on left of HorizonalBarChart |
I have code like this for Charts version 2.2
`
private func setupHorizontalBarChart(samples: [HKQuantitySample]) {
let formatter = HeartRateFormatter()
formatter.activity = activity
formatter.age = userAge
`
But with latest version of Charts3.0
How can i fix problem?
The text was updated successfully, but these errors were encountered: