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

BarChart moveToX wrong #1820

Closed
anhtth opened this issue Nov 11, 2016 · 1 comment
Closed

BarChart moveToX wrong #1820

anhtth opened this issue Nov 11, 2016 · 1 comment

Comments

@anhtth
Copy link

anhtth commented Nov 11, 2016

Hi,
I have an issue, I have 15 X, and one X has 3 barchart, I have change visible X (max = 1 and min = 1) so the chart can scroll, but when I call moveToX(11), the chart only scroll to X at index 3, if I change, moveToX(46) it will move to index 11. Please help me.
Tks alot

@liuxuan30
Copy link
Member

liuxuan30 commented Nov 11, 2016

I tried with ChartsDemo, it works fine.
Some thing to note:
1.

Limits the maximum and minimum value count that can be visible by pinching and zooming.
e.g. minRange=10, maxRange=100 no less than 10 values and no more that 100 values can be viewed
at once without scrolling.
If you call this method, chart must have data or it has no effect.

  • (void)setVisibleXRangeWithMinXRange:(double)minXRange maxXRange:(double)maxXRange

So make sure you call it after you set chart data.
2.
you have to move x + 11, not just 11. Chart 3.0 x axis is no longer index based. Say in charts demo, x is started from 1980, so moveViewToX(1980+11)

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

2 participants