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

How to change position xAxis Label on the Top Bar Chart ? #3022

Closed
durul opened this issue Nov 18, 2017 · 2 comments
Closed

How to change position xAxis Label on the Top Bar Chart ? #3022

durul opened this issue Nov 18, 2017 · 2 comments

Comments

@durul
Copy link

durul commented Nov 18, 2017

I have a custom design HorizontalBarChartView, I build this design with UIBezierPath and CAShapeLayer. I am sharing below.

simulator screen shot - iphone 6s plus - 2017-11-17 at 18 53 10

I worked with HorizontalBarChartView and closed to same looks.

simulator screen shot - iphone 8 plus - 2017-11-18 at 16 25 52

My questions is how to change xAxis Label position to generate on BarChart ? I try to generate cars model name on BarCharts

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 20, 2017

looks like we don't support putting x axis labels on top of each bar like your first image.
but we do have .bottomInside similarly. you can override the method renderAxisLabels(), use x/yoffset to adjust

however, remember not every bar is thin like this and leave you much blank space for the labels. It will take the whole contentRect to draw all bars, so the more bars you have, the thinner the bar is, and less bar space as well.

@jw10126121
Copy link

May I ask, how did you achieve it? I have the same problem now. Does not work after xAxis. YOffset is set.

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