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

Change the width of chart #1005

Closed
Exlinct opened this issue May 4, 2016 · 3 comments
Closed

Change the width of chart #1005

Exlinct opened this issue May 4, 2016 · 3 comments

Comments

@Exlinct
Copy link

Exlinct commented May 4, 2016

How can i fix width of chart by a constant like demo and if it has too many it can scroll horizontal
simulator screen shot may 4 2016 4 18 43 pm
simulator screen shot may 4 2016 4 22 12 pm

@liuxuan30
Copy link
Member

by default, it will display all data, so the bar width is dynamic. you can just set the scaleX so it can scroll directly.

@dxclancy
Copy link

dxclancy commented May 5, 2016

You can also do something like this:
const CGFloat barWidthPoints = ; // you decide
CGFloat range = self.barChartView.width/barWidthPoints;
[self.barChartView setVisibleXRangeWithMinXRange:range maxXRange:range];
but this may affect pinch zoom

@Exlinct
Copy link
Author

Exlinct commented May 6, 2016

thank you for suggestion :D

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