-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Issue description
The documentation in the README.md
file for LineChart haptic feedback is incorrect.
It is suggested to use invokehaptic
on onActivated
and onActivated
of <LineChart.CursorCrosshair />
but it isn't working. I solved it using it on onCurrentIndexChange
of <LineChart.Provider />
Suggested code example
I suggest to change the code example in the documentation like this:
import * as haptics from 'expo-haptics';
const data = [...];
function invokeHaptic() {
haptics.impactAsync(haptics.ImpactFeedbackStyle.Light);
}
function Example() {
return (
<LineChart.Provider data={data} onCurrentIndexChange={invokeHaptic}>
<LineChart>
<LineChart.Path />
<LineChart.CursorCrosshair>
<LineChart.Tooltip />
</LineChart.CursorCrosshair>
</LineChart>
</LineChart.Provider>
)
}
Metadata
Metadata
Assignees
Labels
No labels