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

Limit the number of bars to 10 when the x-axis is made of strings #2351

Closed
amaurySaugrain opened this issue Apr 12, 2017 · 1 comment
Closed

Comments

@amaurySaugrain
Copy link

amaurySaugrain commented Apr 12, 2017

Hi there,

I am having an issue, I created a barchartview graph and I would like to limit the number of visible bars to 10 (which is the minimum in setVisibleXRange) and scroll after that. The problem is that my x-axis is made of strings (basically dates and time) therefore it doesn't take in count when I use barChartView.setVisibleXRange(minXRange: 10.0, maxXRange: 10.0).
Do you guys have any idea of how I could manage to do that?

screen shot 2017-04-11 at 7 59 44 pm

@liuxuan30
Copy link
Member

liuxuan30 commented Apr 13, 2017

As I don't see your code, first read:

    /// 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.
    open func setVisibleXRange(minXRange: Double, maxXRange: Double)

/// If you call this method, chart must have data or it has no effect.

Try again after setting your data please.

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