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

Improved lowestVisibleXIndex #794

Closed
wants to merge 1 commit into from
Closed

Improved lowestVisibleXIndex #794

wants to merge 1 commit into from

Conversation

da-na
Copy link

@da-na da-na commented Mar 3, 2016

Improved lowestVisibleXIndex so that the line chart does not ignore first x value and returns 0 for lowestVisibleXIndex instead of 1. Could be related to issue #785

Chart I'm using is of type LineChartView, the params setup for drawing:
chart.descriptionText = "weight (lbs)"
chart.legend.enabled = false
chart.minOffset = CGFloat(50)
chart.leftAxis.startAtZeroEnabled = false
chart.leftAxis.drawGridLinesEnabled = false
chart.rightAxis.enabled = true
chart.rightAxis.drawLabelsEnabled = false
chart.rightAxis.drawGridLinesEnabled = false
chart.xAxis.drawGridLinesEnabled = false
chart.autoScaleMinMaxEnabled = true
chart.drawBordersEnabled = true
chart.drawGridBackgroundEnabled = true

My Chart before the change:
screen shot 2016-03-03 at 9 49 19 am
It was not possible to scroll up or zoom out, to see the first point. It seemed to be drawn out of bounds.

After my fix:
screen shot 2016-03-03 at 10 13 21 am

…irst x value and returns 0 for lowestVisibleXIndex instead of 1
@danielgindi
Copy link
Collaborator

@PhilJay are you aware of such an issue?

@PhilJay
Copy link
Collaborator

PhilJay commented Mar 10, 2016

Absolutely not :-)
Which library version are you using?
I think it might be an older one because I see "startAtZero" in the code

@da-na
Copy link
Author

da-na commented Mar 10, 2016

Hi!
I'm using 2.2.1 (just checked in the Podfile.lock in my project), which was available in cocoaPods just about a month ago.

@liuxuan30
Copy link
Member

not sure if it is the similar symptom with #713? seems both zoomed in and while scrolling, the dot is missing so the the line is broke?

@danielgindi
Copy link
Collaborator

Does the issue still exists with master?

@da-na
Copy link
Author

da-na commented Apr 11, 2016

@danielgindi Looks like it.

@danielgindi
Copy link
Collaborator

How can I reproduce this?

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

Successfully merging this pull request may close these issues.

4 participants