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

AxisRange and drag #4264

Closed
baha-che opened this issue Jan 16, 2020 · 2 comments
Closed

AxisRange and drag #4264

baha-che opened this issue Jan 16, 2020 · 2 comments

Comments

@baha-che
Copy link

baha-che commented Jan 16, 2020

Screenshot at Jan 16 12-28-55

Hello, I want to make a drag xAxis that show very time a 4 months and when I drag, it should show the another 4! I add 4 months but the drag is disabled and I don't know why?

yearChartView.dragEnabled = true
yearChartView.setScaleEnabled(false)
yearChartView.pinchZoomEnabled = false
yearChartView.maxHighlightDistance = 500
let xAxis = yearChartView.xAxis
xAxis.labelFont = UIFont(name: "MetroSans-Book", size:10)!
xAxis.setLabelCount(self.baha.count - 1, force: false)
xAxis.labelTextColor = #colorLiteral(red: 0.5254901961, green: 0.5568627451, blue: 0.5882352941, alpha: 1)
xAxis.labelPosition = .bottom
xAxis.axisLineColor = #colorLiteral(red: 0.9529411765, green: 0.9607843137, blue: 1, alpha: 1)
xAxis.gridLineWidth = 1
xAxis.gridColor = #colorLiteral(red: 0.9529411765, green: 0.9607843137, blue: 1, alpha: 1)
xAxis.axisRange = 3.0

I want to get something like that:

Screenshot at Jan 16 12-26-48
Screenshot at Jan 16 12-27-18

@aaronsheah
Copy link

@baha-che did you manage to get something? I would love to implement something similar

@SujalGondaliya1
Copy link

@baha-che can you send me the condition for the drag xAxis.

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