The current behavior for the line chart is pretty jarring. If you start dragging, but then your finger moves out of the drag range, it just gets stuck. Luckily, this is easily fixed with shouldCancelWhenOutside={false}.
I would have added this as a prop directly to LineChartCursorLine, however, it wasn't forwarding the gesture props down to the LineChartCursor the way that the LineChartCursorCrossHair already does. So I fixed that too.
The current behavior for the line chart is pretty jarring. If you start dragging, but then your finger moves out of the drag range, it just gets stuck. Luckily, this is easily fixed with
shouldCancelWhenOutside={false}
.I would have added this as a prop directly to
LineChartCursorLine
, however, it wasn't forwarding the gesture props down to theLineChartCursor
the way that theLineChartCursorCrossHair
already does. So I fixed that too.Before
Dragging below makes it just freeze in place:
https://user-images.githubusercontent.com/13172299/214705307-24215f4a-9445-4943-8370-abd4a79a4978.mov
After
Dragging is now more natural:
https://user-images.githubusercontent.com/13172299/214705338-dbb838be-4b60-41ee-a9a6-3b52d433272c.mov