You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great library -- thanks for all the hard work on your end.
We are trying to add a tap gesture recognizer on an instance of BaseChartView. Why? We would like a custom action to occur on chart tap down. highlightValue does not help us because its called whenever the chart value is highlighted. So if the user taps down, then rolls their finger ("swipe"), highlightValue could potentially be called hundreds of times. We only want to send our custom action once on tap down.
When trying to add our own tap gesture recognizer on the chart, we interfere with the existing tap gesture recognizer that the library provides. This appears to be a limitation of iOS -- we cannot have multiple instances of the same type of tap gesture recognizer on a view. We've also tried other hacks, like using cancelsTouchesInView in our tap gesture recognizer, etc.
What would it take to get an "on tapped" callback method by the API? Looking at the internal tap gesture recognizer, it looks like it might be pretty trivial. However I'm no expert and didn't feel ready to make a pull request.
@objc private func tapGestureRecognized(recognizer: NSUITapGestureRecognizer)
{
if _data === nil
{
return
}
if (recognizer.state == NSUIGestureRecognizerState.Ended)
{
if !self.isHighLightPerTapEnabled { return }
let h = getHighlightByTouchPoint(recognizer.locationInView(self))
if (h === nil || h!.isEqual(self.lastHighlighted))
{
self.highlightValue(highlight: nil, callDelegate: true)
self.lastHighlighted = nil
}
else
{
self.lastHighlighted = h
self.highlightValue(highlight: h, callDelegate: true)
}
}
}
The text was updated successfully, but these errors were encountered:
Hi,
Great library -- thanks for all the hard work on your end.
We are trying to add a tap gesture recognizer on an instance of BaseChartView. Why? We would like a custom action to occur on chart tap down. highlightValue does not help us because its called whenever the chart value is highlighted. So if the user taps down, then rolls their finger ("swipe"), highlightValue could potentially be called hundreds of times. We only want to send our custom action once on tap down.
When trying to add our own tap gesture recognizer on the chart, we interfere with the existing tap gesture recognizer that the library provides. This appears to be a limitation of iOS -- we cannot have multiple instances of the same type of tap gesture recognizer on a view. We've also tried other hacks, like using cancelsTouchesInView in our tap gesture recognizer, etc.
What would it take to get an "on tapped" callback method by the API? Looking at the internal tap gesture recognizer, it looks like it might be pretty trivial. However I'm no expert and didn't feel ready to make a pull request.
The text was updated successfully, but these errors were encountered: