File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,6 +82,10 @@ There are three events fired when the user interacts with the graph:
82822 . ` onPointSelected ` : Fired for each point the user pans through. You can use this event to update labels or highlight selection in the graph.
83833 . ` onGestureEnd ` : Fired once the user releases his finger and the pan gesture _ deactivates_ .
8484
85+ Pan gesture can be configures using these props:
86+
87+ 1 . ` panGestureTimeout ` : Set timeout for the pan gesture to activate. Set to ` 0 ` to start immediately after touch. Defaults to ` 300 ` .
88+
8589Example:
8690
8791``` jsx
Original file line number Diff line number Diff line change 126126 "singleQuote" : true ,
127127 "tabWidth" : 2 ,
128128 "trailingComma" : " es5" ,
129- "useTabs" : false
129+ "useTabs" : false ,
130+ "semi" : false
130131 },
131132 "react-native-builder-bob" : {
132133 "source" : " src" ,
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ export function AnimatedLineGraph({
6161 onPointSelected,
6262 onGestureStart,
6363 onGestureEnd,
64+ panGestureDelay = 300 ,
6465 SelectionDot = DefaultSelectionDot ,
6566 enableIndicator = false ,
6667 indicatorPulsating = false ,
@@ -78,7 +79,7 @@ export function AnimatedLineGraph({
7879
7980 const { gesture, isActive, x } = usePanGesture ( {
8081 enabled : enablePanGesture ,
81- holdDuration : 300 ,
82+ holdDuration : panGestureDelay ,
8283 } )
8384 const circleX = useValue ( 0 )
8485 const circleY = useValue ( 0 )
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export type AnimatedLineGraphProps = BaseLineGraphProps & {
7777 * Let's the indicator pulsate
7878 */
7979 indicatorPulsating ?: boolean
80+ /**
81+ * Delay after which the pan gesture starts
82+ */
83+ panGestureDelay ?: number
8084
8185 /**
8286 * Called for each point while the user is scrubbing/panning through the graph
You can’t perform that action at this time.
0 commit comments