Iβm using this chart inside a parent ScrollView in a React Native screen. When tooltip interaction is enabled (long press or touch move), the parent ScrollView starts scrolling, which prevents proper tooltip interaction on the chart.
To work around this, I tried disabling the parent scroll using onTouchStart and onTouchEnd on the chart container. This allows the tooltip to work correctly, but it introduces a new issue: once this is added, the chart view itself can no longer scroll vertically or handle pan gestures properly.
So the behavior is currently one of the following, but not both:
- Tooltip works, but parent
ScrollView intercepts gestures
- Tooltip works and parent scroll is disabled, but chart scrolling is blocked
Steps to reproduce
- Render the chart as a child of a React Native
ScrollView
- Enable tooltip interaction (axis tooltip / long press)
- Try to long press or move finger on the chart
β Parent ScrollView starts scrolling
- Add
onTouchStart / onTouchEnd to disable parent scrolling
β Tooltip works, but chart scrolling no longer works as expected
Expected behavior
The chart should be able to:
- Handle touch interactions for tooltip (long press or move)
- Scroll or pan normally
- Coexist inside a parent
ScrollView without gesture conflicts
Actual behavior
Touch handling is fully captured either by the parent ScrollView or blocked entirely when manually disabling scroll.
Question / Request
Is there a recommended or built-in way to handle gesture priority when the chart is nested inside a ScrollView?
For example:
- Using
react-native-gesture-handler
- A prop to control gesture handling or pointer events
- Any guidance on integrating tooltips inside scrollable parents
Any suggestion or example would be very helpful.
Iβm using this chart inside a parent
ScrollViewin a React Native screen. When tooltip interaction is enabled (long press or touch move), the parentScrollViewstarts scrolling, which prevents proper tooltip interaction on the chart.To work around this, I tried disabling the parent scroll using
onTouchStartandonTouchEndon the chart container. This allows the tooltip to work correctly, but it introduces a new issue: once this is added, the chart view itself can no longer scroll vertically or handle pan gestures properly.So the behavior is currently one of the following, but not both:
ScrollViewintercepts gesturesSteps to reproduce
ScrollViewβ Parent
ScrollViewstarts scrollingonTouchStart/onTouchEndto disable parent scrollingβ Tooltip works, but chart scrolling no longer works as expected
Expected behavior
The chart should be able to:
ScrollViewwithout gesture conflictsActual behavior
Touch handling is fully captured either by the parent
ScrollViewor blocked entirely when manually disabling scroll.Question / Request
Is there a recommended or built-in way to handle gesture priority when the chart is nested inside a
ScrollView?For example:
react-native-gesture-handlerAny suggestion or example would be very helpful.