-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
gesture conflict when lineChartView in tableView #984
Comments
I remember there is some code for it. check |
The code automatically handles cases where there are zoom-pan on the chart. When you reach the end of the chart - it will stop panning and enable the scrolling on the parent. If you want to be able to scroll while panning the chart, then do what @liuxuan30 suggested. There are also other discussions in issues, so you can search for it and gain some insights. |
3q for all |
@alanz1982
in func diff:
|
thanks!!it help me so much,
发自我的 iPhone
在 2016年12月1日,下午7:11,Inix John <[email protected]<mailto:[email protected]>> 写道:
@alanz1982<https://github.com/alanz1982>
hi, I have similar scenario with you,that,I disable Y axis scale,but I can not scroll tableview in the chart.
I just do a simple hack,that if chart disable Y axis scale,enable UITableView vertically scrolling.
if !self.isScaleYEnabled {
_outerScrollView?.nsuiIsScrollEnabled = true
} else {
_outerScrollView?.nsuiIsScrollEnabled = false
}
in func @objc fileprivate func panGestureRecognized(_ recognizer: NSUIPanGestureRecognizer)
of BarLineChartViewBase.swift file
diff:
@@ -688,7 +688,11 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
if _outerScrollView !== nil
{
// Prevent the parent scroll view from scrolling
- _outerScrollView?.nsuiIsScrollEnabled = false
+ if !self.isScaleYEnabled {
+ _outerScrollView?.nsuiIsScrollEnabled = true
+ } else {
+ _outerScrollView?.nsuiIsScrollEnabled = false
+ }
}
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#984 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACxfkt63x3OhEnfryGiZFsF0t66jBgJqks5rDqtZgaJpZM4IRpQU>.
|
I tried it your way, but the tableview is still not sliding vertically, and I'm adding the following code to the BarlinechartViewBase @@ -688,7 +688,11 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD if _outerScrollView !== nil { // Prevent the parent scroll view from scrolling - _outerScrollView?.nsuiIsScrollEnabled = false + if !self.isScaleYEnabled { + _outerScrollView?.nsuiIsScrollEnabled = true + } else { + _outerScrollView?.nsuiIsScrollEnabled = false + } } } |
Hi, I tried with your hack but its not working. Do you have any other way of achieveing that? if _outerScrollView !== nil |
i have a tableView
each cell has a lineCharView
after lineChartView zoom in and horizontal scroll,
tableView can not vertical scroll when tap on linechartView
how can i fix it? thanks 100 times.
The text was updated successfully, but these errors were encountered: