wuxudong / react-native-charts-wrapper

a react native charts wrapper (support android & iOS)
2.44k stars 657 forks source link

ScrollView vertical pan gesture blocked by LineChart on iOS #915

Open matthewcarlreetz opened 1 year ago

matthewcarlreetz commented 1 year ago

Expected Behavior

On iOS when LineChart is nested in a ScrollView the view should scroll vertically.

Actual Behavior

The LineChart takes the vertical pan gesture and blocks vertical scrolling.

Steps to Reproduce the Problem

Nest a LineChart within a Scrollview on iOS. Drag vertically on the line chart. Notice the view will not scroll vertically.

Specifications

doyunnn commented 1 year ago

You should use touchEnabled={false}. If you don't need any gesture in LineChart.

sashastg commented 1 year ago

Is there any way to allow gestures along the X-axis while ignoring gestures along the Y-axis?

anniewey commented 4 months ago

i have similar issue with op when scrolling down the screen with multiple charts (scatter/bar). the scroll gesture is override by the focus on the data points on the scatter/bar chart. i need to scroll outside the chart to make it scroll smoothly.

update: i managed to fix this using dragEnabled={false} props.